Home > Mobile >  Activating an event manually in AnyLogic?
Activating an event manually in AnyLogic?

Time:01-02

I'd like to do a simulation with specific implementations, which don't have to occur by every run. I don't want to have them occurring randomly, but activating them manually, so I can see how the simulation runs with and without those events.

I was thinking about bringing them in by a small occurrence rate within the simulation time, but I'd rather control them by myself. Alternatively, maybe there is a way to set an event which I could deactivate manually? If that is possible, It sure could also work.

CodePudding user response:

Create a button and a function executeMyEvent().

In the function, write the stuff that should happen when you click the button.

In the button, write executeMyEvent();.

At runtime, click the button whenever you like and the code is executed. But only if and when you want.

  • Related