question

Mohib R avatar image
0 Likes"
Mohib R asked Mohib R commented

Control output items on source using statistical distribution

in the source, I can use statistical distribution command to control interarrivel time, but also I want to use statistical distribution command to control item quantity.

I would like to know, how can I use statistical distribution command to control the number of items output

Thank you in advance

FlexSim 7.5.4
source
· 5
5 |100000

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

Joerg Vogel avatar image Joerg Vogel commented ·

Why would you do that? If you choose a different statistical distribution or different parameters, you get more or less items in a period.

0 Likes 0 ·
Mohib R avatar image Mohib R Joerg Vogel commented ·

Yes, I am looking for viable output, not constat number.

it is Flexsim able to do that

0 Likes 0 ·
Mohib R avatar image Mohib R Joerg Vogel commented ·

it is a smart way Jorg, Thank you

0 Likes 0 ·
Mohib R avatar image Mohib R commented ·

jorg.fsmoncreation.xlsx

I feed the simulation with statistic distribution as results output form excel sheet in the attachment.

I should have 1000 units on 90 days the simulation gave me 50 units on 90 days, could you please help

0 Likes 0 ·
jorg.fsm (31.7 KiB)
oncreation.xlsx (29.0 KiB)
Joerg Vogel avatar image Joerg Vogel Mohib R commented ·

Before you do anything, Please check your spelling of the Global Table name in the emprirical distribution. The global table called "moe" doesn't exists. You named the table "Moe". Names are case sensitive in FlexSim.

Your result is correct. But you count only the items of the empirical distribution in the Interarrival Time function. The source code to copy items isn't counted at all, because you need an additional Output Port Connection from the source to queue. The source code releases the copied items to the output port number 2!.

Alternatively you can adjust the source code in OnCreation trigger line 19:

releaseitem(copy, 1);
// release item through output port number 1

The source will release then all items through the output port number 1.

You should set the maximum content of the queue to a much larger value.

If you have added the second output port or adjusted the source code, please do not let run the simulation, because the amount of items you can get is much larger than your expected 1000 items. Better you press or click on the the "Step" button in the control dashboard. This will step through the events in your model.

0 Likes 0 ·

1 Answer

·
Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Mohib R commented

You can duplicate the created item more or less often in the OnCreation trigger. The attached model will duplicate the created item by a for-loop randomly often. The OnExit trigger set the color of each creation interval item differently.duplicate-created-items-v754.fsm

change color on exit by the input of queue on output port number 1.

colorarray(item,getinput(outobject(current,1))+1);


· 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.

Mohib R avatar image Mohib R commented ·

jorg02.fsm

I would like to thank you for the prompt response, I fixed the model based on your recommendation.

but now the output becomes too high when reach 90 days

please see attachment

0 Likes 0 ·
jorg02.fsm (31.4 KiB)
Joerg Vogel avatar image Joerg Vogel Mohib R commented ·

And it is still only a problem of the parameters of both statistical distributions you use. You alter the values until you get the desired total amount of items in a period.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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