Adding multiple probability distributions via Branch

88 views
Skip to first unread message

Anne

unread,
May 26, 2023, 10:39:58 PM5/26/23
to JaamSim Users Discussion Group
Hello,

I am simulating a grocery store with it's queues.
Here I have 2 parallel activities; using 1 mode to scan your product ("ZelfScan") and other mode where you pre-scan your products ("Scanner"). This has been modelled ok, via an Assign model. (this.obj.Scanner == "Yes") but after this I would like to an extra step where at random (with a certain probability distribution) the products need to be verified by an employee (extra controle).
For this I would like branch model where the choice is determined with 2 different probability distributions:  that when "Scanner" had been used (this.obj.Scanner == "Yes"), the branch model will choose a DiscreteDistribition (So for instance; 0.35 0.65; where 35% it will give value 1 - so go to the extra control). But I would like to add in the same branch; that when "Scanner == "No"), a different DiscreteDistribution is used (namely; 0.15 0.85: where 15% it will give value 1 - so go to the extra control)

Is this possible?
If so, what do you add in the branch 'Choice' tab?
I have added a screenshot of the system.

Many thanks!
Capture_Jaamsim.JPG

Stefan

unread,
May 30, 2023, 1:19:38 AM5/30/23
to JaamSim Users Discussion Group
Hello Anne,
you can achieve this using a "BooleanSelector". This Object returns 0 or 1, based on a certain probability which you can define.
In your case, you can use a Branch and a BooleanSelector in combination like that:

In the BooleanSelector, you enter under "TrueProbability":
    '[Branch1].obj.Scanner == "True" ? 0.35 : 0.15'
This means when the object that is currently at the Branch object has be scanned, there is a chance of 0.35 to return True ( or the number one, which is used), if the object has not been scanned, the chance is 0.15

You can use the booleanSelector in the Branch Choice like this:
    '[BooleanSelector1].Value + 1'
You need to add 1 because this Value returns 0 or 1, but the Choice needs 1 or 2.

Of course, the next component list of the Branch has to look like the following:
NoVerificationQueue  VerificationQueue

good luck!
Stefan
Reply all
Reply to author
Forward
0 new messages