Page 1 of 1

[0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Sun Jul 03, 2016 2:48 pm
by siggboy
If you create a "circuit condition" on a train schedule for a station, then the station ignores the condition completely until red or green wire is attached to the station (i.e. until it becomes part of any circuit network). The wire can be "empty", for example simply connected to an electric pole on the other end.

Until that has happened, any trains will immediately leave the station, and never stop there (unless you also set additional conditions).

If you remove the wire, and the station becomes disconnected again, the circuit condition remains active, and a train will then wait indefinitely at the station.

So it appears as if the circuit condition only becomes "active" when the train station enters a circuit network.

In my opinion it should be active right away, even before the station is connected to any wire (since this is also the state it's in when you connect and disconnect a wire).

The underlying problem seems to be that the option "send circuit signals to train" is not active until you connect a wire to the station. When you connect a wire, it becomes active, and remains active even when the train station leaves the wire network. So a fix for this problem would be to let the "send circuit signals to train" option be active by default, after a train station is placed, and even before a wire gets connected (the option is not accessible in the UI before you connect a wire).

Edit: actually, after thinking about it, even if the "Mode of operation" is not "Send to train", the train should not simply ignore the condition and leave. If "Send to train" is disabled, and the only condition on the train station is a circuit condition, then the train should simply wait forever. The condition can never be true, after all. The train leaving is wrong behaviour in my opinion.

Re: [0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Tue Jul 05, 2016 4:04 pm
by Twinsen
Fixed in Version: 0.13.6

A train with a circuit condition will now always stay at the station if no wire is connected.
Unchecking "Send To Train" will also make the train wait indefinitely.

Re: [0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Tue Jul 05, 2016 4:50 pm
by siggboy
Awesome, thanks! :mrgreen:

Re: [0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Tue Jul 05, 2016 5:03 pm
by Choumiko
Twinsen wrote:Fixed in Version: 0.13.6
Unless it's a typo, that means 0.13.5 today?! :mrgreen:

Re: [0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Tue Jul 05, 2016 5:30 pm
by siggboy
Twinsen wrote:A train with a circuit condition will now always stay at the station if no wire is connected.
Unchecking "Send To Train" will also make the train wait indefinitely.
Quick follow-up question (I hope somebody is still reading):

Let's say I have "Condition foo > 0 OR Cargo empty" as my conditions, and then I disable "send to train" or disconnect the wire. Will the train still observe the second condition in the disjunction (i.e. will it leave when the cargo is empty)?

I assume it's the case but you weren't explicit about this so I'm asking.

Re: [0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Wed Jul 06, 2016 9:34 am
by Twinsen
Choumiko wrote:
Twinsen wrote:Fixed in Version: 0.13.6
Unless it's a typo, that means 0.13.5 today?! :mrgreen:
I fixed it just as we were releasing, so it's in 0.13.6.
siggboy wrote: Quick follow-up question (I hope somebody is still reading):

Let's say I have "Condition foo > 0 OR Cargo empty" as my conditions, and then I disable "send to train" or disconnect the wire. Will the train still observe the second condition in the disjunction (i.e. will it leave when the cargo is empty)?

I assume it's the case but you weren't explicit about this so I'm asking.
The condition will evaluate to "FALSE OR Cargo empty", so it will leave when Cargo empty.

Re: [0.13][Twinsen] Train ignores circuit cond. until connected.

Posted: Wed Jul 06, 2016 9:48 am
by siggboy
Perfect, so having no wire or disabling the circuit input will make the conditions all evaluate to FALSE. Very good, thanks again, I'm loving all the new circuit stuff BTW, well done and keep up the good work!