I would like to know how to trigger a Method at the start of your simulation with time? The reason for this is the method reads in values from a text and assigns values to variables which is used during the simualtion.
I also would like to know how to trigger a Method at the end of your simulation run (end time of EventController)? Reason is that values which was generated during the simulation needs to be written into a list which is then written into a textfile.
Any advice, help, code or alternative methods will be appreciated!
Solved! Go to Solution.
For initializing your simulation you can use any method with the name init. The eventcontroller calls each init-method in the model before start the experiment. For works after end of the simulation you can use a method with the name endSim. This is also called by the eventcontroller after end of each experiment.
When you look for an option to call a method at each start/stop of the experiment you can use an observer for EventController.isRunning.
freelance simulation specialist