Adding or subtracting process time from a fitted distribution as a parameter

Adding or subtracting process time from a fitted distribution as a parameter

jgolob
Not applicable
24 Views
4 Replies
Message 1 of 5

Adding or subtracting process time from a fitted distribution as a parameter

jgolob
Not applicable

[ FlexSim 25.0.0 ]

My model contains a fitted distribution of environmental service clean times of operating rooms based on real data. I am looking to add or subtract minutes from random clean times selected from this distribution as a model parameter. For example, if the randomly selected clean process time for a room was 10.5 minutes, I want to set a parameter to -2 which would subtract 2 minutes from the randomly selected time and yield 8.5 minutes. This would allow me to see how the other performance measures respond under a the gross assumption of 2 minute decrease in clean times. This fitted distribution is currently called each time one of the 20 operating rooms is cleaned.

I have reviewed the following answers from this forum:

https://answers.flexsim.com/questions/109886/how-to-reference-to-a-statistical-distribution-in.html

https://answers.flexsim.com/questions/95419/how-to-change-the-empirical-distribution-in-experi.html

The picture below shows my latest attempt. Although no errors, there was no change to my output. Do I need to put something in the 'On set' property? I realize I am sacrificing true randomness, but this is the best way I could think how to study impacts on changes in clean times. Is what I am looking to do possible?

1739023529210.png

0 Likes
Accepted solutions (1)
25 Views
4 Replies
Replies (4)
Message 2 of 5

moehlmann_fe
Observer
Observer
Accepted solution

The parameters should work as you set them up. Though you should consider using the Math.max() function to prevent negative values from being generated.

Can you show where/how you call the parameter in the model?

Linking to the empirical distribution doesn't do anything on its own. It only makes that reference available as a variable in the On Set code. But I don't see why that would be necessary here.

0 Likes
Message 3 of 5

jgolob
Not applicable

Thanks Felix. I was under the impression when I referenced the empirical distribution 'CleanUpTimePerCase' within the parameter 'NewCleanTime' a link was automatically created.

Currently I am calling the empirical distribution 'CleanUpTimePerCase' in multiple process activities as per screen shot below. How would I call the new parameter 'NewCleanTime'?

Also, where and how would I utilize the Math.max() function. I do want to avoid negative values from being generated as you mentioned.

1739187813157.png

0 Likes
Message 4 of 5

moehlmann_fe
Observer
Observer

By using "Empirical()" you get a value based on the empirical data. Not the fitted distribution and not the parameter. You need to use "Model.parameters.NewCleanTime" instead.

The expression of that parameter should then be:

Math.max(Model.parameters.CurrentCleanTime + Model.parameters.ChangeCleanTime, 0)

It will return either the sum of the two other parameters or 0, whichever is higher. (You can of course also use a different number than 0 for the second value.)

0 Likes
Message 5 of 5

jgolob
Not applicable
Thank you Felix. The model is working a required.
0 Likes