question

anon-user avatar image
0 Likes"
anon-user asked tannerp answered

Experimenter operation

I created over 100 experimental scenarios in an Excel spreadsheet.

Pasting the spreadsheet into Experiment does not increase the number of columns.
Do I have to press "Add a scenario" in Experimenter 100 times?

FlexSim 19.0.9
experimenterflexsim 19.0.9scenario
· 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.

Joerg Vogel avatar image Joerg Vogel commented ·

Yes, and if you look into the tree of the experimenter, you see a structure of an object with some nodes which are an experiment variable. There is at least one coupled node in this object and you can try to duplicate this structure by an own source code.

0 Likes 0 ·
anon-user avatar image anon-user Joerg Vogel commented ·

Is there an easier way to increase to 100 scenarios instead of pressing "Add a scenario" 100 times?

-1 Like -1 ·

1 Answer

tannerp avatar image
0 Likes"
tannerp answered

@Shimizu M,

Jörg has explained the method for creating multiple variables on this post and your identical question in another post.

I created a sample script that will duplicate the first Experimenter variable. It only works if there is already one variable in the Experimenter when you run the code.

for(int i = 0; i < 100; i++)    {
    treenode theNode = Model.find("Tools/Experimenter/ExperimentVariables/Variable 1");
    treenode copyNode = nodeinsertafter(theNode);
    createcopy(theNode, Model.find("Tools/Experimenter/ExperimentVariables"), 0);
    Model.find("Tools/Experimenter/ExperimentVariables/2").destroy();
}
5 |100000

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