I have a problem with a method being called when it is not supposed to. I have created a start button to import excel files to my model and it is supposed to do only this. However, when I press the start button it calls another method, even when the simulation is not running. This method should also not be called in the initiation of the simulation but only when it is called from a shift calendar.
Can anyone tell me why this is happening?
It probably means that you method is triggered somewhere anyway, but you forgot where you set it. Please go to the General tab and use Find Object to look up where the method is triggered. Fill in the method's name and look for Attribute and for Source Code.
Thanks for your answer.
However, I cannot find where the method is triggered. When I search for it in Find Object it only shows in source code that it is triggered in the shift calendars attribute. And for attribute only the method itself turns up.
Clear, the Unplanned-control is triggered when the Unplanned-attribute changes. This can also happen when a rest occurs.
You can check in the method if an EventController is running:
if NOT EventController.isRunning then return end