question

unai avatar image
0 Likes"
unai asked unai edited

Parameters with global table

Hello,

I want to use the experimenter to simulate different scenarios of the next model. I have the next parameters which I want to change them in the experimenter: The arrival time of the items, the quantity and the process time. I have created a global table for each parameter and in each row I have set the data of each scenario. I have created also the parameters in the toolbox but I don't know how to set the global table in the value of each parameter in the parameter section of the toolbox. I have attached the model, thank you. Example.fsm

FlexSim 22.1.4
parameterexperimenterglobaltable
example.fsm (147.0 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

Jason Lightfoot avatar image
0 Likes"
Jason Lightfoot answered unai edited

You don't need the global tables - you can enter the values into the experimenter job definition:

1707735594704.png


Then either use the OnSet of the parameter to write the value to the reference object's property*:

1707735701874.png

Or have the object read the property:

1707735751368.png

Note that the stream expression for process time will need to change for the latter from getstream(ownerobject(c)) to getstream(reference)


*Also note that you will need to edit the code of the OnSet to set the ProcessTime since it was omitted from the version you are using - it doesn't appear as a dropdown option.


1707735594704.png (32.2 KiB)
1707735701874.png (14.2 KiB)
1707735751368.png (4.7 KiB)
· 7
5 |100000

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

unai avatar image unai commented ·

Thank you very much but, is there a way to do it with global tables? Because I have to apply it to a more complicated model and I would like to do it with global tables.

0 Likes 0 ·
unai avatar image unai unai commented ·
I would like to create parameters in order to change the global table variables.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ unai commented ·

You can use the Parameter onSet to change table values either referring to the cell in the OnSet code or having the cell as a reference and just using reference.value=newValue; in the OnSet.

0 Likes 0 ·
unai avatar image unai commented ·

I can't do it. Automatically the values of the global table are set to 1 and the following error appears.Example.fsm

Captura de pantalla 2024-02-12 153642.pngCaptura de pantalla 2024-02-12 153652.png

0 Likes 0 ·
unai avatar image unai unai commented ·
And then also I have thought to use the experimenter to change these values.
0 Likes 0 ·
Jason Lightfoot avatar image Jason Lightfoot ♦♦ unai commented ·

You haven't any values to set - the parameter table is blank.

Also - you've set the type to expression so the numbers will get written as strings to the table cells - is that what you want?

0 Likes 0 ·
Show more comments