Recently, i'm studying simulation-based optimization, and i constructed a heuristics algorithm which needs to use flexsim to compute objective function.
Actually, I have solved the problem with the c++, which uses a bat file to launch flexsim and run the model, but it consumes a lot of time because it needs to open and close flexsim constantly. therefore, I want to reprogramme with flexscript in the script console, which can save time to open flexsim. (generally, objective function is mean value of more times simulation. Fortunately, it has been implemented in processflow.)
However, the key problem is in script console i can't obtain the result of the simulation which is launched by go(); in addition, i founded that go() is only responsible for starting the simulation, but when it ends is unknown. even if knowing, I can't control flexsim to execute the next code of go () at the end of the simulation.
I have posted a similar problem, see How to obtain the simulation data after executing go() in script console?
Does anybody have a better idea, tell me, thanks!!!