Class DynamicDecorator

java.lang.Object
org.simplesim.simulator.DynamicDecorator
All Implemented Interfaces:
Simulator

public final class DynamicDecorator extends Object implements Simulator
Decorator class to enable dynamic changes of the model during simulation run.

This class wraps any other simulator implementation and registers itself as EventsProcessedListener to be called after each simulation cycle. Communication of the agents' change requests is done by a static and thread-safe queue within the AbstractAgent class. Changes are done by concrete implementations of the ChangeRequest interface. So, agents prepare and organize the change process whereas the the various change request implementations are responsible for the conduct of the specified model change. This class ensures the processing of the change requests.

To use model change functionality, agents have to issue change request via AbstractAgent#addModelChangeRequest(ChangeRequest) class.

See Also:
  • Constructor Details

    • DynamicDecorator

      public DynamicDecorator(Simulator value)
  • Method Details