Class DynamicMain

java.lang.Object
org.simplesim.examples.elevator.DynamicMain

public class DynamicMain extends Object
Example of a multi-domain agent system with routed messaging and dynamic model changes

To illustrate differences of a static and a dynamic modeling approach, both are used with the same simulation problem: the steering strategy of an elevator. Steering algorithm, graphical representation and common data structures are shared, so the focus lies on the differences of both approaches:

Static model:

  • There are no model changes during the simulation run.
  • Visitors store their current floor as part of their state.
  • Ports of elevator and visitor are connected directly.
  • Direct message forwarding is used.
Dynamic model:
  • Each floor is represented by a submodel containing its visitors.
  • Change of the floor is implemented as moving to an other submodel, the model is changed repeatedly during simulation run.
  • The model hierarchy Building-->Floor-->Visitor represents the real world situation comprehensibly.
  • Messaging is done by a routing mechanism.
Both approaches contain one agent whose state is observed by the instrumentation feature.
  • Constructor Details

    • DynamicMain

      public DynamicMain()
  • Method Details

    • main

      public static void main(String[] args)
      Example main method on how to set up a dynamic simulation model