How to save the replications of FlexSim Optimizer?

How to save the replications of FlexSim Optimizer?

jouky_d
Not applicable
23 Views
4 Replies
Message 1 of 5

How to save the replications of FlexSim Optimizer?

jouky_d
Not applicable

[ FlexSim 20.0.2 ]

Hello,


When I simulate using Experimenter Run, I can obtain a Raw Data table with all scenarios and the result of a variable for each replication in that scenario. However, when I run the Optimizer Run window to search for the best solution, the table that I can export is a table of means of replications, it doesn't give the result for each replication, it only reports the mean of all replications.

So, my questions are:

1) How do I obtain the table with all replication's results that FlexSim has done during the optimization run?
2) How do I select the optimal scenario? Sometimes there are lots of points and I select using the mouse a good scenario but not the optimal. Is there a way to do it?

Thank you!

0 Likes
Accepted solutions (1)
24 Views
4 Replies
Replies (4)
Message 2 of 5

JordanLJohnson
Autodesk
Autodesk
Accepted solution

To get all replication data, you should be able to run the query

SELECT * FROM Experiment.PerformanceMeasures

To select the optimal solution, there's not currently a slick way. If you are running a single-objective optimization, you can use this code (or something similar) to get the best solution ID, and then add it to the experimenter:

treenode results = Model.find("Tools/OptQuest/results");
int bestSolution = Table.query("SELECT [Solution ID] FROM $1 WHERE Rank = 1", results)[1][1];
maintree().find("project/exec/optquest/addSolutionAsScenario").evaluate(bestSolution);
.


Jordan Johnson
Principal Software Engineer
>

Message 3 of 5

jouky_d
Not applicable

But where do I have to put this code to get all replication data? When I run the optimizer, I cannot see any place to introduce the code that you've sent me. Do you have an example of this by any chance?

0 Likes
Message 4 of 5

JordanLJohnson
Autodesk
Autodesk

To see the data, you can run the first query as part of a Calculated Table. You can add one from the toolbox, and enter the query on the Calculations tab (you may need to click the Enable Direct Editing box first).

For the second code sample, you can open a Script window (from the debug menu), paste, and run the code from there. Then, the best solution should be visible in the table of Scenarios in the Experimenter.

.


Jordan Johnson
Principal Software Engineer
>

Message 5 of 5

jouky_d
Not applicable

Thank you!

0 Likes