Is there a way to open 2 ports with the same probability? I have 2 racks connected in a queue and I would like the queue to open the port 1 with 50% of probability and the port 2 with the other 50%.
I have a model with 2 racks and a queue and this queue with an on entry trigger. When the entry trigger condition is true, I would like the rack1 to open its port with 50% of probability and rack 2 to open its port with 50% of probability. Can you help me please?
Here is the code:
treenode item = param(1); treenode current = ownerobject(c); int port = param(2); {
// ************* PickOption Start ************* // /***
treenode involved = /** \nObject: */ /***tag:object*//**/centerobject(current, 1)/**/; treenode involved2=centerobject(current,2); int condition = /** \nCondition: */ /***tag:condition*//**/true/**/; if (condition) { /** \nAction: *//***tag:action*//**/openoutput/**
(bernoulli(50, involved, involved2)); }
The errors say:
Invalid type for parameter 1 in call bernoulli()
Invalid type for parameter 2 in call bernoulli()
Invalid type for parameter 3 in call bernoulli()
Thanks you so much! @adrian haws
,