The International Simutrans Forum

 

Author Topic: Way constraints  (Read 13456 times)

0 Members and 1 Guest are viewing this topic.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Way constraints
« on: December 14, 2008, 12:35:09 AM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: Way constraints
« Reply #1 on: December 14, 2008, 10:45:34 AM »
There is a maximum weight entry for all ways, but it is not enforced during routing.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #2 on: December 14, 2008, 12:11:13 PM »
There is a maximum weight entry for all ways, but it is not enforced during routing.

Interesting.

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Way constraints
« Reply #3 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  :-\

Offline jbode

  • Devotees (Inactive)
  • *
  • Posts: 84
Re: Way constraints
« Reply #4 on: December 14, 2008, 12:37:58 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 ;)

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #5 on: December 14, 2008, 12:47:21 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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Way constraints
« Reply #6 on: December 14, 2008, 01:19:30 PM »
How much does it increase routing/wayfinding times?

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #7 on: December 14, 2008, 01:34:04 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.

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Way constraints
« Reply #8 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.

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

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #9 on: December 14, 2008, 02:01:39 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.

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

What do you mean?

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Way constraints
« Reply #10 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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #11 on: December 14, 2008, 03:09:16 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?

Offline marioxcc

  • *
  • Posts: 125
  • GNU is not UNIX
Re: Way constraints
« Reply #12 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.

Offline isidoro

  • Devotee
  • *
  • Posts: 1129
Re: Way constraints
« Reply #13 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).

Offline jbode

  • Devotees (Inactive)
  • *
  • Posts: 84
Re: Way constraints
« Reply #14 on: December 15, 2008, 05:36:03 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 ...

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Way constraints
« Reply #15 on: December 15, 2008, 09:51:57 AM »
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.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9518
  • Languages: De,EN,JP
Re: Way constraints
« Reply #16 on: December 15, 2008, 04:45:23 PM »
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.

Offline jbode

  • Devotees (Inactive)
  • *
  • Posts: 84
Re: Way constraints
« Reply #17 on: December 15, 2008, 05:23:56 PM »
?

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 ...

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Way constraints
« Reply #18 on: December 16, 2008, 11:18:13 AM »
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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #19 on: December 16, 2008, 08:52:24 PM »
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.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Way constraints
« Reply #20 on: December 17, 2008, 08:57:38 AM »
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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Way constraints
« Reply #21 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.

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Way constraints
« Reply #22 on: December 17, 2008, 10:08:18 AM »
 :-[

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?

Offline jbode

  • Devotees (Inactive)
  • *
  • Posts: 84
Re: Way constraints
« Reply #23 on: December 17, 2008, 11:20:30 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 ;)

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Way constraints
« Reply #24 on: December 17, 2008, 11:48:21 AM »
i can't blame the changes, i'm so happy they happened!!!! ;-)

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

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: Way constraints
« Reply #25 on: December 17, 2008, 03:49:10 PM »
You've more than earned that feeling, fabio!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #26 on: December 17, 2008, 09:25:48 PM »
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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Way constraints
« Reply #27 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.



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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #28 on: December 17, 2008, 10:21:55 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.

Quote
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.

That is a good idea indeed!

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Way constraints
« Reply #29 on: December 17, 2008, 10:45:55 PM »
…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

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 18721
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Way constraints
« Reply #30 on: December 17, 2008, 11:05:14 PM »
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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Way constraints
« Reply #31 on: December 18, 2008, 12:12:57 AM »
Why not…

Offline Fabio

  • Devotee
  • Administrator
  • *
  • Posts: 2898
  • The Pak128 Guy
    • Visit me on Facebook
  • Languages: EN, IT, RO, FR
Re: Way constraints
« Reply #32 on: December 18, 2008, 10:12:04 AM »
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"



[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!



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...

Offline Spike

  • *
  • Posts: 1361
  • First Simutrans Developer and Graphics Artist
Re: Way constraints
« Reply #33 on: December 18, 2008, 10:29:29 AM »
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.

Offline VS

  • Senior Plumber (Devotee)
  • Devotee
  • *
  • Posts: 4855
  • Vladimír Slávik
    • VS's Simutrans site
  • Languages: CS,EN
Re: Way constraints
« Reply #34 on: December 18, 2008, 11:35:33 AM »
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.