How to read Cargo Bot/Requester Chest Contents
Posted: Wed May 21, 2025 9:26 pm
How can I "read" cargo bot contents/requester chest contents or design a system that accounts for it.
Hello, I have run into a problem whilst designing a system to automatically craft different items. The system checks to see if an item can be crafted. It does this by looking at the Logistic storage network, being read from a roboport. If the item in question can be crafted (enough ingredients exist in the network to craft the desired number of whatever item), the system then sends a signal to set the crafting targets of a group of assemblers and the requests of requester chests. However, roboports/logistic storage only keeps track of items in buffer, storage, and passive provider chests with items carried by logistic robots, or scheduled to be carried counting against the logistic storage count. This causes the system to cancel the crafting of certain items shortly after the request, due to "thinking" there isn't enough materials once the request is sent. Cancellation is caused by an assembler cell detecting that the "logistic network storage" doesn't have enough stock to craft even a single desired item. This causes a lot of unnecessary movement of items/bots as the bots don't cancel their movement if a requester chest's request is cancelled. There is a "simple" solution of simply increasing the number/quota of materials to keep in stock, so once once logistic robots start taking things, there is still "enough" in storage to not trigger cancellation. However, this increases the number of resource I have to have "on hand" at any time, especially when looking at making quality products. As well as not preventing the problem from occurring, whilst the machine works towards reaching quota. For example one cell may be making batteries and the system sees that it can craft laser turrets, but as soon as it sets a cell to start crafting them, it reads the network and notices the number of batteries in the system has gone to 0, cancelling the laser turrets from being crafted, once cancelled eventually ingredients return to storage and the system detects it can craft laser turrets, and the cycle repeats until eventually resolving.
Sorry if this is overly confusing, this is the first roadblock on this multi-month long project I am unable to think of a reasonable solution to in a reasonable amount of time.
Hello, I have run into a problem whilst designing a system to automatically craft different items. The system checks to see if an item can be crafted. It does this by looking at the Logistic storage network, being read from a roboport. If the item in question can be crafted (enough ingredients exist in the network to craft the desired number of whatever item), the system then sends a signal to set the crafting targets of a group of assemblers and the requests of requester chests. However, roboports/logistic storage only keeps track of items in buffer, storage, and passive provider chests with items carried by logistic robots, or scheduled to be carried counting against the logistic storage count. This causes the system to cancel the crafting of certain items shortly after the request, due to "thinking" there isn't enough materials once the request is sent. Cancellation is caused by an assembler cell detecting that the "logistic network storage" doesn't have enough stock to craft even a single desired item. This causes a lot of unnecessary movement of items/bots as the bots don't cancel their movement if a requester chest's request is cancelled. There is a "simple" solution of simply increasing the number/quota of materials to keep in stock, so once once logistic robots start taking things, there is still "enough" in storage to not trigger cancellation. However, this increases the number of resource I have to have "on hand" at any time, especially when looking at making quality products. As well as not preventing the problem from occurring, whilst the machine works towards reaching quota. For example one cell may be making batteries and the system sees that it can craft laser turrets, but as soon as it sets a cell to start crafting them, it reads the network and notices the number of batteries in the system has gone to 0, cancelling the laser turrets from being crafted, once cancelled eventually ingredients return to storage and the system detects it can craft laser turrets, and the cycle repeats until eventually resolving.
Sorry if this is overly confusing, this is the first roadblock on this multi-month long project I am unable to think of a reasonable solution to in a reasonable amount of time.