News:

Simutrans Chat Room
Where cool people of Simutrans can meet up.

Thoughts on shunting, adding&removing cars, etc...

Started by Fabio, November 09, 2012, 05:42:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ters

Quote from: Roads on November 13, 2012, 11:24:48 PM
I have not let this situation run its course to see what happens when the receiving factory gets too much of one item but I expect the train would just set there until the factory used enough of the raw material in question to unload the train.

Vehicles can always unload, even if destination factory is full. The factory will just become more overfull. This happens even with dedicated lines, especially long ones.

Roads

Well Ters, this is good to know.  So if I have something like "Consumption - stone 473/1963t, 44%" I can simply ignore the "1963t" and I can do this indefinitely and still get paid for each load?  Just curious, what happens to the percentage, does it go 101% to whatever, even to say 1999%?

kierongreen

Existing trains can unload but the producing factory will no longer be sending out new goods until the consumer factory has space again. Therefore trains will end up queuing at the start station if you have them set to 100% load. If there is a significant quantity of goods already en route it can take some time for everything to get going again.

Roads


jamespetts

This is an interesting discussion. I have entertained fleeting thoughts of implementing some element of convoy modification in Experimental, but consider it a low priority and have not looked into it in detail.

I had thought to implement it in a somewhat generalised manner, which would allow for things like dividing and combining of trains, slip carriages, locomotive changes as well as the pick-up goods sort of operation considered here.

Stations could have a "sidings", "shunting yard", "stabling shed" (etc.) type of extension. This would be indicated by a simple boolean flag in the station extension object and a "shunting=1" or the like indicator in the .dat file.

At any station with the shunting type of extension, orders could be set on a convoy's schedule for the modification of its vehicles. The station would, like a depot, keep track of the vehicles dropped there, and they would be accessible by a display, and later convoys could pick them up. Vehicles could be sent straight from a depot to a station with a shunting facility and left there to join a later convoy. If not enough of the right type of vehicles are present when the convoy comes to the stop, it can either, depending on the setting in the schedule, wait for the correct number indefinitely, wait for a certain period of time and then continue regardless, or continue regardless without waiting.

I suspect that this would take quite a bit of time to write, and would be rather fiddly to operate, however, as players would have to synchronise quite a lot of things to get it to work properly.

One challenge that would have to be resolved is this: how reliably to make a convoy shorter or longer other than in a depot? If one just adds vehicles to a convoy, especially a railway type convoy with block sections, how would it work? What if it is in a platform of restricted length and the new vehicles added make it too long for the platform? What if the new vehicles make it too long for the block section such that it sticks out of the back and occupies two rather than one section? What would happen to any trains in the rear section at the time, or that had reserved the rear section?

The challenges in the foregoing paragraph, incidentally, are also applicable to a much higher priority project on which I am working, to enhance and simplify the vehicle replacer in Experimental such that convoys using it no longer have to go to the depot; if anyone has any good ideas as to how to overcome these issues, I should be very interested to know what they might be.

Similarly, if anybody considers this implementation of adjusting the vehicles in a convoy during its schedule to be worthwhile and a higher priority than my other coding projects, do feel free to write it on a Github branch and I shall certainly give serious consideration to including it.
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.


Fifty

Quote from: jamespetts on November 19, 2012, 01:05:28 AM
One challenge that would have to be resolved is this: how reliably to make a convoy shorter or longer other than in a depot? If one just adds vehicles to a convoy, especially a railway type convoy with block sections, how would it work? What if it is in a platform of restricted length and the new vehicles added make it too long for the platform? What if the new vehicles make it too long for the block section such that it sticks out of the back and occupies two rather than one section? What would happen to any trains in the rear section at the time, or that had reserved the rear section?

The way I see it, you would first build a line, and designate what types of (railroad) cars it picks up. Then you would choose a "Net flow," telling the line where empty railcars should wait for loading, and where they should go back empty if no load is available immediately  to be loaded. You would set the line's maximum number of tiles (applicable in both directions), and whether it could add helper engines for particularly heavy loads, as well as the "speed or tonnage window" of the line, which would determine how heavily a train could be loaded down (different for each direction).

Under this system, lines would take some time to create, but you would need fewer of them, and afterwards you can purchase railcars and for yards and locomotives for lines, and send them out easily.

Here's a very basic example of how this might work. Say you have a north-south line between two steel mills. In the north, more steel is needed than is produced, and in the south, more ore is needed than is available. You set up a line between the steel mills, and tell it that it can haul steel railcars and bulk railcars. You tell it that the net flow of bulk is south, and the net flow of steel is north, and that it should be loaded to between 90 and 100 km/h when leaving the northern mill. You purchase some cars, steel cars in the southern yard, and some bulk cars in the north, as well as some trains in both yards assigned to the line. This will be the most efficient way of hauling these two commodities, as some unloaded cars can return with the loaded cars to balance the load.
Why do we park on the driveway and drive on the parkway?

Roads

@James
Glad you are thinking about this.  Hope you get some time to work on it eventually.  Looks like Fifty may have at least a partial solution if not complete.  Perhaps you might try, as you've already done, to anticipate problems - unworkable situations.  In this case maybe you could just throw up an error message saying something like "this facility cannot handle your current configuration" or something  suitable - I don't think the error message even has to be specific.

@Fifty
Your example is exactly the situation I often see...

kierongreen

One problem with shunting is the level of micromanagment it would then require to play the game - if the game is rebalanced to take into account the greater utilisation of locomotives then you would need to shunt to make a profit on goods at all.

ӔO

I still think one of the biggest hurdles with splitting, joining and shunting, is how to handle multiple units without getting overly complicated.
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

Fabio

Quote from: kierongreen on November 19, 2012, 05:30:29 PM
One problem with shunting is the level of micromanagment it would then require to play the game - if the game is rebalanced to take into account the greater utilisation of locomotives then you would need to shunt to make a profit on goods at all.
IMHO paksests should be balanced without taking shunting into consideration; if a player is willing to do shunting operations and reuse engines, he'll get a fat bonus out of it ;)

Quote from: ӔO on November 19, 2012, 05:42:25 PM
I still think one of the biggest hurdles with splitting, joining and shunting, is how to handle multiple units without getting overly complicated.
Multiple units shouldn't be allowed to join/split, except for duplex consists:
FCCCCBFCCCCB --> FCCCCB + FCCCCB and the other way around (where F=front, B=back, C=car).

ӔO

Quote from: Fabio on November 19, 2012, 06:52:15 PM
Multiple units shouldn't be allowed to join/split, except for duplex consists:
FCCCCBFCCCCB --> FCCCCB + FCCCCB and the other way around (where F=front, B=back, C=car).

Yes, but even this can get quite complicated in some cases...
For instance, SR class 3-sub, which can have 2 unpowered cars sandwiched between 2 sets.
301-302-303+T1-T2+301-302-303
Since the Trailer cars cannot be used without two EMU sets sandwiching it, how should this be handled?

or in the case of complex joining and splitting of multiple EMU
This is one of the more complicated examples, but it's been done. http://www.nicovideo.jp/watch/sm17038602
How does each convoy know when to wait, join, split, or which other line it is supposed to join with, without complex instructions?

Y lines are pretty easy, as I see it, since all that is necessary is "split" and "wait, then join with any other line with same stops"
My Sketchup open project sources
various projects rolled up: http://dl.dropbox.com/u/17111233/Roll_up.rar

Colour safe chart:

jamespetts

Quote from: ӔO on November 19, 2012, 08:31:08 PM
Yes, but even this can get quite complicated in some cases...
For instance, SR class 3-sub, which can have 2 unpowered cars sandwiched between 2 sets.
301-302-303+T1-T2+301-302-303
Since the Trailer cars cannot be used without two EMU sets sandwiching it, how should this be handled?

Actually, in theory, the trains could run with the trailer cars at the rear, and this occasionally happened; when the trains reached the terminus, the multiple unit would run around the trailer cars as if the multiple unit was a locomotive. Obviously, that would lead to locomotive and carriages like reversing times, and was sub-optimal, but it did occur.

(As an aside, the Southern later worked out that it was much more efficient just to put one extra trailer car in the middle of each of the units, creating a 4-Sub and doing away with all of the nonsense).
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.

Vladki

Quote
One challenge that would have to be resolved is this: how reliably to make a convoy shorter or longer other than in a depot?

If cargo would not be lost upon entry of depot, then all shunting could be done inside the depot.

Ters

That's not really the place for it in my opinion. And it's invisible, which takes the some (most?) of the fun away.

isidoro

I don't agree.  A depot is the most sensible place to do it, functionally.

In fact, it would consist in doing automatically what Roads said he did manually...

But this is again a matter of preferences.  People keen on model railways will certainly prefer a more graphical way of doing it, instead of out of the view inside a depot...


sdog

Depends, for the whole shuffling the depot is perhaps not a bad choice. But for only splitting up a train the way as seen in the simutrans VT video, where a two part train comes and half leaves is much nicer and clearer to the player.

I'm not certain if miss-using a depot is a good idea for implementation. Just look at the side-effects James experienced with his code where stuck vehicles are 'teleported' to the depot.

A specific building to buy vehicles, and a specific building to re-arrange them might be more sensible. The former only accepts empty trains, the other loaded trains. The train yard could take over functionality of the depot, like storing trains etc, and might be a pre-requisite for a depot: a train can only get from the depot to the network through the train yard, and other way round.

Zaphod

#87
I had an idea for a very simple version of this, using convoys Also as far as graphical representation is concerned, this is a game that lets trains magically reverse direction after all. Having locomotives run around cars on a siding is unnecessary. Just make the cars magically appear in the right order. It shouldn't be an issue.

You can already name convoys and store them in depots, including ones that can't drive(i.e. they have no locomotive). What if convoys could be combined with others into what I will call "consists", and then likewise you could split those apart, at stations called "sidings"?

This is not complicated.

Say Convoy A looks like this: AAAA,
Convoy B is BBBB
Convoy C is CCCC(loco).


Combined, you could form a "consist" like AAAABBBBCCCC(loco).

Usually you'd want to make the locos a separate convoy. Because all it does is group convoys without rearranging them. DDDD(loco) would join with EEEE(loco) to form a a train DDDD(loco)EEEE(loco)with a locomotive in the middle. This fixes the problem of fussy DMU/EMU car combos, newbies would just figure out they need to have locoless convoys to avoid deadheading power.

Now obviously to have un-drivable convoys leave the depot, depots must be able to combine or split convoys into driveable consists as part of route building. In a sense that makes depots and the sidings I will discuss later basically the same, only you can't buy or store stock at a siding or make trains stop at a depot, that is...The player might want to deliver the newly purchased rolling stock to a siding using a throwaway route and then let it be rearranged, and just not worry too much about this. Because like a depot, you can drop off a routeless convoy on a siding and it will stay there.

Just like in real life when new stock is "delivered", right?

Also, so while you can't normally mix convoys to form a train like DEDABAC(loco)(loco), you could just make a bunch of 1 car convoys and get away with something like that. See, my idea here is to keep it simple and players will just figure out that they can do certain things to get a result they want.

So how would the player use sidings? They'd be part of routing. In the routing dialog box, siding stops would have a extra button or icon next to them in the list that would be clickable. That would lead to a new window, that would also be accessible by clicking the siding building. At the top, there would be a drop down list with the route in question. If the route stopped at the station, below would be two columns of list boxes with their own drop-down/field. One would be "add convoy" and the other "drop convoy". You'd use the drop-down/field to select a convoy, it would go into the list. Youd add convoy A, then add convoy B, if that's the order you want. The other one would selected convoys onto the siding in the exact same way. Say a route had multiple return trips to that siding, then more GUI objects with "2." above them would appear below. In addition, I suppose there could be a "only proceed when full" type of button, or whatever you guys can think of.

TL;DR, convoy adding or dropping and the order it happens, etc, become part of the programmed route, routeless convoys juggled between consists. Anyways...

Now what would sidings look like? They could just be a building with a GUI window, like the depot. Or they could be like platforms, made of tiles of variable length. The length would determine how many convoys would fit, or more accurately how many total cars would fit. The convoys "dropped" on the siding would be graphically drawn in some basic order they were put there in, maybe following some arbitrary rule like a long siding fills up north-south. Trains forming at sidings would magically appear with the cars and or change direction, no need for complex shunting animation.