question

asb.p avatar image
0 Likes"
asb.p asked Jordan Johnson commented

Experimenter - advanced triggers issues and Ideas

Hello All,

I have 3 questions/ issues regarding using experimenter advanced triggers

1. Why the initial value used for variables was always Solution ID 2 instead of Solution ID1 in Optimizer run?

2. Advanced triggers cannot be used for optimizer run?

If I try to write some code in End of experiment is becoming blank at the end of optimizer run Why? - Refer endofexperimenttrigger.png

3. If I want to develop a sequential experimentation algorithm Example - experimenter has to start with initial variable values of the variables then at the end of experiment 1, we will evaluate the performance measures and then define the new values of the variables for the next experiment. This process goes on until some termination criteria lets say 100 experiments. How to implement this? as an example It will be great if anyone just set up experiment 2 with variable1 value as 10.75 at the end of the 1st experiment in the attached model.

Thanks in Advance,

Praneeth Akondi.

test.fsm

FlexSim 18.0.10
experimentertriggersoptquest
test.fsm (21.6 KiB)
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
0 Likes"
Jordan Johnson answered Jordan Johnson commented

For question 1, the optimizer will run the scenarios given in the experimenter first (if the "Use Scenarios as possible solutions" box is checked). However, the order they run in is up to the optimizer. Some models stick more with the original order, and some are fairly shuffled. The optimizer is trying to learn about your system has fast as it can, so it re-orders the initial scenarios to help it learn as fast as possible.

The advanced triggers run the same in the experimenter and optimizer. There is a bug with applying the code in the triggers. If you want to be sure that your code has applied, be sure to use the "Apply" button in the code window, close the code window, and then close the Experimenter window.

As far as creating a loop of experiments, FlexSim doesn't have any built in features to do that. However, you may be able to write an End of Experiment trigger that analyzes the results and creates a new experiment, and if the max experiments has not been reached, run another experiment.

· 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.

asb.p avatar image asb.p commented ·

Thanks for the reply Jordan. Q1 and Q2 are very clearly explained.

What are the list of commands to get the reference of the last experiment?. The is no documentation for using advanced capabilities of optquest and experimenter.

How to make optimizer run the next experiment once you updated the variable values. - applicationcommand("experimenter") ?

It will be great if you show one baby example to understand better.

Ex. Just change the variable1 = 10.5(some arbitary value) and make the experimenter run again using the end of experiment trigger in the model attached.

0 Likes 0 ·
Jordan Johnson avatar image Jordan Johnson ♦♦ asb.p commented ·

To make the experimenter run, you can use this code:

applicationcommand("runexperiment");<br>

Be aware that this application commands expects the model to be configured a certain way. I recommend looking at the code in the Run Experiment button's OnPress trigger (VIEW:/standardviews/statistics/Experimenter/tabcontrol/Experiment Run/Run Experiment>OnPress).

To change variable values, you just need to change the values in the Experimenter tree. In your example, just change the node value of MODEL:/Tools/Experimenter/ExperimentVariables/Variable 1/Scenario 1.

If you aren't running replications, it would probably just be easier to not use the experimenter. You can just set up a model trigger at a certain time to stop the model, reset, and run it.

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.