question

Jouky D avatar image
0 Likes"
Jouky D asked Jouky D commented

How to save the replications of FlexSim Optimizer?

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!

FlexSim 20.0.2
experimenteroptimizerexport datareplicationsflexsim 20.0.2
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

·
Jordan Johnson avatar image
1 Like"
Jordan Johnson answered Jouky D commented

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);
· 3
5 |100000

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

Jouky D avatar image Jouky D commented ·

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 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ Jouky D commented ·

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.

1 Like 1 ·
Jouky D avatar image Jouky D Jordan Johnson ♦♦ commented ·

Thank you!

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

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