question

Craig DIckson avatar image
2 Likes"
Craig DIckson asked anthony.johnson edited

Experimenter 2021 and Dashboards

I have some existing models that use dashboard elements (e.g. editable text, table), connected to global tables, to provide inputs to the logic. When I wanted to use the experimenter, I could refer to those same global table cells to create a scenario.

In the new experimenter I have to define a parameter, and I am struggling to understand how to connect the parameter to the global table. For a variety of reasons I do not want to replace the global tables with parameter tables. I am hoping that I have missed something and you can tell me how to use parameters with global tables.


FlexSim 21.1.2
experimenterflexsim 21.1.2
· 5
5 |100000

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

anthony.johnson avatar image
3 Likes"
anthony.johnson answered anthony.johnson edited

Here's another alternative to get it working the way it used to. I think the main change that's messing up your workflow is that model parameters, by default, assert their "scenario" when you reset the model, i.e. it sets the global table value, whereas before (when they were just experiment variables) they did not. We made this change for what we believe to be very good reasons. However, it appears that no matter our reasoning for this change, you strongly disagree. So rather than re-argue our side, here's a solution that should essentially get you back to the way FlexSim used to work.

Make the first parameter in the table a binary parameter called UsingExperimenter. In the table itself, give it a value of 0. Then, for every other parameter, make the condition of its OnSet trigger be that UsingExperimenter must be 1. Then, when you define experimenter scenarios, make sure UsingExperimenter is 1 in every scenario.

This way, the model will only "assert" a given scenario, i.e. set the global table value, when the experimenter is being used. Thus you get all the same functionality you got before, like dashboard table views, editing the global table values directly, etc. and you can use the experimenter to experiment with these values.

In the meantime, Jordan is mulling over various options for better linkage between model parameters and node values in the model, similar to your bi-directional suggestion.

ChangeTableInExperimentOnly.fsm


5 |100000

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

Jordan Johnson avatar image
2 Likes"
Jordan Johnson answered Phil BoBo commented

Hi Craig, I can confirm these details:

  1. Yes, parameters are the only way to use the Experimenter (and optimizer) now. As we add additional features that need to manipulate input values (such as AI integration, or maybe better default web interfaces), those features will also rely on the parameter tables. We have promoted the practice of making parameter tables to a supported feature.
  2. Yes, parameters become the controlling values for the model. That is their purpose. Many parameters set various things in the model on reset. The update script we wrote adds parameters that set node values in global tables; the parameters control the table values. Usually, however, the user will create the parameters themselves, and so they won't be surprised when things change in their model on reset. Note that if you set the "Default Reset Scenario" in the old experimenter, you have the exact same problem; the experimenter suddenly controls the model, not the global tables, and values change on reset without telling you.
  3. A global table is just a view to a bunch of nodes. So using a table view or a dashboard or an edit all changed the node value. The same is true for parameter tables, except they (possibly) have OnSet code that fires whenever they change, and also on reset. It would be like attaching a trigger to a cell in a table somehow.
  4. If by "one dimensional" you mean that they are a list of inputs, then yes, that is true. The experimenter and optimizer (and future features) expect to change a list of input values, so parameter tables provide that list.
  5. That is correct; it's a one-to-one relationship between parameter tables and parameter dashboards at the moment.
  6. You can link an edit. But as you can see with the parameter dashboard, you can link other types of controls as well, that may be more suited to the parameter's possible values (like a checkbox for binary values).
  7. This is something on our minds. Maybe it would be good to have a table view of a parameter table on the dashboard. And it is technically possible now, but that table view lets you do a bunch of things that would break parameter tables, so we don't really want people to do that just yet.

It isn't necessary to have OnSet logic in a parameter. You can configure your model to simple "read" the value at certain points. For example, you can have a Scheduled Source in Process Flow create a number of tokens based on a model's parameter. Or you can have a processor get a parameter's value as a process time (Option and Expression parameters are useful in these cases). You can even write code in the On Reset of your model that reads the parameters, and configures the model that way. OnSet triggers can be very convenient, however.

To return control to a global table, you'd need to make a custom button or user command, and write code that sets parameter values according to a global table. But you'll need to press that button manually; parameters fire their OnSet triggers before anything else happens in the sequence of logic that happens when you click the reset button.

· 25
5 |100000

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