question

Pieter Cecat avatar image
0 Likes"
Pieter Cecat asked Pieter Cecat commented

dempirical to randomly distribute items over several queues

Hi everyone

I am using 'dempirical' to select a scenario at the start of every 2 months (1 month = 720 hours = time unit model). However, I do not think it is working properly as I have set some scenarios' probabilities equal to zero to check the function's accuracy but as it turns out, FlexSim still selects that scenario.

My discrete distribution should contains 5 values with corresponding probabilities (0,1 / 0,2 / 0,4 / 0,2 / 0,1). Probability percentages are entered in column 1 starting with row 1 of the table, and the associated values are entered in column 2.

Attached you find my model. The values are entered in the global tabel "SCENARIOS" and the dempirical function is called upon in my triggers for the Graded_Cores_Inv-queue.

I have been really stuck trying to solve this issue so any help would be appreciated.

Thank you in advance!

Pieter

uncertain-quantity-quality-cores.fsm

FlexSim 16.0.8
flexscripttriggersscenariodempirical
· 2
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.

1 Answer

Jeff Nordgren avatar image
0 Likes"
Jeff Nordgren answered Pieter Cecat commented

@Pieter Cecat,

The first thing I noticed is that your SCENARIOS table is invalid. It only adds up to 1, not 100. From the User Manual:

dempirical (str/node/num table[, num stream]) Returns a random sample from a discrete empirical distribution

Description A discrete empirical distribution.The table referenced must contain a list of values and probability percentages associated with each of the values. Probability percentages must be entered in column 1 starting with row 1 of the table, and their associated values are entered in column 2. The table may have as many rows as needed to define as many values as desired. The percents are entered as numbers between 0 and 100, and should add up to a total of 100 percent; otherwise any values defined after a cumulative percentage of 100 is reached will never be returned.

The numbers in column 1 MUST add up to 100, no more, no less for the dempirical() distribution to work.

· 1
5 |100000

Up to 12 attachments (including images) can be used with a maximum of 23.8 MiB each and 47.7 MiB total.