Unsetting the depot when train full still sends train
Moderator: Optera
Unsetting the depot when train full still sends train
When a fluid train comes in that has fluids left I turn of the depot signal for that station. The idea was that the train then no longer gets send out for errants.
The problem is that the train still gets send out. Or I suspect rather the new schedule gets set before the decider combinator can react to the train contents and shut down the depot.
Is there any way to make LTN assign schedules 2+ ticks after the train has arrived so the decider combinator has time to act?
The problem is that the train still gets send out. Or I suspect rather the new schedule gets set before the decider combinator can react to the train contents and shut down the depot.
Is there any way to make LTN assign schedules 2+ ticks after the train has arrived so the decider combinator has time to act?
Re: Unsetting the depot when train full still sends train
LTN provides a configurable inactivity timer to clean out trains before they can leave the depot.
My Mods: mods.factorio.com
Re: Unsetting the depot when train full still sends train
Yes, but I think the desired behavior here is this: "If a train arrives at the depot with cargo, something is wrong. Instead of patching it up and limping along, stop that train, and sound an alarm so I can go look at the train and figure out what broke." This is easy to handle with the delay timer for items; just stick an inserter and chest next to the tracks and sound a speaker if the chest has anything in it. You need space for the train-stop, so you have space for a wagon-cleaner too.
But for fluids, this requires building quite a bit of infrastructure for something that isn't supposed to happen at all. Even with vanilla fluids, trying to reliably empty any of the eight possible fluids is a pain. The only reliable solution I can come up with uses eight separate pumps per wagon, plus an inventory sensor. I have no idea at all how to do it with Bob's 30 fluids.
mrvn: As a workaround, would it work to force every train through something like this on approach to the depot? It'll block trains with cargo, only, but I haven't attached an alarm. (using inventory sensor)
But for fluids, this requires building quite a bit of infrastructure for something that isn't supposed to happen at all. Even with vanilla fluids, trying to reliably empty any of the eight possible fluids is a pain. The only reliable solution I can come up with uses eight separate pumps per wagon, plus an inventory sensor. I have no idea at all how to do it with Bob's 30 fluids.
mrvn: As a workaround, would it work to force every train through something like this on approach to the depot? It'll block trains with cargo, only, but I haven't attached an alarm.
Code: Select all
0eNq9VluumzAU3Is/K1wF51k+7m8X0M+qQg6cJEcCG9mGNIq8gO6jK+tKakNuQAlJIPcqP0jGx+PjGWbMkayzEgqFwpDoSDCRQpPo55Fo3Aqe+XfmUACJCBrISUAEz/2IKzS7HAwmNJH5GgU3UhEbEBQp/CZRaIOHGCkkmILqB2D2V0BAGDQITUf14BCLMl+DcjuccTwq1SC0AwhIIbVbI4Xf1uHQeUAOJJo45BQVJM3ULCDupEbJLF7Djlfolrr6DWYG1A0CKlSmdG/afUV12pamYBw0pHTPtw7fevjSUxqOYgSVFLTIuIEOxKrLSf1aiOYc2gOF/qEg7XKEbjR1laiSEk09DD2fWwUgLgvZVaG1vtcLvtkD7a+Zn37t5Z71c9+ixm46xfMBN6i0iT8ohwYP6pG14Z5V6pSRBSjeNEW+OCBZmqL84Fb2hkK91Ie1oGywgr3CTO8Z6lqVcJQqJ8gnJWkqKPBk13zQ7+xP/CAvuKqbjMjbGPZPqD8ayOIQ10aJN0rmMQqHQaINzzTY4WYJO7z2eILd1Wl+Xdyn02xYYE1emleZdDpIgxU8HVqK7+leyrQDwDqR9RggkW6yXTxbnldPxwTefJhd5qPs8kq3DNHnMw30/RMNNBuTZOzCbYthyi3G3kAvvoC6tJ7um3Fh1r2P6HOC2qf9cj/jljc0WXZiADN6avVKiV4dFv06vDeVZFLD+fBGldA2rIC35Nbfajt3Fu9Z7W677N+fv2QEw4u+i8H9htXxF3X+vANSuRhvSFktGVuF3yZLZu1/eFQAQQ==
- Attachments
-
- Empty trains only.png (442.05 KiB) Viewed 2765 times
Re: Unsetting the depot when train full still sends train
How to savly clean out fluids/gases? I dont know a way. (i cant make one pump for every gas and fluid in bobs)
Please add option to stop trains at depot with something in it. maybe giving us also a signal so we can use the speakers.
@dale, what mod i need for this? How to use this?
Please add option to stop trains at depot with something in it. maybe giving us also a signal so we can use the speakers.
@dale, what mod i need for this? How to use this?
Re: Unsetting the depot when train full still sends train
That needs one of Optera's other mods, Inventory Sensor.
is a better blueprint string, but it still needs to be modified to match the train lengths you use.
There are three groups of combinators in this new blueprint. The front (right) group is for whole-train stuff. The other two groups read individual wagons and their contents. Copy those two wagon groups as necessary until you can read every wagon (you do not need to read any trailing locomotives) in your longest train.
Then build this structure in appropriate locations so every train must pass it when approaching or departing your depot station. (Clarifying edit: Pick one of the two. There's no reason to do both.) I recommend a two-track or three-track stacker on approach to your depot station.
It will now work, but there is no alarm. Determine how you'd like it to alarm, and wire that up appropriately. Alarming when the Each-to-S decider combinator outputs S is probably the correct thing, but you may want to look at its input so you can give different alarms. I'm not sure how to do that both easily and usefully, though.
If your trains do not start with locomotives, you'll need to modify the front group to handle that. (This is left as an exercise for the reader.)
Code: Select all
0eNrtV02OmzAUvouXFYyCyQ+w6LYH6LIaIQdeEktgI9ukjSIO0Hv0ZD1JbchAhgmJPUlnNRsk8+z3Pt73vk/4iNZFDZWgTKHkiGjGmUTJjyOSdMtIYd6pQwUoQVRBiTzESGlWgtACNR6iLIdfKAmaZw8BU1RR6M63i0PK6nINQm8I+6MmkS+BSS50vopLfYgzU0kn8oPZ08JDB33iaaHz51RA1sXnHtLoWLeUZn9gHgLy84JUrwKzlYqspqpbN97r+GIcf26asz096HkPOoeM5iD8jJdryoi6iD1ugeMxcNwCV4IX6Rp2ZE/1YX3ilDLVsZz237ShQqr0Tff3VKhavxm6yPanJvo5KF0Kcv8n2ep6TVtOKmIonZlFWRHRQk7QV52B16qqbWp0O3zYgzioHWXbLnd10JhrptKN4GVKmU6GEiVqaBp7ikLdcw/hqfCIITzF0KIHSwRVuxIUzWxICixJGrL+D54kmKTpQJcfaHoq0Gy1oNAXF7qulHogM/MxMyNtRZbMLS0NIXyAH6xu+EFk6QcrNz/An35gTdHy+tTZTlXk7Af40w/uYmZ1ww8WN+KxpfZiJ+2FTqzeJ70XWZBs93ixfb+isQ0ppJPILqhomlkc2GkOz+ycfH6/kY8hTQ2L2ecwLMsPHJZLoiy4RscV3cPj5+fbA+cHz65bQXxd6hhbsoddTTz6WA8/b+3Jst30fG7p/vtIdaEtcJJ9OEVL+Or255/QviEjntL58jIdL9Cygkvoe2D+HwbYAsjQ43Zsh1jP4XspnBbc399/kEuj8SXH1Dfj9u6cnF21PaT/oWTXlWiFcRTEsxVumn9H6Vqs
There are three groups of combinators in this new blueprint. The front (right) group is for whole-train stuff. The other two groups read individual wagons and their contents. Copy those two wagon groups as necessary until you can read every wagon (you do not need to read any trailing locomotives) in your longest train.
Then build this structure in appropriate locations so every train must pass it when approaching or departing your depot station. (Clarifying edit: Pick one of the two. There's no reason to do both.) I recommend a two-track or three-track stacker on approach to your depot station.
It will now work, but there is no alarm. Determine how you'd like it to alarm, and wire that up appropriately. Alarming when the Each-to-S decider combinator outputs S is probably the correct thing, but you may want to look at its input so you can give different alarms. I'm not sure how to do that both easily and usefully, though.
If your trains do not start with locomotives, you'll need to modify the front group to handle that. (This is left as an exercise for the reader.)
Last edited by DaleStan on Sun Aug 12, 2018 5:45 am, edited 1 time in total.
Re: Unsetting the depot when train full still sends train
I'd use the train stop to read inventory for item trains. It updates faster and has magnitudes less performance impact than IS polling for wagons.
Inventory Sensor is only required for tankers since Factorio will round 0.4 down to 0 when converting from float to int. (see Know Issues)
Inventory Sensor is only required for tankers since Factorio will round 0.4 down to 0 when converting from float to int. (see Know Issues)
My Mods: mods.factorio.com
Re: Unsetting the depot when train full still sends train
Yes. I'm using Inventory Sensor because I'm trying to detect non-empty tankers. As a bonus, I can use IS to do that detection before the train arrives at the depot stop. It's definitely a heavy-handed solution, but it achieves the initial goal of preventing LTN from sending the dirty train out to load some other fluid.
Re: Unsetting the depot when train full still sends train
thanks, i tried to get this working, but without success. trains were running for 2 hours without problem but then again they jammed up and i didnt saw it instant... all stations need to be replaced... AGAIN..
I tried your blueprint but cant seem to get it work.
Cna u help me?
I have 1L-4T-1L
t = tank
I tried your blueprint but cant seem to get it work.
Cna u help me?
I have 1L-4T-1L
t = tank
Re: Unsetting the depot when train full still sends train
Also i cant build the inventar sensor... where do i get it? I installed the mod fresh...
nvm. i need to research it first xD
I cant build it.
always when i place it near a rail the signal will be removed... i guess u need to bp with rail...
i tried G > and < 0 (but dont know what it should be) for the signal
Can you just give me a working blueprint? I pay u .... i just wanna come home and play.... this feature should be so hard implemented in LTN
Okay if i place the bp horizontal, i can see what the signal should be, but still, not working i guess bc its 1-4-1, tried chaning numbers, cant get it to work.. i dont even understand this whole system.
nvm. i need to research it first xD
I cant build it.
always when i place it near a rail the signal will be removed... i guess u need to bp with rail...
i tried G > and < 0 (but dont know what it should be) for the signal
Can you just give me a working blueprint? I pay u .... i just wanna come home and play.... this feature should be so hard implemented in LTN
Okay if i place the bp horizontal, i can see what the signal should be, but still, not working i guess bc its 1-4-1, tried chaning numbers, cant get it to work.. i dont even understand this whole system.
Re: Unsetting the depot when train full still sends train
Yes, inactivity works around this problems for solid goods. But you can't pump out fluids with Bobs+Angles because there are more than 12 liquids and gases and you can only place 12 pumps per wagon. But even with solids you get problems with timeouts, because the time to unload a train adds to the overall time of a delivery. I would rather use a different train that's empty already.Optera wrote:LTN provides a configurable inactivity timer to clean out trains before they can leave the depot.
The problem is that LTN assigns the schedule the moment the train arrives at the depot. If LTN would wait then one could disable the station before the next schedule is assigned to the train. Take the train out of rotation till it's ready again.
So the timeline should be this:
Tick N+0: train arrives at station, triggers event, station sends train content, LTN resets schedule to keep train in depot
Tick N+1: decider combinator sees train content and stops sending depot signal / sends different signal to disable station
Tick N+2: train station might have lost depot signal or was disabled
Tick N+x: if station is still an active depot then assign new delivery schedule
Not sure if train station disable needs their own tick. On the other hand inventory sensor is slower. So why not wait 60 ticks and set the inactivity timeout to 2s to compensate. Would be faster overall.
Re: Unsetting the depot when train full still sends train
Can you please provide a blueprint for 1-4-1 which disable the signal if fluid is detectet? Both lokos have each 100 fuel in it, if that matters. If it works i can pay u via pp.DaleStan wrote:That needs one of Optera's other mods, Inventory Sensor.
is a better blueprint string, but it still needs to be modified to match the train lengths you use.Code: Select all
0eNrtV02OmzAUvouXFYyCyQ+w6LYH6LIaIQdeEktgI9ukjSIO0Hv0ZD1JbchAhgmJPUlnNRsk8+z3Pt73vk/4iNZFDZWgTKHkiGjGmUTJjyOSdMtIYd6pQwUoQVRBiTzESGlWgtACNR6iLIdfKAmaZw8BU1RR6M63i0PK6nINQm8I+6MmkS+BSS50vopLfYgzU0kn8oPZ08JDB33iaaHz51RA1sXnHtLoWLeUZn9gHgLy84JUrwKzlYqspqpbN97r+GIcf26asz096HkPOoeM5iD8jJdryoi6iD1ugeMxcNwCV4IX6Rp2ZE/1YX3ilDLVsZz237ShQqr0Tff3VKhavxm6yPanJvo5KF0Kcv8n2ep6TVtOKmIonZlFWRHRQk7QV52B16qqbWp0O3zYgzioHWXbLnd10JhrptKN4GVKmU6GEiVqaBp7ikLdcw/hqfCIITzF0KIHSwRVuxIUzWxICixJGrL+D54kmKTpQJcfaHoq0Gy1oNAXF7qulHogM/MxMyNtRZbMLS0NIXyAH6xu+EFk6QcrNz/An35gTdHy+tTZTlXk7Af40w/uYmZ1ww8WN+KxpfZiJ+2FTqzeJ70XWZBs93ixfb+isQ0ppJPILqhomlkc2GkOz+ycfH6/kY8hTQ2L2ecwLMsPHJZLoiy4RscV3cPj5+fbA+cHz65bQXxd6hhbsoddTTz6WA8/b+3Jst30fG7p/vtIdaEtcJJ9OEVL+Or255/QviEjntL58jIdL9Cygkvoe2D+HwbYAsjQ43Zsh1jP4XspnBbc399/kEuj8SXH1Dfj9u6cnF21PaT/oWTXlWiFcRTEsxVumn9H6Vqs
There are three groups of combinators in this new blueprint. The front (right) group is for whole-train stuff. The other two groups read individual wagons and their contents. Copy those two wagon groups as necessary until you can read every wagon (you do not need to read any trailing locomotives) in your longest train.
Then build this structure in appropriate locations so every train must pass it when approaching or departing your depot station. (Clarifying edit: Pick one of the two. There's no reason to do both.) I recommend a two-track or three-track stacker on approach to your depot station.
It will now work, but there is no alarm. Determine how you'd like it to alarm, and wire that up appropriately. Alarming when the Each-to-S decider combinator outputs S is probably the correct thing, but you may want to look at its input so you can give different alarms. I'm not sure how to do that both easily and usefully, though.
If your trains do not start with locomotives, you'll need to modify the front group to handle that. (This is left as an exercise for the reader.)
Re: Unsetting the depot when train full still sends train
@DaleStan and @nuhll: Please make a separate thread about cleaning out trains with inventory. That is off-topic to this thread.
Re: Unsetting the depot when train full still sends train
Its not off topic.
This problem we have also.
This problem we have also.