question

Bryan Suharik avatar image
0 Likes"
Bryan Suharik asked Bryan Suharik answered

stat distribution cycle time from code

Hi,

I'm having trouble with the cycle time changing based on distribution coded in?

I have:

return normal(gettablenum("ProcessTime",getitemtype(item),2),20);

This is assigned to the cylcetime as script. It asks for a normally distributed number in which the Mean value is from a global table of row itemtype.

the problem is....the process doesn't select a different cycletime value for every new flow item, it just keeps processing for the value defined in the global table.

If the average is 50 hours, i need it to sometimes process for 50 hours, other times 60 hours, other times 40 hours etc.

Is it better to assign this code for the onEntry trigger?

Thanks for the assistance.

Bryan

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

Matt Long avatar image Matt Long commented ·

Seems to work just fine. Perhaps you can share your model so we can see what's wrong?

0 Likes 0 ·
Bryan Suharik avatar image Bryan Suharik commented ·
@Matt Long

Hi Matt, Attached is the model, but its quite complicated as the entire model is built from GUI1

To see the code, it's on the OnPress event of the SetUp Model of the GUI1. Specifically Row 694 is what i'm talking about where i do 2 things. First, assign the num of operators depedning on the item type and then define the Normal(gettablenum.... to define the cycle time.

But for some reason, everytime the unit comes through, it has the same time. I only know this because my dashboard doesn't change when i run the model. Always has the exact same average time by unit type. If it was a distribution, this number would change everytime but still be close.

Thanks, for the Help!denton-iap-model.fsm

0 Likes 0 ·
denton-iap-model.fsm (210.3 KiB)
Matt Long avatar image
0 Likes"
Matt Long answered Matt Long commented

Looks like you're doing some pretty crazy stuff. Might want to rethink how you're implementing your auto-build.

If it is for some reason necessary to add code to triggers, you need to include the following after setting the string value of the node:

switch_flexscript(theNode, 1);
buildnodeflexscript(theNode);
· 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.

Bryan Suharik avatar image Bryan Suharik commented ·

@Matt Long

Hi Matt, i think that specific node is already flexscript and may not need to be switched. I tried your suggestion and i still have the same issue. When I run the model the overall PM TAT times from the dashboard are the same everytime. On Each run, they would be different if the distributions were taken into effect.

0 Likes 0 ·
Matt Long avatar image Matt Long Bryan Suharik commented ·

The TAT numbers seem to change just fine each time I run the model.

Did you forget to turn off Repeat Random Streams?

1 Like 1 ·
tat1.png (25.9 KiB)
tat2.png (26.1 KiB)
Bryan Suharik avatar image
0 Likes"
Bryan Suharik answered

That was it! Thank you sir!!!

Bryan

5 |100000

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