Page 1 of 1

Script for atom status

Posted: Friday 18 November, 2022 - 10:41
by aandueza_
Hi.
I want to create a discipline that sends the product with priority to 6 servers, but if there are busy or blocked, send to other 2 extra-servers.

the previuos atom is a server with 2 inputs and 19 outputs with this code in "Send to":

Code: Select all

(1,c)),[405]),
CompareText(Name(Rank(1,c)),[407])
),
dUniform(1,4),
dUniform(5,12),
dUniform(13,19)
)
So i think that the solution is to create a "virtual" queue to create the first discipline.
How can i do?

Thanks!

Re: Script for atom status

Posted: Friday 18 November, 2022 - 10:43
by aandueza_
sorry, the code of the server is:

Code: Select all

Case(
WhichIsTrue(
CompareText(Name(Rank(1,c)),[403]),
CompareText(Name(Rank(1,c)),[405]),
CompareText(Name(Rank(1,c)),[407])
),
dUniform(1,4),
dUniform(5,12),
dUniform(13,19)
)

Re: Script for atom status

Posted: Monday 21 November, 2022 - 11:54
by Deena
Hi aandueza_,

Welcome to the Enterprise Dynamics community!
Yes! you are right, you would have to create a 'virtual queue'.

In order to do this, you might want to look at the basic Enterprise Dynamics functions in the Help. You can open the Help by pressing F1.
You can look into functions like "content" and "loop until" to check if the priority servers are occupied.
You can control the output channels connecting to the inputs of extra servers using functions "OpenOc" and "CloseOC".

I hope this helps!

Kind regards,
Deena