News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

Way constraints

Started by jamespetts, December 14, 2008, 12:35:09 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

One thing that might be rather useful, especially for railways, is to have special constraints as to what sort of vehicle can use what sort of way. Presently, the only constraint is that electric locomotives cannot use non-electrified track. If one had way constraints, one could do so much more.

Here is how I imagine it working: each way type would be able to have any arbitrary set of constraints, and each vehicle would have a matching set of constraints. Normal track would have no constraints. Each constraint could either be prohibitive or permissive. A prohibitive constraint would allow only vehicles with a matching constraint to use the way. Vehicles with a prohibitive constraint could use ways either with or without the matching constraint, but vehicles without the matching constraint would not be able to use that way. A permissive constraint would allow vehicles with a matching constraint to use the way. Vehicles with a permissive constraint could only use ways with a matching constraint, although any vehicle (with or without the permissive constraint) could use ways with that type of constraint.

Some examples might help to illustrate the usefulness of such constraints. A prohibitive constraint could be set up for the very restrictive loading gauge underground railway track of the sort that operates in London (colloquially known as "tube" lines). Tube trains can run either on overground lines or in tube tunnels, but full-sized trains cannot fit into tube tunnels. In the game, just as in reality, tube tunnels would be cheaper to build and maintain than full-sized tunnels (making building an underground railway more economic), but would have vehicles with a lower capacity, power and speed than the full-sized equivalents. A permissive constraint might be used to simulate different types of electrification. For instance, a fourth-rail electrified vehicle can only travel on fourth-rail electrified track. Other vehicles can also travel on fourth-rail electrified track, but fourth-rail electrified vehicles cannot travel on other track. It should then be possible to combine different constraints to produce, for example, tube tunnels with fourth-rail electrified track (then joining fourth-rail electrified track in the open, also used by other trains that cannot fit into tube tunnels).

Way constraints have the potential, I think, to make designing transportation networks (especially railway networks) a great deal more interesting and somewhat more challenging, too.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi

There is a maximum weight entry for all ways, but it is not enforced during routing.

jamespetts

Quote from: prissi on December 14, 2008, 10:45:34 AM
There is a maximum weight entry for all ways, but it is not enforced during routing.

Interesting.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gauthier

It will make the game much more complicated to play and objects to make  :o

Can you make your idea more ... simple ?

I find it interesting but to heavy  :-\

jbode

Quote from: gauthier on December 14, 2008, 12:33:24 PM
It will make the game much more complicated to play and objects to make  :o

Can you make your idea more ... simple ?

I find it interesting but to heavy  :-\

I don't think it will be too heavy - it more will show the lack of suitable vehicles ... In my actual game I had to use steam engines to form a money earning subway with enough capacity ... I doubt very much that real people will enter such tunnels on free will ;)

jamespetts

Quote from: jbode on December 14, 2008, 12:37:58 PM
I don't think it will be too heavy - it more will show the lack of suitable vehicles ... In my actual game I had to use steam engines to form a money earning subway with enough capacity ... I doubt very much that real people will enter such tunnels on free will ;)

Interesting that you should say that: in fact, the world's earliest underground railway, the Metropolitan Railway of London (now part of the London Underground), which ran between Paddington and Farringdon in 1863 did use steam engines, as did some later versions of the line. Indeed, the alpha PakBritain has one of the locomotives and some of the carriages from that era. The tunnels were indeed somewhat unpleasant, but, because they were shallow tunnels built using the cut-and-cover techinque, there were large ventilation shafts all along the length of the tunnels, and the locomotives were especially designed to produce less smoke than an ordinary locomotive, as well as condensing rather than exhausting nearly all of the steam. It was only at the very end of the 19th century that electric traction replaced steam traction on the underground lines. The deep level tube lines, first built in the last years of the 19th century (1896, if I recall correctly) had electric traction from the start.

As to the idea and its complexity: it really is not very complicated at all. It just means that third-rail electric trains cannot run on overhead electric track; that full sized trains cannot fit into tube tunnels; that enormous and very heavy trucks cannot travel on gravel roads; and other such obvious things. That is not at all complicated in operation: really, it is very simple to understand, just like the vehicle constraints (that a steam locomotive must have a tender, and that a tender cannot be coupled to anything other than a steam locomotive, etc.). Indeed, I think that it is far harder to understand the present unrealistic setup in which full-sized trains can use Underground tracks, and overhead electrified locomotives can run quite happily on fourth rail electrified track.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VS

How much does it increase routing/wayfinding times?

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

jamespetts

Quote from: VS on December 14, 2008, 01:19:30 PM
How much does it increase routing/wayfinding times?

I don't know - nobody's written it yet, so it won't have been tested.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gauthier

I understand that it would be more realistic but it would be more difficult too for the player. Various speed ways and electrifications are enough.

An alternative way : create way objects like electrifications but don't work as alectrification but other things.

jamespetts

Quote from: gauthier on December 14, 2008, 01:52:08 PM
I understand that it would be more realistic but it would be more difficult too for the player. Various speed ways and electrifications are enough.

I have to say, I find it very hard to see why not being able to run full-sized trains in tube tunnels, and not being able to run overhead electrified trains on third rail track makes things too difficult for players. As stated before, it is very confusing that it is possible to do such things! But, if people are really concerned about how difficult that this would make things for players, as ever with any such suggestion, it should be easy enough to code the feature so as to make it possible for players to disable it if they do not like it.

QuoteAn alternative way : create way objects like electrifications but don't work as alectrification but other things.

What do you mean?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

gauthier

some vehicles need special way, for example : electric engines need electrification so an other vehicle may need an other way object.

jamespetts

Quote from: gauthier on December 14, 2008, 02:34:51 PM
some vehicles need special way, for example : electric engines need electrification so an other vehicle may need an other way object.

Isn't that just the "permissive" part of my suggestion?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

marioxcc

I support the idea of jamespetts, it will make simutrans more realistic and less simple, IMO curently simutrans is too simple.

isidoro

In my opinion, it can be confusing.  You'll buy a vehicle, you'll assign a route, and because of the vehicle itself or part of it, you will see the dreaded message "Vehicle such and such can't find a route"...  Perhaps it is a hidden behind-the-trees piece of inadequate track.  It often happens with electrified lines.

For each vehicles, it should also be added information about on what ways it runs (interface change).

jbode

Quote from: isidoro on December 15, 2008, 01:37:02 AM
In my opinion, it can be confusing.  You'll buy a vehicle, you'll assign a route, and because of the vehicle itself or part of it, you will see the dreaded message "Vehicle such and such can't find a route"...  Perhaps it is a hidden behind-the-trees piece of inadequate track.  It often happens with electrified lines.

For each vehicles, it should also be added information about on what ways it runs (interface change).


Could be avoided if schedule is done first - then the set of possible vehicles reduced by the routing on available tracks/roads/ways. From my experience I never run vehicle without a schedule - schedule free vehicles are not maintainable ...

Fabio

I suggested something like this a couple of years ago, but it died. So i REALLY support this feature. Let aside that implementig "harder" or "easier" constraints would be up to the PAK maintainer, who could have a huge freedom of creating sub-sets.

A first thing, it would immediately separate monorails from maglevs though they share the same code.

As a second thought, in order to prevent the "way not found", there could be a TEST button in schedule window. if you run it, it simulates a whole journey along the schedule and it come up with a message whether it finds any problem for the current fleet.

prissi

This "test" comes up regularly. But it is not possible: When no route is found, there is no route to show where the problem is, because finding a route was the problem. A clear case of wishful thinking.

jbode

?

prissi, clearly yes, when the first waypoint is not reachable, then there is nothing to show --> "route not found". But as I understand: the request is for testing all the route. So the test could go waypoint by waypoint and for example mark the "reached" waypoints green within the schedule. In case an error occurs the test could go backwards through the waypoints list to narrow the area of problem ...

Spike

Quote from: marioxcc on December 14, 2008, 05:04:25 PM
I support the idea of jamespetts, it will make simutrans more realistic and less simple, IMO curently simutrans is too simple.

Quite often new players pop up and ask for advice. I don't think Simutrans is too simple. Many new players are already confused by the need for station expansions, even for simple things like passengers in some PAK sets. I'm afraid the multitude of constraints for tracks and vehicles will just confuse new players even more.

jamespetts

My view of the matter is that Simutrans is not fun because it is simple: it is fun because it is complicated in interesting ways. Any game that is complicated by design will inevitably confuse some new people: any game simple enough not to confuse any significant numbers of new players is too simple to be interesting to a great many people.

Whether or not to implement additional way constraints would be a choice for Pakset authors. However, there is evidently some demand for it: PakBritain, for instance, has overhead electrification, third rail electrification, fourth rail electrification and tube tunnels. The difference between each type of electrification is purely cosmetic, although serious players end up manually imposing constraints upon themselves to add realism and challenge. As I wrote before, it is more confusing to have these differences in waytypes without them being enforced than it is to enforce them. If the pakset authors wanted simplicity, they would define only one kind of electrification or tunnel in the first place.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Fabio

Quote from: jamespetts on December 16, 2008, 08:52:24 PM
If the pakset authors wanted simplicity, they would define only one kind of electrification or tunnel in the first place.

this is a good point. and there could be "semplified" or "more complex" paks. and the pak maintainer would just take care not to allow too much complexity. but, for instance, maglevs and monorails SHOULDN't share tracks.

VS

Erm, while you were away, maglevs became new waytype. Narrow gauge too. That's the way to go with "tube rails", as long as only some special set of vehicles can drive on them.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Fabio

 :-[

well, i'm so sorry, now i really feel stupid...

by the way, i'm sure there have been huge changes in makeobj, are there updated references?

jbode

Quote from: fabio on December 17, 2008, 10:08:18 AM
:-[

well, i'm so sorry, now i really feel stupid...


No - not stupid - please feel a warm welcome back home! There had been a lot of changes since you dropped out a bit ... blame that changes ;)

Fabio

i can't blame the changes, i'm so happy they happened!!!! ;-)

thank you very much, i always feel this place as home...

DirrrtyDirk

You've more than earned that feeling, fabio!
  
***** PAK128 Dev Team - semi-retired*****

jamespetts

Quote from: VS on December 17, 2008, 09:38:30 AM
Erm, while you were away, maglevs became new waytype. Narrow gauge too. That's the way to go with "tube rails", as long as only some special set of vehicles can drive on them.

Ahh, I'm afraid that that won't work for tube lines, since it is just a matter of loading gauge: tube trains can and do share tracks in overground sections with full-sized trains. The same applies to electrification: third and fourth rail electrified track can be used by non-electrified trains, and, moreover, some trains are dual-voltage, and can run on either overhead electrified track or third rail track.

A different type of way means that there can be no sharing: the point of way constraints is to allow a one-way sharing as described above when explaining the difference between permissive and prohibitive way constraints.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VS

Somehow I am not convinced... core of the solution you propose is flexible enough to keep another generation of Simu-players busy finding out all the possibilities; that is a clear advantage. No doubt, exciting for authors.

However, just like Hajo said, I find it too much for the player - adding another layer of complexity, unknown in "thickness". How does one tell if a vehicle needs third or fourth rail? Because it is in a depot on a track with that kind of extension? This is another factor to watch for, either when building vehicles, or when building the network.




About wayfinding problems - yes, it is not possible to say which route was not found :) But after this result, another run without any constraints (signals, electrification...) and possibly skipping unconnected neighbouring tiles might find out; then you could get messages like
"no way found, possible unconnected part at x,y"
"no way found, possibly missing electrification"
"no way found, possibly bad signalling layout"
etc.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

jamespetts

Quote from: VS on December 17, 2008, 09:59:12 PM
Somehow I am not convinced... core of the solution you propose is flexible enough to keep another generation of Simu-players busy finding out all the possibilities; that is a clear advantage. No doubt, exciting for authors.

However, just like Hajo said, I find it too much for the player - adding another layer of complexity, unknown in "thickness". How does one tell if a vehicle needs third or fourth rail? Because it is in a depot on a track with that kind of extension? This is another factor to watch for, either when building vehicles, or when building the network.

As with all things of this nature, there is no "the player": there are lots of different players, each with radically different preferences. Some prefer simplicity, others complexity, others still somewhere in between. If there is a real possibility that some people might be frustrated and/or confused by way constraints, then the answer is simple: have an option to turn them off. A simple bool flag could easily be checked before any way constraints are enforced. It could be off by default. It could be part of an "advanced mode" that sits in opposition to "beginner mode", and contains all those features that some people want, but other people consider too complicated. The weight restrictions to which Prissi referred could also be turned on in "advanced mode", which could make network design a great deal more fun (for the complexity lovers amongst us) by having to balance bridge building and maintenance cost against the weight restrictions, and the increasing weight of locomotives with time.

As for how players tell whether a vehicle needs a particular kind of electrification, etc., the way constraints would have to be implemented in the GUI. Adding a "constraints: ..." section to the vehicle information, with things such as "CAN use tube tunnels; MUST use fourth-rail electrified track" or "CANNOT use tube tunnels; CAN travel on non-electrified track"  should suffice for that purpose.

QuoteAbout wayfinding problems - yes, it is not possible to say which route was not found :) But after this result, another run without any constraints (signals, electrification...) and possibly skipping unconnected neighbouring tiles might find out; then you could get messages like
"no way found, possible unconnected part at x,y"
"no way found, possibly missing electrification"
"no way found, possibly bad signalling layout"
etc.

That is a good idea indeed!
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VS

...I still don't feel like supporting this, but since it is a generalized superset of current possibilities and can be restricted by not adding anything new, nothing can be lost by having it.

There is a lot of people around here, but so far there are two negative responses (including me), two positive and three (?) undecided. Given that it is said "silence means consent" (at least in cz!), there are potentially many silent lurkers who don't care enough to object or support the idea. So - since I'm not bringing much to this discussion by being negative, I'll just disengage on that front :D

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

jamespetts

VS,

I'd be interested in your views in general on the question of an "advanced mode": it seems to me from discussions here and elsewhere that there is quite a large divergance of preference on the question of how complicated/realistic that Simutrans should be: an "advanced" mode might help to cater for a wider range of preferences.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

VS


My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Fabio

Quote from: VS on December 17, 2008, 09:59:12 PM
About wayfinding problems - yes, it is not possible to say which route was not found :) But after this result, another run without any constraints (signals, electrification...) and possibly skipping unconnected neighbouring tiles might find out; then you could get messages like
"no way found, possible unconnected part at x,y"
"no way found, possibly missing electrification"
"no way found, possibly bad signalling layout"
etc.

This would be a HUGE progress in dealing with player's errors. Moreover, it could be launched at the start of the vehicle FOR THE WHOLE SCHEDULE, waypoint by waypoint, in order to localise the problem among two stations. something like:
"A problem has been reported between BARINGTON NORTH STATION and SPRINGFIELD WEST STATION: no way found, possibly missing electrification"



Quote from: jamespetts on December 17, 2008, 10:21:55 PM
[A]n "advanced mode" that sits in opposition to "beginner mode", and contains all those features that some people want, but other people consider too complicated. The weight restrictions to which Prissi referred could also be turned on in "advanced mode" [...]

I love this idea!



Quote from: jamespetts on December 17, 2008, 10:21:55 PM
As for how players tell whether a vehicle needs a particular kind of electrification, etc., the way constraints would have to be implemented in the GUI. Adding a "constraints: ..." section to the vehicle information, with things such as "CAN use tube tunnels; MUST use fourth-rail electrified track" or "CANNOT use tube tunnels; CAN travel on non-electrified track"  should suffice for that purpose.

I like this one as well, it wouldn't ake the whole constraints thing too hard to understand...

Spike

Quote"no way found, possible unconnected part at x,y"

I just want to say, this one is technically very difficult. Pathfinding evaluates a lot of paths, and each path end might be a "possibly unconnected part". The path finding itself cannot determine which one is likely to be an offending gap, and which are regular ends.

There still might be heuristics employed to detect ends that look suspicious.

VS

Hajo: What I meant was, when the two tiles have correct ribis (?) but are unconnected. Like this:

====||====

Skipping gaps is of course something far more complicated or even impossible.

My projects... Tools for messing with Simutrans graphics. Graphic archive - templates and some other stuff for painters. Development logs for most recent information on what is going on. And of course pak128!

Spike

An heuristic could find this end "suspicious" but it might as well be an intended design. So diagnosis is possible, basically, but also imperfect.

Also the path finding must try to jump over the gap, and check if the continuing route actually leads to the desired destination. It's doable but quite a bit extra work.

I assume the feature would still be helpful, even if detecting a few false "problems". Prissi and the patchmakers must decide if it's useful enough to be tried.

jamespetts

Hajo/VS,

I imagine that detecting routing problems caused by signals, signs, electrification and way constraints is orders of magnitude easier than detecting routing problems caused by missing sections of a way, since the former can just run the same pathfinding routine with the constraint checking turned off and comparing the result to that with it turned on, whereas the latter would require enormously complicated hypothetical and heuristic means of determining the route.

A system that told players when their destination wasn't reachable because of a problem with signals, signs, electrification or constraints but gave no reasons when the problem was an entirely missing connexion is vastly better than one that never gives any reasons.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.