Hi
I am struggling with using the Random Normal function. I have a case of random breakdowns, and I want these random breakdowns to last between 0.25 and 72 hours (in the accumulated box named "total maintenance hours"). So I type in "AccCorrectiveM1*RANDOM NORMAL(0.25, 72, 8, 1, 0)" (Accumulated corrective maintenance events).
I get an unexpected result in total amount of maintenance hours. See "Capture8.PNG" in the attachements.
If I remove the RANDOM NORMAL I get the type of graph that I want (only growing, never decreasing) See "Capture9.PNG" in the attachements.
I could use some help on how to properly use the random function. I need it to give a positive number between 0.25 and 72 for each AccCorrectiveM1 event.
Thanks
Wrong use of the random function
Wrong use of the random function
- Attachments
-
- System Design Part_1 EL_M_1.mdl
- (6.58 KiB) Downloaded 182 times
-
- Capture9.PNG (9.92 KiB) Viewed 1508 times
-
- Capture8.PNG (17.35 KiB) Viewed 1508 times
Re: Wrong use of the random function
It's a little hard to follow your question - the model doesn't correspond with your description.
I see:
This will always yield a positive random number (or 0).
This will accumulate the positive random draws, and therefore always increase as desired. However, it's dimensionally inconsistent. To count discrete events, divide by TIME STEP in the INTEG; otherwise your model only works if TIME STEP = 1. Defining units is not just eye candy; it's an essential good practice.
Note that if you use RANDOM NORMAL(0.25, 72, 8, 1, 0), values near 0.25 or 72 will never happen. A 72-hour event would be 64 standard deviations from the mean - you'd have to run your model for the age of the universe for that to happen. Some other distribution (lognormal?) might be more appropriate here.
I see:
Code: Select all
Corrective Maintenance El Motor 1=IF THEN ELSE(Electric motor 1 reliability
<=0,RANDOM NORMAL(5,10,8,1,1),0)
Units: **undefined**
**************************************************************
Code: Select all
AccCorrectiveM1=INTEG(IF THEN ELSE(Corrective Maintenance El Motor 1>0,1,0)
,0)
Units: **undefined**
**************************************************************
Note that if you use RANDOM NORMAL(0.25, 72, 8, 1, 0), values near 0.25 or 72 will never happen. A 72-hour event would be 64 standard deviations from the mean - you'd have to run your model for the age of the universe for that to happen. Some other distribution (lognormal?) might be more appropriate here.
/*
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/
Advice to posters (it really helps us to help you)
http://www.ventanasystems.co.uk/forum/v ... f=2&t=4391
Blog: http://blog.metasd.com
Model library: http://models.metasd.com
Bookmarks: http://delicious.com/tomfid/SystemDynamics
*/