Recently I found a problem while making a train scheduling system
After the wait condition is reached and Destination full
As shown
TrainID signal disappeared but TrainCount signal still exists?
At this time, is the train still in the station or not in the station?
Is this a bug or a feature?
Re: Is this a bug or a feature?
Train is no longer waiting at the station, but it has not departed yet, so it has not released its reservation at the stop yet. This is important so that another train does not path to the stop while there is no space for it. It does, however, mean that you cannot make two trains "swap stations" if both stations have a train limit of 1.
My mods: Multiple Unit Train Control, Smart Artillery Wagons
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Maintainer of Vehicle Wagon 2, Cargo Ships, Honk
Re: Is this a bug or a feature?
It depends who ask the question
At this time the train is not in the station for the purpose of inserters that would load material onto the wagon, or for the purpose of transmitting the train inventory to the wire network through the station.
However, the train is still at the station for the purpose of the train pathfinding that could otherwise send another train to a station if it was considered empty.
To make things less confusing the proper wording according to the wiki advise to use "train stop" when refering to the 2x2 piece of building, while "train station" is used for the schedule.
Here that would be the train stop, the train is still at the train stop, if the limit to that train stop is 1, the train count as 1. But if you set up the train departure condition to wait 20 sec, the inserter/pump will only be seeing the train for 20 sec even if the train stays at the train stop for 2 minutes before being allowed to move again.
Re: Is this a bug or a feature?
yes I found the problem when trying something like make two trains "swap stations"robot256 wrote: ↑Mon May 23, 2022 3:50 pm Train is no longer waiting at the station, but it has not departed yet, so it has not released its reservation at the stop yet. This is important so that another train does not path to the stop while there is no space for it. It does, however, mean that you cannot make two trains "swap stations" if both stations have a train limit of 1.
Currently my solution is when the TrainID signal disappears
Send -1 TrainCount signal to destination station
Anyway, just make sure it's a feature
thanks