The International Simutrans Forum

Simutrans Extended => Simutrans-Extended development => Topic started by: ӔO on September 12, 2011, 01:45:37 AM

Title: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: ӔO on September 12, 2011, 01:45:37 AM
In pak britain ex, the most obvious one is the LMS garratt.

If more than one garratt is used in the same convoy, when going in reverse, the garratt is broken up into a very odd configuration upon reversing. Upon reversing again, an even weirder configuration is achieved.

for instance.
Gf1-Gb1-Gr1-Gf2-Gb2-Gr2-C-C-C-Bv
upon reverse, turns into.
Gf1-Gb1-Gr1-Gf2-C-Bv-C-C-Gb2-Gr2


This also happens to diesel and electric locomotives if done in a specific order
L-C-C-C-C-L
upon reverse, turns into
L-C-L-C-C-C
or
L-L-C-C-L-C-C
turns into
L-L-C-C-C-L-C


For the garratt, perhaps just splitting the power to all units and would be an easy fix?
Something like
Front: 2499kW, 101kN
Boiler: 2kW, 1kN
Rear: 2499kW, 101kN
edit - and force steam image to off on the front and rear

For the diesel and electrics, I think the unpowered cargo wagons are being considered as the tender portion of a steam engine, which is why there is always a cargo wagon after the engine. So maybe a flag to only allow that to happen with steam engines would work?
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: greenling on September 12, 2011, 11:20:38 AM
Aeo Please take a Photo who i can be view the Problem!
Thanks
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: jamespetts on September 12, 2011, 03:50:31 PM
Hmm - I had not anticipated people double-heading Garretts, mainly because that wasn't done in real life - one wonders how many wagons that you are trying to haul!

Garretts are treated as a special case and accounted for, and double heading is treated as a special case and accounted for, but double-headed Garretts are not. I do wonder whether the use of double headed Garretts is common enough to justify writing code specifically for that case?


As to the L-C-C-C-C-L arrangement, this is rare except for the InterCity 125 and related trains, in which case the rear locomotive has a "can_lead_from_rear" flag, and the problem does not occur. The only instance where this occurs or occurred in UK practice without a rear-facing cab is when the rear engine is a non-coupled banking locomotive, and, because we do not simulate shunting or consist changes, banking is omitted from Simutrans. Are there any real life examples of a locomotive being at the rear and not being able to lead the train from the rear? If so, what exactly happens to the order of vehicles in this case when reversing?

L-L-C-C-L-C-C is a similarly unrecognised arrangement, not used in UK practice at all (with the possible exeption of motor coaches in multiple units, but they are not a problem, as the rear vehicle will have a "can_lead_from_rear" flag set). Are there any real life examples of trains being arranged in this way?
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: greenling on September 12, 2011, 04:18:19 PM
jamespetts
what mean you with L-C-C-C-C-L and with L-L-C-C-L-C-C in the text?
Can you that declare with photos?
I have that not understand!
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: jamespetts on September 12, 2011, 04:21:31 PM
Greenling,

what I understood AEO to mean, and what I meant, was that the "L" stands for "locomotive" and the "C" for "carriage", such that "L-C-C-C-C-L" is a train with a locomotive at the front, four carriages, and then another locomotive at the rear.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: greenling on September 12, 2011, 04:31:45 PM
Ok
now have that i understand!
i the Reply befor hate i be Sitting in a Swamp of black holes of understandig!
Gives in uk pushed Trains in Fartraffic?
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: jamespetts on September 12, 2011, 05:45:31 PM
What do you mean by "fartraffic" here?
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: greenling on September 12, 2011, 06:53:35 PM
Fartraffic it´s the another word for long-distance traffic.
i hate the word long-distance traffic by the last reply not to hand!
Sorry.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: ӔO on September 12, 2011, 07:57:06 PM
@james

You are correct in that having an engine at the front and rear is usually for banking.
Having an engine in the middle, to distribute power, is not too uncommon in the freight trains of north america and australia where the trains can get very long. http://en.wikipedia.org/wiki/Distributed_power


As for the garratt, it's not that it needs to be double headed, but it's just to show that this sort of configuration, if mimicked by other engines, can lead to strange rearrangements.

(http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/th_simscr00.png) (http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/simscr00.png)
(http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/th_simscr01.png) (http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/simscr01.png)
(http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/th_simscr02.png) (http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/simscr02.png)
(http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/th_simscr04.png) (http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/simscr04.png)
(http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/th_simscr05.png) (http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/simscr05.png)
(http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/th_simscr06.png) (http://i199.photobucket.com/albums/aa131/AEObikes/simutrans/simscr06.png)
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: sdog on September 13, 2011, 12:40:34 AM
seems quite tricky to do this, if it should be so flexible to work with most engines.
Is the distributed power an issue for steam engines with trailer, or only for diesel engines? A simple fix would be to set constraints in a way that only engines that have a bi-directional flag set could be in the middle of a train.

The actual advantages power distribution has in real life, don't come to play in simutrans anyway, so it's perhaps a bit more of a cosmetic problem. (as was the EMD FT issue i posted in the other thread)
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: ӔO on September 13, 2011, 01:02:23 AM
I think it's only necessary for diesel and electrics. I doubt it was practical to add a steam engine in the middle, because you can't control it by remote. It was more common to just add a banking engine to the front or rear, but you can see that adding an engine to the rear still results in a weird reconfiguration upon reverse.

IMO, the only one that should be needed is the banking engine at the rear of a freight train.



PS. I had a bit of trouble finding images of engines placed in the middle, but searching for "swing helpers" turned up a lot.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: sdog on September 13, 2011, 01:06:05 AM
as james pointed out, we can't change the consist of running trains. so it's not possible to ad a banking engine for climbs at all. Would be cool though, if we had those little bankers run around on our networks though* :-)

*just read the wikipedia articles on LMS small engine strategy and the wreckage it probably caused.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: ӔO on September 13, 2011, 01:19:10 AM
In simutrans, I sometimes make two stations at each side of the base and run a special mountain train just for that section.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: sdog on September 13, 2011, 03:33:37 AM
a solution might be to set the length of vehicles that have to be turned around with the engine when it is not flaged bi-directional. Using the same dat file entry and increasing it's range to integers.

0 not bi-directional
1 bi directional
n>=2 not bi-directional itself, but turn the next n-1 vehicles after the engine together with it, the group is bidirectional
n<-1 similar as n>1 but the locomotive consist is not bidirectional and has to be reversed as a group.

when seting to n>1 pak set creators have to make sure they make constraints in a way that exactly n vehicles have to be in the locomotive consist. example:

n=3
A+B+A'-CDCCCC
CDCCCC-A+B+A'
A,A',B are engines, C,D different carriages

negative integers require the locomotive consist to keep the same order and being switched around completely.
example:
A+B+B-CDCCCC
CDCCCC-B+B+A

@james: should this be merged with my EMD FT thread? (i was not aware of this topic at this point in time.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: Junna on September 15, 2011, 01:40:03 AM
Is this issue related to, or the same, perhaps, as the issue of multiple units with middle-trailer sections ending up with ends reversed towards one another?
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: sdog on September 15, 2011, 02:06:28 AM
Quote from: Junna on September 15, 2011, 01:40:03 AM
Is this issue related to, or the same, perhaps, as the issue of multiple units with middle-trailer sections ending up with ends reversed towards one another?
To me this sounds more like this happens as the bidirectional flag is set to zero for those end units. Only the "can lead from rear" flag is set. This doesn't matter if the unit is at the end of the consist, but if it is in the middle the other carriages are not turned around, but the end units require to be turned around.
back-bg.dat]dat for emu rear unit (https://github.com/jamespetts/simutrans-pak128.britain/blob/master/trains/br-410%5Bcep)
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: ӔO on September 28, 2011, 04:00:26 PM
In ex10.1, under the line management window, EMU and DMU units that are running in reverse have their heads facing the wrong direction, but it appears fine in the main game window.

Is this on purpose?
I don't think it's a big deal as it makes it a bit easier to figure out how many are going in which direction, but it's just something I noticed.
Title: Re: [9.12ex] [bug?] reverse auto reconfiguring convoys oddly
Post by: jamespetts on September 28, 2011, 09:44:08 PM
Hmm - this is not intended. I am not sure what causes this, however.