Script for atom status

All topics on the Atoms in any Enterprise Dynamics Library.
Post Reply
aandueza_
Posts: 2
Joined: Wednesday 09 November, 2022 - 10:27

Script for atom status

Post 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!
Attachments
pic of the model
pic of the model
Captura.png (29.77 KiB) Viewed 8987 times
aandueza_
Posts: 2
Joined: Wednesday 09 November, 2022 - 10:27

Re: Script for atom status

Post 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)
)
User avatar
Deena
Posts: 9
Joined: Monday 21 November, 2022 - 10:22

Re: Script for atom status

Post 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
Post Reply