If you are using an external program like R or Python, you can usually set up an optimization loop using files. Have R or Python write the current variables values to a file. Then you can start FlexSim from R or Python, using command line parameters, and have it open a specific model. You can use the OnModelOpen trigger to have the model read the variable values file, run the model, and then dump your performance measures to a file. You can then read that file with R or Python, and the optimization cycle can continue.
See the answers to this question for more information:
https://answers.flexsim.com/questions/21116/automatically-configure-and-run-a-flexsim-model.html
.
Jordan Johnson
Principal Software Engineer
>