question

Bob G avatar image
0 Likes"
Bob G asked Bob G commented

Setting Warmup Time in FlexScript

Is there a way to set the model warm-up time in FlexScript? I'm looking for a command similar to stoptime() but for warm-up time.

I found https://answers.flexsim.com/questions/79484/which-are-the-commands-to-update-the-startwarm-ups.html but the approach given in the answer does not work in my model. I'm using FlexSim 2023.2.1.

Thank you.

FlexSim 23.2.1
warmup time
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

Jacob W2 avatar image
0 Likes"
Jacob W2 answered Bob G commented

Hi @Bob G,

This is one way to set the warm-up time through code.

treenode warmupTime = Model.find("Tools/ModelUnits/ModelDateTimes/warmupTime/modelTime");
double newTime = 1003;
warmupTime.value = newTime;

This grabs the warm-up time tree node and then you write a value into the newTime variable which is then used to write the new warm-up time.

· 1
5 |100000

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

Bob G avatar image Bob G commented ·
Yes, this works. Thanks for your help!
0 Likes 0 ·