Negative Amount in Logistics Network

Bugs that are actually features.
Post Reply
phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Negative Amount in Logistics Network

Post by phi1010 »

The negative amounts described in https://wiki.factorio.com/Logistic_netw ... ve_numbers do not seem to work reliably:

Works: While there are 50 items requested, but only 20 available, the item count is -30.

Fails: While there are 50 items requested, but none available, the item count is not present.
I'd expect a value of -50 here, causing all connected components to start working to fulfill the request.

Loewchen
Global Moderator
Global Moderator
Posts: 8285
Joined: Wed Jan 07, 2015 5:53 pm
Contact:

Re: Negative Amount in Logistics Network

Post by Loewchen »

Those are internal mechanics of the game. Unless you can show a gameplay part based on those mechanics that is working incorrectly, there is no issue.

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Negative Amount in Logistics Network

Post by BenSeidel »

It's not about the amount being requested vs the amount available, but the amount available vs the amount that the robots are trying to pickup.
I can't seem to find numbers where your examples would work, as the max cargo size in vanilla is 4, so I'm going to assume you have a mod that allows you to get them to collect 5 items at a time, for the explanation.
In your example you could have had 10 supplier chests each with two items in each of them, this would cause 10 robots (one for each supplier chest) to go and pick up the items. If the robots can pick up 5 items each, then they will "reserve" 5 items from each chest, leaving a deficit of 3 items for each robot. It's the total of this deficit that you are measuring, in this case 10 * -3 = -30.
While there are 50 items being requested, but none available, no robots get dispatched. This means that you get deficit of 0 * -5 = 0, hence no signal.

IMO this system is better than one that takes the currently requested and subtracts it from the currently available as there exist other mechanisms to do that (more manual though) and there is no other way of knowing if you are flooding your robotic network except for the -ve signal because there is no way to count items in flight.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

I don't understand the reference to "internal mechanics".
The whole game consists of internal mechanics exposed to the user -- and to me, this specific mechanic does seem to expose unexpected and probably unintended behaviour -- in the latter case, a bug.

As far as I understand, the use case of the negative amounts is indending to signalize a deficit, to allow the user to build circuits to respond to that deficit. Is there another use-case for this behaviour?

For Example:
I built some assemblies, whose inserters are only enabled if there is a deficit for the product requested.
This works fine, until at some point, the deficit used up everything I had in reserve.
At that point, the deficit seems to be gone (not a negative number anymore), so my assemblies stop -- although they should be running at maximum speed.

It looks like a linear function, yet, in the last line, it behaves weird, not returning the difference as described in the wiki documentation.
I could not find an intention why this works like this -- and probably, this result was not the intention of the developer.

50 requested, 51 available -> Output: 1
50 requested, 50 available -> Output: 0
50 requested, 49 available -> Output: -1
...
50 requested, 3 available -> Output: -47
50 requested, 2 available -> Output: -48
50 requested, 1 available -> Output: -49
50 requested, 0 available -> Output: 0

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

BenSeidel wrote:It's not about the amount being requested vs the amount available, but the amount available vs the amount that the robots are trying to pickup.
Ah, then this was my misunderstanding. Still, I am not sure whether this solves the Use Case that it was developed for.

@Loewchen: Move this to feature requests please, if you do not deem it to be a bug.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

BenSeidel wrote: but the amount available vs the amount that the robots are trying to pickup
BenSeidel wrote:and there is no other way of knowing if you are flooding your robotic network except for the -ve signal
With flooding you mean transporting more items than the current number of robots can? What do you mean with the "-ve" signal?

I'd usually look at the "available robots" number of an roboport, and start manufacturing new ones slowly, if this drops to zero.
BenSeidel wrote:because there is no way to count items in flight.
Mh, well, another unexpected realization, at least to me -- after checking it right now.
"Read Logistic Network Contents" / "Read the available items from the logistic network of the roboport" (tooltip) did not sound as if it would exclude the items on the way from an active provider chest to a roboport storage chest; "available" sounded a lot like "there and not yet requested somewhere" (aka: everything in any logistic chest -- requesters too -- or robot, minus everything requested anywhere), or at least "exists somewhere outside a requester chest and is not currently on the way to it".

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

BenSeidel wrote:as there exist other mechanisms to do that (more manual though)
Do there? Of course, all chests could be connected using a single wire and an constant combinator next to each requester, but I don't see where I can find out what items players and construction ghosts request and need to be manufactured.

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Negative Amount in Logistics Network

Post by BenSeidel »

phi1010 wrote:but I don't see where I can find out what items players and construction ghosts request and need to be manufactured
The construction ghosts has been kicking around the forums for a long time, Twinsen even said he was thinking about it. It'll come eventually. However, your suggestion won't allow this to occur anyway as construction robot requests don't have a requestor chest source.

As for player requests, why would you need to read this? It's a serious question as even trying to implement a lean factory (only ever produce what you absolutely need), you would be subjecting yourself to having to wait for the items to be manufactured. If that is your requirement, set up a constant combinator as an "item requestor" that will trigger the manufacturing of the items required, again, more manual - but doable. If you don't want to wait for the items the the current system works.

Don't get me wrong, the current logistics network item reading is currently extremely lacking as you can't read many things that you may need to read (such as items in-flight), but changing it to the system proposed is an even worse solution, especially as there already exists the circuit network that allows you to do everything this change would allow. It sounds to me that you find the circuit network to be too much of a pain to set up so you want a wireless solution? If you could give an example of what you are trying to achieve that you can't achieve through the current system, or let us know why you think that the change would make better gameplay then that would be a better discussion.
phi1010 wrote: With flooding you mean transporting more items than the current number of robots can? What do you mean with the "-ve" signal?
Flood: more than you need
-ve: negative
phi1010 wrote:
BenSeidel wrote:because there is no way to count items in flight.
Mh, well, another unexpected realization, at least to me -- after checking it right now.
"Read Logistic Network Contents" / "Read the available items from the logistic network of the roboport" (tooltip) did not sound as if it would exclude the items on the way from an active provider chest to a roboport storage chest; "available" sounded a lot like "there and not yet requested somewhere" (aka: everything in any logistic chest -- requesters too -- or robot, minus everything requested anywhere), or at least "exists somewhere outside a requester chest and is not currently on the way to it".
It sounds like you are missing what "available" means. I would not say that an item is "available" at a shop when it's currently being moved from one shop to another, or if it is on the way from the depo. If you want to count the items in the air, then you really want to count the items being moved to a specific chest and not generally in the air, as the destination matters. Items going to a requester chest won't ever be available again. Personally, I really don't care what is in the air, I only care about what is currently in the chest ready to be put into the crafting machine. It's all well and good for a chest to report 200 items, but if they are not available to be removed from the chest then it's cake.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

BenSeidel wrote: As for player requests, why would you need to read this? It's a serious question as even trying to implement a lean factory (only ever produce what you absolutely need), you would be subjecting yourself to having to wait for the items to be manufactured.
My most common use-case for this would be sending items to me using trains, without me having to drive around and collect them. Already knowing that I want 50 speed modules or 2k rails now, while standing in the range of some distant logistics network, would both prevent having to have a fixed-size buffer, which might either be to small and slow down the delivery, and will still be flexible without requiring me to update those constant combinators -- I often drive around between networks, but not always to the network which actually has those resources. I'd prefer not having stuff lying around in chests, just because somewhere I forgot to switch a constant combinator off.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

BenSeidel wrote: It sounds like you are missing what "available" means. I would not say that an item is "available" at a shop when it's currently being moved from one shop to another, or if it is on the way from the depo.
I don't care where the Item is when ordering online -- as long as the Item can be reserved for me alone; that's what I would describe as being available (not in a single shop/storage, but in a network).

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Negative Amount in Logistics Network

Post by BenSeidel »

phi1010 wrote:My most common use-case for this would be sending items to me using trains, without me having to drive around and collect them. Already knowing that I want 50 speed modules or 2k rails now, while standing in the range of some distant logistics network, would both prevent having to have a fixed-size buffer, which might either be to small and slow down the delivery, and will still be flexible without requiring me to update those constant combinators -- I often drive around between networks, but not always to the network which actually has those resources.
So, either you have the items available in your network or you don't. As you have said that you don't want caches of items everywhere holding the amount you need, but want them to be added when requesting, why not just maintain one of each item in each network? Then when you run in, a bot is scheduled to pick them up, creating a -ve (negative) amount, triggering your inserter arms to insert more. This way you don't have the massive amount of resources sitting around, but still get the "on demand" system you need. As you are taking the items off trains you will know exactly what they are carrying. Also, if you are worried about a fixed size buffer being too small or too slow, than any demand driven system must also be off the table as they are much slower.
phi1010 wrote: I'd prefer not having stuff lying around in chests, just because somewhere I forgot to switch a constant combinator off.
It's possible to get items produced in one batch, so you set your combinator and the factory produces that amount. Only once the combinator is turned off then on again will it produce another batch, so forgetting to turn it of is only an issue of setting it up correctly.

phi1010
Inserter
Inserter
Posts: 46
Joined: Sat Aug 20, 2016 3:31 pm
Contact:

Re: Negative Amount in Logistics Network

Post by phi1010 »

BenSeidel wrote:Also, if you are worried about a fixed size buffer being too small or too slow, than any demand driven system must also be off the table as they are much slower.
I don't think so, high latency / wastefulness (items somewhere else than needed / too many items stored where not needed) and low throughput (less items transported than needed, or too many items scheduled for transportation on suspicion) are different problems.

Always loading one item in the train, because my fixed buffer of one has been emptied somewhere else, sending the train to the logistics network I am currently in, and then sending the next item as soon as the fixed buffer has been emptied again is acceptable if I want to have two items, but fails when I request multiple thousands -- the factor between the buffer size and the requested items will determine how often the latency of a train ride I will have to wait. If the buffer is too large; Items will lay around, while the resources could have been used somewhere else.

The latency problem can not be fixed, but a train ride might take about 60 seconds only, which would be okay, if I could see the lack of some thousands of items and put them all in the first train. As long as I request items less often than the train line can manage, everything would be at my position after one train ride at most, which would spare me two minutes of driving around when I request twice the amount of items that I will use up in one minute.

BenSeidel
Filter Inserter
Filter Inserter
Posts: 584
Joined: Tue Jun 28, 2016 1:44 am
Contact:

Re: Negative Amount in Logistics Network

Post by BenSeidel »

phi1010 wrote:I don't think so, high latency / wastefulness (items somewhere else than needed / too many items stored where not needed) and low throughput (less items transported than needed, or too many items scheduled for transportation on suspicion) are different problems.
Ummm, you buffer them so that you don't have to wait for them to be manufactured. If you have a demand driven system then they have not been manufactured, so you have to wait. Hence me saying that "any demand driven system must also be off the table as they are much slower".

Ok, now you are talking about train latency and I am wondering why they have anything to do with the way the logistics system works. To me they are two entirely separate systems, so talking about how one affects the other is kind of pointless, especially when you are talking about the way player requests are being fulfilled. If you could outline a use case for it (and not just say "would be sending items to me using trains, without me having to drive around and collect them", because that is an outcome). Describe the setup, what wires run where, what occurs when there is a request in a network, etc. Because I can't see how this system would work well enough due to the massive amount of time it would take for your requests to arrive using a train, nor the issue with partial deliveries effectively doubling the transportation time.

User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2632
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: Negative Amount in Logistics Network

Post by steinio »

I'm not sure if it's a bug or suggestion but my tendency goes to bug.

Roboports which are configured to report logistic network content are only reporting existing content but no needed material for example a repair pack.

For consistency positive and negative amounts should be reported. Maybe an option to disable negative numbers in the roboport as suitable but this can be achieved with a combinator afterwards.

Greetings steinio
Image

Transport Belt Repair Man

View unread Posts

Post Reply

Return to “Not a bug”