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
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:

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