question

Simpson S2 avatar image
0 Likes"
Simpson S2 asked Simpson S2 commented

Run and re-run model by Flexsim Script

Hi,

I have built a simple to run repeatedly with changing variables so I would like to create a script to start, change variables and then restart repeatedly. Each time it will run automatically, generate an .xlsx file for the result, and then alter the variables by Python script.

I have searched the answer from https://answers.flexsim.com/questions/106222/command-to-open-model-and-run-from-scripts.html.. I found it is time consuming for each iteration to open flexsim application , run the script and then alter the variables.

In stead, I am trying to use Flexsim Script to do, so it can save the time to open and close flexsim application. However, I found Flexsim will not run the scripts line by line, i.e. it will run all the line excpet 2 x go(), then run the first go() only with runspeed 30000.

Could anyone help me on this? Thank you so much.

  1. /**1st iteration*/
  2. resetmodel();
  3. runspeed(10000);
  4. go();
  5. stoptime(90000);
  6. getvarnode(Model.find("Tools/TimeTables/Worker_A1"), "table").as(Table)[1][3]=33000;
  7.  
  8. /**2nd iteration*/
  9. resetmodel();
  10. runspeed(30000);
  11. go();
  12. stoptime(90000);





FlexSim 20.1.3
flexscriptscriptingautomatic
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

Joerg Vogel avatar image
0 Likes"
Joerg Vogel answered Simpson S2 commented
· 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.