Queue input strategy

All topics on coding 4Dscript in Enterprise Dynamics.
Post Reply
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Queue input strategy

Post by MartinL »

Hello,

Could someone help me to create a following Queue Input Strategy 4DS code:

Search, starting from the first input channel and accept product from the first input channel where the product is ready to enter the Queue.

Best Regards,
Martin
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Queue input strategy

Post by HarryBunnik »

Ha Martin,

Isn't that what the first general input strategy for the queue (Any inputchannel) is doing? All this does is saying: OpenAllIc, which then will check all the incoming channels if one of the is ready the deliver, starting with input channel nr. 1 and then working it's way up, until it found something.

Regards,

Harry
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Re: Queue input strategy

Post by MartinL »

Hi,

Regarding "Any inputchannel " I don't know it exatly. My aim is to have such input strategy, that input channel with a smallest order nr. is always preferred, when multiple input channels are ready to send the product to the Queue. The Queue capacity is 1 product.

Is the "Any inputchannel" strategy working like that and preferring always the input channel with a smallest sequence number?

Best Regards,
Martin
User avatar
HarryBunnik
Posts: 362
Joined: Monday 07 February, 2011 - 11:22

Re: Queue input strategy

Post by HarryBunnik »

I quote from the help:
Any inputchannel.

When activated, this strategy opens all input channels of an atom. If more than one of the atoms that are connected via the input channel can be sent the atom arriving through lowest number input channel will have priority. While products keep entering through the first channel, the other channels will be blocked.
But I'm not entirely sure what you now want. What is the input channel with the smallest order nr.? What do you mean with this? Is that the output of the server, or a label or ...? Because the "Any inputchannel" only loops from 1 to NrIc(c) and opens the first channel that is ready to deliver. As mentioned in the help, this means it's preferring the first incoming channels.

Regards,

Harry
MartinL
Posts: 28
Joined: Tuesday 03 February, 2015 - 21:43

Re: Queue input strategy

Post by MartinL »

Hi,

The quote from help answers my question.

Thanks!
Post Reply