[2.0.15] Disabled inserters holding item will still insert into train car
[2.0.15] Disabled inserters holding item will still insert into train car
I have inserters at a loading station disabled through a circuit condition. They will only enable when a train is sitting at the station and only if the train id does not match my "personal" train. I wanted to be able to stop at stations without having to worry about accidentally loading my train with unwanted items.
Blueprint of full station and train:
Note: I noticed my train id had changed when working to duplicate and I addressed that by updating the condition to ensure the id in the condition would match the train id. Also note the constant combinator below the track is disabled and not sending any signal on the circuit.
Combinator and inserter settings: Station layout with ore train being loaded:
Note: The other combinators are configured to enable/disable the station itself through train limit and priority and are not used to alter the inserter state Ore train has just left the station and personal train is entering:
Note: Only the two loading sections on the left have 5 x inserters actively holding 2 ore each, as only the first two cars in the ore train had a slot available
Personal train id 111, matching the above combinator rule, is at the station and has had 20 copper ore loaded, 10 in each of the first two cars. Space is available in all four cars but the last two did not have any ore loaded: Here you can see the inserters are in a disabled state due to the circuit configuration:
There appears to be a bug/undesired behavior where if an inserter is currently holding say copper ore, and is disabled, it will still insert that ore into a train car but will not insert any further ore. I can duplicate by having a "normal" ore loading train stop at the station with available space, accept some ore and leave the station. When I then send my "personal" train to the station it will load the ore the inserters are currently holding that they did not insert in the previous train. It's interesting to note that only inserters which were adjacent to a car on the previous ore train that had available space would then insert into the next train. So essentially only inserters which were actively engaged previously will show this behavior, while inserters which had nowhere to insert on the previous train will not.
Expected behavior would be for an inserter to remain completely disabled regardless if an available container/car is adjacent and regardless if the inserter is holding anything. As it is disabled, it should not perform any function except wait to be enabled.
Blueprint of full station and train:
Note: I noticed my train id had changed when working to duplicate and I addressed that by updating the condition to ensure the id in the condition would match the train id. Also note the constant combinator below the track is disabled and not sending any signal on the circuit.
Combinator and inserter settings: Station layout with ore train being loaded:
Note: The other combinators are configured to enable/disable the station itself through train limit and priority and are not used to alter the inserter state Ore train has just left the station and personal train is entering:
Note: Only the two loading sections on the left have 5 x inserters actively holding 2 ore each, as only the first two cars in the ore train had a slot available
Personal train id 111, matching the above combinator rule, is at the station and has had 20 copper ore loaded, 10 in each of the first two cars. Space is available in all four cars but the last two did not have any ore loaded: Here you can see the inserters are in a disabled state due to the circuit configuration:
There appears to be a bug/undesired behavior where if an inserter is currently holding say copper ore, and is disabled, it will still insert that ore into a train car but will not insert any further ore. I can duplicate by having a "normal" ore loading train stop at the station with available space, accept some ore and leave the station. When I then send my "personal" train to the station it will load the ore the inserters are currently holding that they did not insert in the previous train. It's interesting to note that only inserters which were adjacent to a car on the previous ore train that had available space would then insert into the next train. So essentially only inserters which were actively engaged previously will show this behavior, while inserters which had nowhere to insert on the previous train will not.
Expected behavior would be for an inserter to remain completely disabled regardless if an available container/car is adjacent and regardless if the inserter is holding anything. As it is disabled, it should not perform any function except wait to be enabled.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
Duplicate, said to be "not a bug" in 2019 67508
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: [2.0.15] Disabled inserters holding item will still insert into train car
It’s not so much as “not a bug” as much as “doing the opposite causes other problems as well”.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
I skimmed through most of that and wasn't able to find where it said not a bug. Looks like they made a change to it way back in alpha 0.15.22 then reverted in 0.15.23 when a bunch of people had their entire factory break. I wasn't totally clear on the timeline and initial behavior prior to the changes. Nowhere was it clear to me that a disabled inserter holding something should be expected to still drop it, once able. Seems like if you're telling something to turn itself off then it should, no matter the state. But that would be intuitive..
Re: [2.0.15] Disabled inserters holding item will still insert into train car
You're right, I based my statement on the subforum the thread was sorted into by the mods.
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: [2.0.15] Disabled inserters holding item will still insert into train car
viewtopic.php?f=11&t=49170
I've never done circuit setups relying on this so am not at all familiar with how they are configured. Seems like this should have just been a config option to satisfy different approaches to inserter management. Without having the ability to read individual train cars or setting up weird "cleanup" trains or taking up train stop space to have cleanup inserters, there doesn't seem to be a straightforward way to deal with my use case, outside of never having a train stop at a station it isn't meant to interact with. This also means you can't have a mixed car train unless you always have the same resource at the same car length, without jumping through the above hoops.
Ok, this finally clicked for me...0.15.22 is where they decided to keep the item in hand when disabled and not drop it until enabled again. And it's stated that making this change will break stuff. Then a bunch of people complained since their setups were predicated on always assuming a grabbed item will be dropped, no matter what. So they reverted back to a held item always drops when a suitable container is available, even when it is disabled/unpowered.Twinsen wrote: ↑Tue Jun 20, 2017 1:11 pm Not necessarily a bug. Inserters finish dropping what they are holding when disabled.
But seeing this use case I believe it is better to have them keep the item in hand if disabled.
This change will break some contraptions, but let me know if anything significant breaks.
Changed in Version: 0.15.22.
I've never done circuit setups relying on this so am not at all familiar with how they are configured. Seems like this should have just been a config option to satisfy different approaches to inserter management. Without having the ability to read individual train cars or setting up weird "cleanup" trains or taking up train stop space to have cleanup inserters, there doesn't seem to be a straightforward way to deal with my use case, outside of never having a train stop at a station it isn't meant to interact with. This also means you can't have a mixed car train unless you always have the same resource at the same car length, without jumping through the above hoops.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
Another thought, I'm not sure why we can't just read the state of an inserter (disabled, waiting to drop item, etc.) then have the ability to control the inserter behavior based on its status. Maybe some UPS/performance consideration. I assume this was discussed somewhere over the last 7-8 years.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
You can middle click with an item in hand to reserve that slot in a train cart for a specific item.
If that works for you, you can setup those carts so all the slots are reserved for specific item(s) so the copper can never get inserted into those carts period.
If that works for you, you can setup those carts so all the slots are reserved for specific item(s) so the copper can never get inserted into those carts period.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
That's an idea anyway. Problem is I fill them up randomly depending on what I'm working on so wouldn't work very well for my use case, unless I doubled up the cars but then I have issues fitting into areas designed for small trains. Simplest solution would be to just let us decide the behavior. Obviously this was discussed at length many years ago so don't expect any traction at this point. I'll just deal with it.MechBFP wrote: ↑Fri Nov 15, 2024 12:45 am You can middle click with an item in hand to reserve that slot in a train cart for a specific item.
If that works for you, you can setup those carts so all the slots are reserved for specific item(s) so the copper can never get inserted into those carts period.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
This is actually a common issue in LTN, especially with providers that supply multiple items. The recommended approach is to make sure there's enough space in the wagon before you load it. Set a condition to enable the inserters of contents <= (cars*40*stack size)-(inserter count*inserter stack count). This will ensure the items are fully unloaded before being disabled. (The only downside is that the cargo wagon is not filled fully)lazrfloyd wrote: ↑Fri Nov 15, 2024 12:35 am viewtopic.php?f=11&t=49170Ok, this finally clicked for me...0.15.22 is where they decided to keep the item in hand when disabled and not drop it until enabled again. And it's stated that making this change will break stuff. Then a bunch of people complained since their setups were predicated on always assuming a grabbed item will be dropped, no matter what. So they reverted back to a held item always drops when a suitable container is available, even when it is disabled/unpowered.Twinsen wrote: ↑Tue Jun 20, 2017 1:11 pm Not necessarily a bug. Inserters finish dropping what they are holding when disabled.
But seeing this use case I believe it is better to have them keep the item in hand if disabled.
This change will break some contraptions, but let me know if anything significant breaks.
Changed in Version: 0.15.22.
I've never done circuit setups relying on this so am not at all familiar with how they are configured. Seems like this should have just been a config option to satisfy different approaches to inserter management. Without having the ability to read individual train cars or setting up weird "cleanup" trains or taking up train stop space to have cleanup inserters, there doesn't seem to be a straightforward way to deal with my use case, outside of never having a train stop at a station it isn't meant to interact with. This also means you can't have a mixed car train unless you always have the same resource at the same car length, without jumping through the above hoops.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
Alternatively you can setup an inserter that is setup with a filter that removes copper or whatever from the train cart at those stops. So the copper gets added but removed a fraction of a second later.lazrfloyd wrote: ↑Fri Nov 15, 2024 12:53 amThat's an idea anyway. Problem is I fill them up randomly depending on what I'm working on so wouldn't work very well for my use case, unless I doubled up the cars but then I have issues fitting into areas designed for small trains. Simplest solution would be to just let us decide the behavior. Obviously this was discussed at length many years ago so don't expect any traction at this point. I'll just deal with it.MechBFP wrote: ↑Fri Nov 15, 2024 12:45 am You can middle click with an item in hand to reserve that slot in a train cart for a specific item.
If that works for you, you can setup those carts so all the slots are reserved for specific item(s) so the copper can never get inserted into those carts period.
Then you can just disable it when the other inserters are enabled.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
Yeah I get you can force inserters to sync then disable before filling the train. However, if they get out of sync like if a train is sitting at an unload station and the output isn't balanced due to how half a belt will activate depending on how it is being unloaded, then you could have a car that has fewer slots taken up and eventually that could mean the others are filled when loading and still end up with the same problem. And it's an over complicated mess. I'm not doing anything crazy that would require it outside of addressing this issue so a lot of work for not much gain. I don't plan to use trains that deal with more than one item.danbopes wrote: ↑Fri Nov 15, 2024 12:56 amThis is actually a common issue in LTN, especially with providers that supply multiple items. The recommended approach is to make sure there's enough space in the wagon before you load it. Set a condition to enable the inserters of contents <= (cars*40*stack size)-(inserter count*inserter stack count). This will ensure the items are fully unloaded before being disabled. (The only downside is that the cargo wagon is not filled fully)lazrfloyd wrote: ↑Fri Nov 15, 2024 12:35 am viewtopic.php?f=11&t=49170Ok, this finally clicked for me...0.15.22 is where they decided to keep the item in hand when disabled and not drop it until enabled again. And it's stated that making this change will break stuff. Then a bunch of people complained since their setups were predicated on always assuming a grabbed item will be dropped, no matter what. So they reverted back to a held item always drops when a suitable container is available, even when it is disabled/unpowered.Twinsen wrote: ↑Tue Jun 20, 2017 1:11 pm Not necessarily a bug. Inserters finish dropping what they are holding when disabled.
But seeing this use case I believe it is better to have them keep the item in hand if disabled.
This change will break some contraptions, but let me know if anything significant breaks.
Changed in Version: 0.15.22.
I've never done circuit setups relying on this so am not at all familiar with how they are configured. Seems like this should have just been a config option to satisfy different approaches to inserter management. Without having the ability to read individual train cars or setting up weird "cleanup" trains or taking up train stop space to have cleanup inserters, there doesn't seem to be a straightforward way to deal with my use case, outside of never having a train stop at a station it isn't meant to interact with. This also means you can't have a mixed car train unless you always have the same resource at the same car length, without jumping through the above hoops.
Re: [2.0.15] Disabled inserters holding item will still insert into train car
This would mean taking up valuable real estate and degrading throughput. In my current factory state this wouldn't be an issue but could have an impact later if I'm trying to maximize. Obviously only applies when double loading from both sides...although might be able to get6 creative with the layout and get some long reach inserters going to handle a cleanup...MechBFP wrote: ↑Fri Nov 15, 2024 12:57 amAlternatively you can setup an inserter that is setup with a filter that removes copper or whatever from the train cart at those stops. So the copper gets added but removed a fraction of a second later.lazrfloyd wrote: ↑Fri Nov 15, 2024 12:53 amThat's an idea anyway. Problem is I fill them up randomly depending on what I'm working on so wouldn't work very well for my use case, unless I doubled up the cars but then I have issues fitting into areas designed for small trains. Simplest solution would be to just let us decide the behavior. Obviously this was discussed at length many years ago so don't expect any traction at this point. I'll just deal with it.MechBFP wrote: ↑Fri Nov 15, 2024 12:45 am You can middle click with an item in hand to reserve that slot in a train cart for a specific item.
If that works for you, you can setup those carts so all the slots are reserved for specific item(s) so the copper can never get inserted into those carts period.
Then you can just disable it when the other inserters are enabled.