question

Maria_vitoria Pb avatar image
0 Likes"
Maria_vitoria Pb asked Jason Lightfoot answered

How to change processing time according to machine utilization?

Hi!

I have two machines with a processing time of 30s, but when their utilization reaches 90%, I need to reduce these processing times to 15s. Is it possible? How can I do it?

FlexSim 18.2.3
processing timesmachine utilization
5 |100000

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

1 Answer

Jason Lightfoot avatar image
1 Like"
Jason Lightfoot answered

Here's an example.

I added 3 labels to the processor:

1650366016993.png

Then I changed its cycletime expression to this code:

/**base on utilisation and labels*/
Object current = ownerobject(c);
Object item = param(1);
int port = param(2);

TrackedVariable tv= current.stats.state();
double util = 100-tv.getTotalTimeAt("idle")/time()*100;
if (util>=current.speedupUtil){
       current.color=Color.blue;
        return current.ptime_fast;
}
current.color=Color.green;
return current.ptime;


v18_ptime_basedonUtil.fsm


5 |100000

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