Note: This question was essentially asked originally in the comments attached to the following idea:
https://answers.flexsim.com/idea/175340/as-onpreparescenario-onscenariostart-trigger-to-ex.html
I chose to extract the relevant information to make it more discoverable.
I am trying to configure my model via code in the OnSet of a parameter. When I change the parameter and reset the model interactively, everything appears to work as I expect; the model is configured according to the parameter. However, when I run an experiment and view the performance measures, I see System Console exceptions on the Console Output tab.
To replicate this issue:
- Open the attached model TestDropUserLibrary_Broken.fsm
- Load the attached user library UserLibrary1.fsl
- Run the Experiment job in the Experimenter
- Open the Performance Measures window and view the System Console output.
I didn't expect these exception messages. It seems like a bug because the model behaves differently as part of an experiment run compared to interactive run. Is this a known issue? Is there a workaround I can use?