Reputation: 75
I would like to make the cyclic event. This event periodically calculates some parameters of the model. However, the event should be triggered once by a condition. I have no idea how to do that.
I tried to make the event.reset() at the beginning and then restart it after the appropriate condition is met.
However, I received the errors:" agent cannot be resolved to a variable"
If I delete the reset and restart functions for the event, everything will be ok. The event is cyclic and works fine.
The double click on the error shows the stings where the error is occurred (highlighted with red color):
Upvotes: 0
Views: 290
Reputation: 2213
On model start-up, suspend the event by using:
event.reset();
Once the condition you have is met, use:
event.restart();
Upvotes: 1