NIMBY Rails

NIMBY Rails

The NIMBY Rails Depot
Browse and subscribe to mods created by the community for NIMBY Rails.
adlet 18 24 Apr, 2024 @ 8:27pm
To Kalute: train dynamics
@Kalute Hey Kalute, you are doing great models which I love and have adopted a lot of them. I am finding a bit of a problem because of some the settings you use. I think the trains end up being underpowered.

For example, I am now creating a part of the Musashino line in Tokyo using E231-0 trains from your collection. These trains in NIMBY run my build from Fuchuhommachi to Minami Koshigaya (~half the real line) in just under 47 minutes - with both the track max speed at 95 km/h and line cruise speed at 95 km/h - which is the real life maximum but not a good practice to set in NIMBY. At a more realistic 75 km/h cruise speed it is over 50 minutes. Real-life mid-day schedule is for 45-46 minutes - and trains rarely go all the way up to 95 km/h - more like 70-75 km/h.

I looked into NIMBY power formulas (in the mod development guiide) to see what is causing this. The main factor seems to be the 2x the passenger limit. When NIMBY calculates the timetable, it always assumes maximum passengers to calculate how much time the train takes to run the line. So an extra 1266 passengers in this case at 80 kg each is about 100,000 kg more, increasing the weight from 310 tons to ~412 tons. This means (using the formulas in the mod development guide) at any speed the acceleration is ~25% less than it would be with the regular number of passengers.

The second factor is the maximum acceleration value (0.69). The way the formulas work in NIMBY, maximum acceleration is also included in the calculation of "maximum tractive effort". For E231-0, it is total empty weight 209,200 x acceleration 0.69 = 144 kN. Then you divide this by the total loaded train weight, and the actual acceleration will never be higher than this value. For a train with 310 tons (1266 passengers), this would be 0.46. For a train with 412 tons (2532 passengers), it would be 0.35. (It is also capped by the explicit maximum of 0.69 but in reality it never even gets close to that).

If you actually change the maximum acceleration to the standard 1.00, this would result in a real maximum of 0.67 i.e. close to what you are setting it to be. This factor only has an impact at speeds up to ~7 km/h but it results in reducing the acceleration by up to a good third at those speeds which adds probably a few extra seconds each time a train accelerates from stop. To illustrate the effect, the other E231-0 model here in the workshop has standard passengers and maximum acceleration of 1.00, and covers the same distance in about 2 minutes faster i.e. can fit into the real schedule.

I tried to see what combination of parameters might fix this issue and bring closer to real life train dynamics while leaving the passengers at 2x. One way can be to increase stated power by about a third (to about 500 kW per motor car) and stated acceleration to about 1.50. Note because of formulas the real maximum acceleration will then be ~0.76 ie close to real. And I know the actual car power is 380 kW... but it's not built for double capacity, and trains in the morning at peak capacity do take a few minutes more to run, but in NIMBY the timetable is always based on the maximum passengers. There probably can be other ways too. Sorry for a long post and thank you for your attention!
< >
Showing 1-10 of 10 comments
Kaluté 261 24 Apr, 2024 @ 9:07pm 
Hey there, thanks for bringing this issue to my attention.

I haven't found anything that states the actual acceleration in game is calculated assuming the train is full. The mod development guide says that it uses empty mass, and it doesn't mention anything about the game adding an extra 80kg per passenger, unless I just didn't see it. If it is the case however, the simplest way to address this problem from my perspective is just to reduce the empty weight of each car to reflect an average load to not maximum possible load. I also remember a much more experienced member of the community having mentioned that the stated max acceleration value only plays a small role in determining actual acceleration, with the tractive effort and weight values having far more importance.
Kaluté 261 24 Apr, 2024 @ 10:42pm 
I did some testing on this matter:

The stated capacity does not affect acceleration values, I ran two test units on parallel tracks, the only difference between them is one has 100 capacity and the other 1000. Their acceleration performance is exactly the same. However, for some reason the game seems to "assume" that trains with higher capacity will take longer to complete a leg, even if it does not. The game automatically assigned a higher "leg time" for the unit with higher capacity, even though the two units arrived at the next station at exactly the same time. This means that in practice the unit with the higher capacity had was forced to stop longer at each station, as it always arrived earlier than scheduled. I am not sure if this is intended behaviour as it seems very strange. I could not modify the leg time to custom timings either, as the game seems to think the unit with higher capacity cannot make the time, even though it literally does and just wait out the unnecessary time in the station. I'll probably raise this in the game's discord server.
Kaluté 261 24 Apr, 2024 @ 11:06pm 
You can check if you run my E231-0 in your save, is it being forced to wait an extra handful of seconds each stop? In my test save, the train displayed it was departing in over a minute when it arrived at the first stop, despite the stop time being set as 30 seconds, I suspect this is the reason behind the delays you are seeing. In your case, it is likely that the extra time is just 5-10 seconds per stop. I would reduce the default stop time to address it.
Weird and Wry  [developer] 25 Apr, 2024 @ 12:31am 
Originally posted by Kaluté:
The mod development guide says that it uses empty mass
It only mentions the empty mass being used when no units in the train have explicit tractive effort configured. This is a v1/simple mod failsafe feature. Do the units being discussed here have max_tractive_effort in the mod.txt?

About comparing legs of different capacity trains: as explained adlet, line legs are calculated assuming a full train with 80kg per pax.
Last edited by Weird and Wry; 25 Apr, 2024 @ 12:31am
Kaluté 261 25 Apr, 2024 @ 12:44am 
Thanks for your answer WAW.

The units being discussed do not have max_tractive_effort set.

As confirmed by dev, the leg times are calculated assuming the train is full, but the acceleration performance in game is not calculated with that assumption. Thus the only way I see to resolve this reasonably is by reducing the default stop time at each station, thus getting rid of the schedule padding the game automatically includes.
adlet 18 25 Apr, 2024 @ 7:15am 
Originally posted by Kaluté:
I did some testing on this matter:

The stated capacity does not affect acceleration values, I ran two test units on parallel tracks, the only difference between them is one has 100 capacity and the other 1000. Their acceleration performance is exactly the same. However, for some reason the game seems to "assume" that trains with higher capacity will take longer to complete a leg, even if it does not. The game automatically assigned a higher "leg time" for the unit with higher capacity, even though the two units arrived at the next station at exactly the same time. This means that in practice the unit with the higher capacity had was forced to stop longer at each station, as it always arrived earlier than scheduled. I am not sure if this is intended behaviour as it seems very strange. I could not modify the leg time to custom timings either, as the game seems to think the unit with higher capacity cannot make the time, even though it literally does and just wait out the unnecessary time in the station. I'll probably raise this in the game's discord server.

This is actually exactly the issue. There is a difference between the stated timetable in the Lines tab and the actual train running. The timetable is always based on full train, this is why the train with higher capacity has a timetable with longer leg times, it just cannot accelerate as fast as the other one. But when the two trains run with the same number of passengers, the actual run time is the same, because acceleration in actual run is based on actual weight, not maximum weight. And yes in my model the E231-0 running empty (in testing for now) ends up arriving 7-10 seconds earlier at each station and stopping for about 37-40 seconds instead of 30 seconds per the stated timetable.

I remember WaW mentioned 80 kg in one of the posts somewhere a while back... yes it's not in the guide but just as confirmed by him, it is true.

When you don't define the max_tractive_effort it is automatically calculated as [train empty weight] x [maximum acceleration]. You can check this in the E231-0, the max_tractive_effort is visible in the train tab (in the Total power line) and is 144kN. This is simply 0.69 x 209200. The actual train tractive effort also depends on the speed and defines how fast the train actually accelerates and is power (1520 kW) divided by speed, capped by 144 kN. The value will therefore be the highest when the speed is the lowest i.e. 1 km/h - and the cap will apply. At about 8km/h, 1520x0.75 / 8 = 142.5 kN, i.e. calculated value starts being less than the cap. At 144 kN maximum divided by fully loaded weight of 412,000 in the acceleration calculation for the line timetable, you get to a maximum acceleration of 0.35. This is why in theory the maximum acceleration does not matter, but in reality it does at lower speeds, because it is part of max_tractive_effort default calculation. Thus, if you increase the maximum acceleration, the train can generate higher acceleration at these low speeds because the calculated max_tractive_effort is higher.
Last edited by adlet; 25 Apr, 2024 @ 7:35am
Kaluté 261 25 Apr, 2024 @ 7:22am 
Originally posted by adlet:

This is exactly what I was talking about. There is a difference between the stated timetable in the Lines tab and the actual train running. The timetable is always based on full train, this is why the train with higher capacity has a timetable with longer leg times, it just cannot accelerate as fast. But when the two trains run with the same number of passengers, the actual run time is the same, because acceleration in actual run is based on actual weight, not maximum weight. And yes in my model the E231-0 running empty (in testing for now) ends up arriving 7-10 seconds earlier at each station and stopping for about 37-40 seconds instead of 30 seconds per the stated timetable.


I see, sorry I didn't quite understand what you meant the first time, I'm not certain if i can fix it on my end, as it is just a feature of the game. I would suggest making the default stop time 20 seconds therefore it would still be 30 seconds with the game's padding added. If the train still lags behind IRL timetables then I'm not quite sure what I can do, as I would like to not change power output or acceleration values away from the official published ones. However, you are free to edit them yourself in the mod.txt in that case.
adlet 18 25 Apr, 2024 @ 7:47am 
Originally posted by Weird and Wry:
Originally posted by Kaluté:
The mod development guide says that it uses empty mass
It only mentions the empty mass being used when no units in the train have explicit tractive effort configured. This is a v1/simple mod failsafe feature. Do the units being discussed here have max_tractive_effort in the mod.txt?

About comparing legs of different capacity trains: as explained adlet, line legs are calculated assuming a full train with 80kg per pax.


Originally posted by Kaluté:

I see, sorry I didn't quite understand what you meant the first time, I'm not certain if i can fix it on my end, as it is just a feature of the game. I would suggest making the default stop time 20 seconds therefore it would still be 30 seconds with the game's padding added. If the train still lags behind IRL timetables then I'm not quite sure what I can do, as I would like to not change power output or acceleration values away from the official published ones. However, you are free to edit them yourself in the mod.txt in that case.

No worries. I spent a couple of hours yesterday working my way through the formulas to see how it works and why and how much effect different factors have. Yes reducing the stop time perhaps is actually a good way to manage this.

Actually also a suggestion for Carlos on this, as I was thinking how these can be addressed. Does the line timetable have to calculate based on maximum passengers? I understand the rationale for this, i.e. the train will always be able to be on schedule no matter how many passengers.

But I think the best practice in NIMBY speed management is your line cruise speed should be lower than the maximum track speed (and the maximum train speed) so the trains can accelerate and cattch up to the schedule if they are delayed. Typically they are delayed by other trains getting in the way. But if you change line timetables to calculate for example based on 50% or 70% train capacity filled, they could also get occasionally delayed when they are full. So with the right speed settings, trains could also catch up to the timetable by running faster. This could also help emulate the real life effect of rush hour, where the trains typically do take longer to make a run. Given this setting can disrupt many existing timetables, perhaps this could be a line/line service level setting in one of the future versions, calculate timetable based on full capacity or some lower capacity.
xsrvmy 2 7 May, 2024 @ 11:30pm 
Originally posted by Weird and Wry:
Originally posted by Kaluté:
The mod development guide says that it uses empty mass
It only mentions the empty mass being used when no units in the train have explicit tractive effort configured. This is a v1/simple mod failsafe feature. Do the units being discussed here have max_tractive_effort in the mod.txt?

About comparing legs of different capacity trains: as explained adlet, line legs are calculated assuming a full train with 80kg per pax.
On the topic of this fail-safe, is there a reason why the fail-safe is not just some ridiculously high value? The values found online for max accel is probably for a full train right?
adlet 18 8 May, 2024 @ 7:11pm 
Originally posted by xsrvmy:
On the topic of this fail-safe, is there a reason why the fail-safe is not just some ridiculously high value? The values found online for max accel is probably for a full train right?

Don't know for sure but I presume it's for an empty train.
< >
Showing 1-10 of 10 comments
Per page: 1530 50