Help needed: Requisition order via circuits

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Help needed: Requisition order via circuits

Post by ashjones303 »

Hello all,

TL:DR Modded run through. I want a circuit that places a request, and holds that request until fulfilled then wipes the memory to allow new requests. Vanilla BP of work at the end so far

~Stage One~ I have an AAI Vehicle Depot hold items A,B & C requesting requesting 2k of items A, B & C. It is going to depot 1. This goes through a decider combinator that outputs the ABC requested values, less the depot stock holding value, that are over 1k.

~Stage Two~ Next the request and depot value goes through a decider combinator that outputs a check to confirm the order and a decider combinator at the same time that only allows unchecked orders through, locking out the memory cell in the next stage from further inputs.

~Stage Three~ Values A & Depot are now locked into an arithmetic combinator doing *1 fed back onto itself to create the memory. Even if I clear the request values at stage one, this memory is held. This is working as intended

Now i'm stuck, I want to clear this memory cell at stage three once the request has been completed to allow fresh requests through. Stages one and two work as intended but I cant clear stage three. without continuous feed back, negative values or one use gate inputs. Any help, gratefully appreciated.


mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

Can you explain a bit more what happen when the request is fulfilled ?

Any other trigger than just reading one quantity becoming 0 ?

I think in order to clear the memory some of the existing step 2 has to be modified , or one has to add an element to the design to perform the reset.
I'm not sure i understand the use of the check output, is it used only to lock the value in the memory ? or is it connected to something else required for your aai setup ?
ashjones303 wrote:
Thu Sep 08, 2022 11:33 am
without continuous feed back, negative values or one use gate inputs. Any help, gratefully appreciated.
Does that mean no change to the existing build, only adding wire to some places ? or is it possible to alter it, while maintaing the same number of element ?

What's wrong with negative value ? do you mean you could do it yourself if it was to add 2 gates to do a *-1, and another one to check if the storage in chest has been taken away by a vehicule ? and instead you are looking for a minimalist setup ?

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

Hey! Thank you!

The Check is purely to lock the memory cell at this stage.

If the requisition order contains A,B or even C all at once, that is fine also, but I want the outpost only making one requisition order at a time.

At the moment, if the request is filled, Stages one and two become pretty dormant, the check requisition and item count both become zero, with only the depot id value being constant. I manage this in stage two so it cant be input into stage three by needing a value more than 1k to continue to stage three, a bit ugly but it works so far and I cant think of another way.

Locked into the memory cell after the delivery is the 1k of item A and depot value with no inputs coming from stage two into stage three

If in stage three i try to multiply the memory cell by -1 and return this to the memory cell via a gate controlled by the stage two check
(each * -1 output each(if check = 0 output everything))
I get a loop which has created a figure measured in M and G both minus and negative, depending on when I shut down the gate by introducing check = 1, for both item value and depot ID

I tried adding a X "cross" system at stage two in reverse of the check so that the clear memory would read
(each * -1 output each( if X = 1 output everything))
that lead to X being stuck in the memory cell and the gate not working after one use.

A redesign from the ground up is always doable

The design spec I gave myself is LTN but with cars

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Help needed: Requisition order via circuits

Post by ColonelSandersLite »

Does AAI let you read some sort of docked vehicle ID like train stations do?

If so, I would use that to detect when a vehicle leaves the station and reset all memory when that happens.

ashjones303 wrote:
Thu Sep 08, 2022 1:45 pm
The design spec I gave myself is LTN but with cars
I'm gonna give you a heads up here. I have seen two different youtubers try this and both ended up with the same problem - LAG. Those vehicle mods are heavy on the scripting and they'll eat your frame rate PDQ. It's doable if you have a good system and you keep your goals modest though.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

From what i see you have static value in the last arithmetic combinator, which is doing each*1=>each.

I understand this should be reset to 0 when a vehicule comes by, if it was a train it could be read from the train station, but in your case i understand the vehicule doesn't emit signal or you can't read its content ? i'm not familiar with all the aai vehicule functionnality.

I'm no expert i learned playing the game, for such memory cell the usual reset signal i would use is to send the content of the memory cell through an arithmetic combinator doing each *-1=> each. At this point the problem becomes a way to trigger this during only 1 tick so that you don't store the negative value.

I will try something :p

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

ashjones303 wrote:
Thu Sep 08, 2022 11:33 am
Now i'm stuck, I want to clear this memory cell at stage three once the request has been completed to allow fresh requests through. Stages one and two work as intended but I cant clear stage three. without continuous feed back, negative values or one use gate inputs. Any help, gratefully appreciated.


I made this, it's not good x)

It does reset the request when one is fulfilled, and you can reuse another request afterward, but if you request 2 things, once the first one is fulfilled, the second one is not requested properly.

I'll keep trying for fun but by no mean i guarantee result or even fast one x) i'm sharing the mediocre thing in case it can help, and/or to make sure i understood the task correctly

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

Thank you both
ColonelSandersLite wrote:
Thu Sep 08, 2022 2:57 pm
Does AAI let you read some sort of docked vehicle ID like train stations do?

If so, I would use that to detect when a vehicle leaves the station and reset all memory when that happens.

I'm gonna give you a heads up here. I have seen two different youtubers try this and both ended up with the same problem - LAG. Those vehicle mods are heavy on the scripting and they'll eat your frame rate PDQ. It's doable if you have a good system and you keep your goals modest though.
I'd be very interested in watching those Youtubers if you have there names handy?

I'm hoping what I'm looking for is a very modest setup. Essentially they will ferry goods from the Railway depot to the outposts factories and back. The AAI will act as my bus for science and plastic manufacturer in one outpost, Oil and ammo production in another, in theory something like that. I was using the transport drone Mod but wanted less depots more circuits

From what I can tell no AAI doesn't read the docked vehicle, but it can scan a specified tile and output vehicle and/or unit ID via a tile scanner.

In my mind I could wire it up so that it stored the request until it was fulfilled then just wipe clean once the storage box was no longer requesting but I'm missing how to just wipe the memory cell and not introduce more values in doing so.
mmmPI wrote:
Thu Sep 08, 2022 2:59 pm
... the problem becomes a way to trigger this during only 1 tick so that you don't store the negative value.
Exactly this. I did something similar in an old save but I cant find it now and I know there is a way to do it but it was years ago and I cant remember.

Again, thank you both

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

mmmPI wrote:
Thu Sep 08, 2022 3:23 pm
ashjones303 wrote:
Thu Sep 08, 2022 11:33 am
Now i'm stuck, I want to clear this memory cell at stage three once the request has been completed to allow fresh requests through. Stages one and two work as intended but I cant clear stage three. without continuous feed back, negative values or one use gate inputs. Any help, gratefully appreciated.


I made this, it's not good x)


It does reset the request when one is fulfilled, and you can reuse another request afterward, but if you request 2 things, once the first one is fulfilled, the second one is not requested properly.

I'll keep trying for fun but by no mean i guarantee result or even fast one x) i'm sharing the mediocre thing in case it can help, and/or to make sure i understood the task correctly
This is brilliant, thank you!!!

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

ashjones303 wrote:
Thu Sep 08, 2022 3:59 pm

This is brilliant, thank you!!!
i don't think it works though, when you change the quantity of the constant combinator doing the storage to reduce stone and just after copper under the threashold, then if you add stone again, the request doesn't auto switch to copper, it keeps requesting stone it doesn't reset properly.

for only one request at a time it does function

i have fiddle a bit more trying to make it works better in case of 2 goods being low on suply at the same time but it's difficult to reset the cell and also allow the combinator just before the last one to transmit new value with good sync so that when one request is fulfilled it auto-switch to the second. so far no good result

it may be necessary to change a bit the way the memory cell is given a value to make it easier

Nidan
Fast Inserter
Fast Inserter
Posts: 227
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Help needed: Requisition order via circuits

Post by Nidan »

ashjones303 wrote:
Thu Sep 08, 2022 3:49 pm
In my mind I could wire it up so that it stored the request until it was fulfilled then just wipe clean once the storage box was no longer requesting but I'm missing how to just wipe the memory cell and not introduce more values in doing so.
mmmPI wrote:
Thu Sep 08, 2022 2:59 pm
... the problem becomes a way to trigger this during only 1 tick so that you don't store the negative value.
Exactly this. I did something similar in an old save but I cant find it now and I know there is a way to do it but it was years ago and I cant remember.

Again, thank you both
This is why I tend to use decider combinators as memory. R == 0, output everything, input count. Resetting to zero is now a matter of providing a nonzero R.

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

It clears the memory cell cleanly which is the start!!

I honestly have been struggling for weeks with this.

I was looking at stopping new requests at the source with the check
Then I was looking at looping the whole system to cancel itself out

Its driven me mad

Thank you, I will try a different combinator also

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

Nidan wrote:
Thu Sep 08, 2022 5:30 pm
This is why I tend to use decider combinators as memory. R == 0, output everything, input count. Resetting to zero is now a matter of providing a nonzero R.
That's why i did but still i'm not satisfied with the result, i cannot provide the non zero R in all desired circumstances, namely it would providing it when an unknown signal amongst others stop being emited. could be stone iron copper and so on, you have 3 positive, and suddenly only 2, there used to be one of the 3 store in memory and now you only want 1 of the 2 left.


Side node for op : i have noticed that your setup could request 2 or more item at a time, for this you can setup a constant with high negative iron copper and stone, and only after it's setup you connect it to the other constant that represent storage, this will create request exactly at the same precise tick of 2 or more item, and they will get store on the memory together it still occur in what i posted

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

mmmPI wrote:
Thu Sep 08, 2022 5:45 pm
Nidan wrote:
Thu Sep 08, 2022 5:30 pm
This is why I tend to use decider combinators as memory. R == 0, output everything, input count. Resetting to zero is now a matter of providing a nonzero R.
That's why i did but still i'm not satisfied with the result, i cannot provide the non zero R in all desired circumstances, namely it would providing it when an unknown signal amongst others stop being emited. could be stone iron copper and so on, you have 3 positive, and suddenly only 2, there used to be one of the 3 store in memory and now you only want 1 of the 2 left.


Side node for op : i have noticed that your setup could request 2 or more item at a time, for this you can setup a constant with high negative iron copper and stone, and only after it's setup you connect it to the other constant that represent storage, this will create request exactly at the same precise tick of 2 or more item, and they will get store on the memory together it still occur in what i posted
Thank you for still looking at it, and yes, that was always my intention that it could order multiple items at a time, but only one process at a time, though I am beginning to think its not possible.

I'm running head long into the stage two check value every time and an not being able to process the order before the next one is submitted and being locked out. I was trying to sanitise the line at the beginning using your memory delete combinator but again, it just looped continuously.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

ashjones303 wrote:
Thu Sep 08, 2022 6:12 pm

Thank you for still looking at it, and yes, that was always my intention that it could order multiple items at a time, but only one process at a time, though I am beginning to think its not possible.

I'm running head long into the stage two check value every time and an not being able to process the order before the next one is submitted and being locked out. I was trying to sanitise the line at the beginning using your memory delete combinator but again, it just looped continuously.
i'm not sure what you mean , the difference between order and process. I have noticed that when iron and copper goes under threshold at the same time, they both get stored in the last combinator, but when iron goes low and then copper, only iron gets requested.

modifying the way to store the signal on the last combinator could allow changing this = modifying stage 2

Isn't there a zone scanner or something like an inventory censor in aai structure ? not sure if you are playing with it, but a way to detect incoming vehicule could be used to reset the memory, only sending a pulse, and then the stage 2 could be made so that the value are constantly outputed but only gated behind receiving that pulse from external censor.


Detecting when one of a bunch of signal constantly emiting disappear is more difficult to use to generate a pulse for reseting the memory, compared to detecting a signal appearing or reaching a value like the inventory or ID of a vehicule ,or even a number of vehicule in an area going from 0 to 1. that's why i'm asking x)

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

mmmPI wrote:
Thu Sep 08, 2022 6:35 pm

i'm not sure what you mean
I'm really sorry to anybody trying to understand me, I write as I talk and that does get just a little confusing X)

I'll try answering by giving the actual use for this.

The order is my science factory wants 1k Iron.
The process is installing it into the memory which is then dispatched via wireless to a listening post (this is setup and working)

The listening post cross references all requests with warehouses holding goods, finds an available vehicle and dispatches.

Its at this point I need the memory cell holding that data. AAI will allow me to send the vehicle to the goods warehouse but I need that data to set how much to collect and then also, where to go once the goods are collected, not, at the same time though. I'm using the memory cell as a receipt which I pull info off as and when I need it.

In my head I won't need any of that data once the stock level in the factory includes that 1k Iron, that's why I wanted the system reset to be dependant on the storage levels (which you have shown me :) that's made me so happy ) The problem I'm now having is the other order/requisitions that have been added whilst I've been completing the Iron order.

There is a real chance I'm thinking about all of this in the wrong way and I'm more than happy to be corrected and pointed in a direction for redesigning it all.

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

ashjones303 wrote:
Thu Sep 08, 2022 7:23 pm

I'm really sorry to anybody trying to understand me, I write as I talk and that does get just a little confusing X)
I don't really know the real word for half of the combinator related thing i can't complain someone uses the same word as me x).

ashjones303 wrote:
Thu Sep 08, 2022 7:23 pm
I'll try answering by giving the actual use for this.

The order is my science factory wants 1k Iron.
The process is installing it into the memory which is then dispatched via wireless to a listening post (this is setup and working)

The listening post cross references all requests with warehouses holding goods, finds an available vehicle and dispatches.

Its at this point I need the memory cell holding that data. AAI will allow me to send the vehicle to the goods warehouse but I need that data to set how much to collect and then also, where to go once the goods are collected, not, at the same time though. I'm using the memory cell as a receipt which I pull info off as and when I need it.

In my head I won't need any of that data once the stock level in the factory includes that 1k Iron, that's why I wanted the system reset to be dependant on the storage levels (which you have shown me :) that's made me so happy ) The problem I'm now having is the other order/requisitions that have been added whilst I've been completing the Iron order.

There is a real chance I'm thinking about all of this in the wrong way and I'm more than happy to be corrected and pointed in a direction for redesigning it all.
I have made another thing, that doesn't work either, but it's able to switch request from iron to copper to stone that's all it does apart from working in specific condition for 1 request at a time and if this request is fulfilled in 1 tick . The behavior and method used is a little different, i modified stage 2 trying another approach.

It detect when quantity are changing a little like the check confimation you used in your original design but it doesnt store any value apart from the last combinator, which is a problem as the memory is reset when there is an additional request, but it doesn't receive any new value.

not sure if helpful x)






I understand your use case i think, or at least the description of the functionnality of the system, what is to be stored in memory. Does the depot number change over time ? or is it possible to just add the number at the end / stage 3 in the memory ? instead of having it mixed with the other signal representing material during stage 1 and 2 ?

I think it will be difficult to pick 1 request only after the other that just get fulfilled, if there is a backlog of 3 or 4 request, is it possible to update the memory with the request as soon as it arrive and keep multiple item requested until they are individually supplied ?

This would mean potentially having iron copper and stone stored in the last combinator at the same time. Then stone is fulfilled and disapear leaving, only copper and iron , copper is supplied and disapear leaving only iron ?

mmmPI
Smart Inserter
Smart Inserter
Posts: 2728
Joined: Mon Jun 20, 2016 6:10 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by mmmPI »

I feel like i'm a bit spamming but the other design were not working.


This one is working but it's not quite exactly the spec / function required, as it doesn't include any threshold system; one could have request of 1 iron :(



It's also not containing a way to include the depot number, instead you have to manually put it in the memory cell once after the blueprint is copy pasted. either using /editor to pause the game and conect a constant combinator during 1 tick only, or you'd need to generate a pulse in game to send signal D[number] .

After it's done it should keep it forever, the memory cell never reset. i'm not sure this is ok with your need, it's just way easier :D

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

mmmPI wrote:
Thu Sep 08, 2022 8:03 pm
ashjones303 wrote:
Thu Sep 08, 2022 7:23 pm

I'm really sorry to anybody trying to understand me, I write as I talk and that does get just a little confusing X)
I don't really know the real word for half of the combinator related thing i can't complain someone uses the same word as me x).

ashjones303 wrote:
Thu Sep 08, 2022 7:23 pm
I'll try answering by giving the actual use for this.

The order is my science factory wants 1k Iron.
The process is installing it into the memory which is then dispatched via wireless to a listening post (this is setup and working)

The listening post cross references all requests with warehouses holding goods, finds an available vehicle and dispatches.

Its at this point I need the memory cell holding that data. AAI will allow me to send the vehicle to the goods warehouse but I need that data to set how much to collect and then also, where to go once the goods are collected, not, at the same time though. I'm using the memory cell as a receipt which I pull info off as and when I need it.

In my head I won't need any of that data once the stock level in the factory includes that 1k Iron, that's why I wanted the system reset to be dependant on the storage levels (which you have shown me :) that's made me so happy ) The problem I'm now having is the other order/requisitions that have been added whilst I've been completing the Iron order.

There is a real chance I'm thinking about all of this in the wrong way and I'm more than happy to be corrected and pointed in a direction for redesigning it all.
I have made another thing, that doesn't work either, but it's able to switch request from iron to copper to stone that's all it does apart from working in specific condition for 1 request at a time and if this request is fulfilled in 1 tick . The behavior and method used is a little different, i modified stage 2 trying another approach.

It detect when quantity are changing a little like the check confimation you used in your original design but it doesnt store any value apart from the last combinator, which is a problem as the memory is reset when there is an additional request, but it doesn't receive any new value.

not sure if helpful x)






I understand your use case i think, or at least the description of the functionnality of the system, what is to be stored in memory. Does the depot number change over time ? or is it possible to just add the number at the end / stage 3 in the memory ? instead of having it mixed with the other signal representing material during stage 1 and 2 ?

I think it will be difficult to pick 1 request only after the other that just get fulfilled, if there is a backlog of 3 or 4 request, is it possible to update the memory with the request as soon as it arrive and keep multiple item requested until they are individually supplied ?

This would mean potentially having iron copper and stone stored in the last combinator at the same time. Then stone is fulfilled and disapear leaving, only copper and iron , copper is supplied and disapear leaving only iron ?
That's pretty damn close to being it. Your final combinator does what I want, except mid way through delivery it could be over written if stone is needed while trying to collect iron.

I'm not going to lie, I don't understand in the slightest how it filters through the items like that. All three of the the "anything" combinators have zero output so I cant see it being sorted there, and the top "everything" combinator I have requested all three inputs but only one at a time is displayed in the final combinator. Its close to real magic :)

ashjones303
Burner Inserter
Burner Inserter
Posts: 13
Joined: Mon Aug 08, 2016 3:59 pm
Contact:

Re: Help needed: Requisition order via circuits

Post by ashjones303 »

mmmPI wrote:
Thu Sep 08, 2022 8:29 pm
I feel like i'm a bit spamming but the other design were not working.


This one is working but it's not quite exactly the spec / function required, as it doesn't include any threshold system; one could have request of 1 iron :(



It's also not containing a way to include the depot number, instead you have to manually put it in the memory cell once after the blueprint is copy pasted. either using /editor to pause the game and conect a constant combinator during 1 tick only, or you'd need to generate a pulse in game to send signal D[number] .

After it's done it should keep it forever, the memory cell never reset. i'm not sure this is ok with your need, it's just way easier :D
Factorio spam best spam

Looking at it, there is no reason the depot ID needs to be included until the very end, so that makes sense

This one is good also but it can never be overwritten meaning I can can only use it once where as I am looking for something that I can use multiple times over, for example if a circuit chip factory depot develops and needs new materials

ColonelSandersLite
Fast Inserter
Fast Inserter
Posts: 208
Joined: Tue Apr 24, 2018 5:42 am
Contact:

Re: Help needed: Requisition order via circuits

Post by ColonelSandersLite »

ashjones303 wrote:
Thu Sep 08, 2022 3:49 pm
Thank you both
ColonelSandersLite wrote:
Thu Sep 08, 2022 2:57 pm
I'm gonna give you a heads up here. I have seen two different youtubers try this and both ended up with the same problem - LAG. Those vehicle mods are heavy on the scripting and they'll eat your frame rate PDQ. It's doable if you have a good system and you keep your goals modest though.
I'd be very interested in watching those Youtubers if you have there names handy?
DoshDoshington did his video pretty recently. It can be seen here.
https://www.youtube.com/watch?v=_S87vHUobvQ

Nilaus was the other one but those videos are pretty old now. That was more than a couple of factorio major version updates ago.

ashjones303 wrote:
Thu Sep 08, 2022 3:49 pm
mmmPI wrote:
Thu Sep 08, 2022 2:59 pm
... the problem becomes a way to trigger this during only 1 tick so that you don't store the negative value.
Exactly this. I did something similar in an old save but I cant find it now and I know there is a way to do it but it was years ago and I cant remember.

Again, thank you both
Is sending a single tick pulse really the main problem you're having? That's pretty easy man. Try this little demo.

Switching the constant combinator from off to on sends a single tick pulse which lights up the light for exactly 1 tick.

Switching the constant combinator from on to off does nothing.


Post Reply

Return to “Gameplay Help”