Enum Class ModelState

java.lang.Object
java.lang.Enum<ModelState>
org.sim0mq.federationmanager.ModelState
All Implemented Interfaces:
Serializable, Comparable<ModelState>, Constable

public enum ModelState extends Enum<ModelState>
State of a model, to be used in a state transition model of model execution by a FederationManager.

Copyright (c) 2016-2024 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See Sim0MQ License.

$LastChangedDate: 2015-07-24 02:58:59 +0200 (Fri, 24 Jul 2015) $, @version $Revision: 1147 $, by $Author: averbraeck $, initial version Apr 20, 2017
Author:
Alexander Verbraeck
  • Enum Constant Details

    • NOT_STARTED

      public static final ModelState NOT_STARTED
      Model has not yet been started.
    • STARTED

      public static final ModelState STARTED
      Model has been started, e.g. by a FederateStarter.
    • RUNCONTROL

      public static final ModelState RUNCONTROL
      SimRunControl has been sent.
    • PARAMETERS

      public static final ModelState PARAMETERS
      Parameter(s) have been sent.
    • SIMULATORSTARTED

      public static final ModelState SIMULATORSTARTED
      Simulator has been started.
    • SIMULATORENDED

      public static final ModelState SIMULATORENDED
      Simulator has ended.
    • STATISTICSGATHERED

      public static final ModelState STATISTICSGATHERED
      Statistics have been gathered.
    • TERMINATED

      public static final ModelState TERMINATED
      Model terminated.
    • ERROR

      public static final ModelState ERROR
      Error occurred. Sequence should stop.
  • Method Details

    • values

      public static ModelState[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ModelState valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • isNotStarted

      public boolean isNotStarted()
      Return whether the model has not yet started.
      Returns:
      boolean; whether the model has not yet started
    • isStarted

      public boolean isStarted()
      Return whether the model has passed the started phase.
      Returns:
      boolean; whether the model has passed the started phase
    • isRunControl

      public boolean isRunControl()
      Return whether the run control has been sent.
      Returns:
      boolean; whether the run control has been sent
    • isParameters

      public boolean isParameters()
      Return whether the parameter(s) have been sent.
      Returns:
      boolean; whether the parameter(s) have been sent
    • isSimulatorStarted

      public boolean isSimulatorStarted()
      Return whether the simulator has been started.
      Returns:
      boolean; whether the simulator has been started
    • isSimulatorEnded

      public boolean isSimulatorEnded()
      Return whether the simulator has ended.
      Returns:
      boolean; whether the simulator has ended
    • isStatisticsGathered

      public boolean isStatisticsGathered()
      Return whether the statistics have been gathered.
      Returns:
      boolean; whether the statistics have been gathered
    • isTerminated

      public boolean isTerminated()
      Return whether the model has been terminated.
      Returns:
      boolean; whether the model has been terminated
    • isError

      public boolean isError()
      Return whether the federation is in the error state.
      Returns:
      boolean; whether the federation is in the error state