Package org.sim0mq.federationmanager
Enum Class ModelState
- All Implemented Interfaces:
Serializable
,Comparable<ModelState>
,Constable
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.
- Author:
- Alexander Verbraeck
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionError occurred.Model has not yet been started.Parameter(s) have been sent.SimRunControl has been sent.Simulator has ended.Simulator has been started.Model has been started, e.g. by a FederateStarter.Statistics have been gathered.Model terminated. -
Method Summary
Modifier and TypeMethodDescriptionboolean
isError()
Return whether the federation is in the error state.boolean
Return whether the model has not yet started.boolean
Return whether the parameter(s) have been sent.boolean
Return whether the run control has been sent.boolean
Return whether the simulator has ended.boolean
Return whether the simulator has been started.boolean
Return whether the model has passed the started phase.boolean
Return whether the statistics have been gathered.boolean
Return whether the model has been terminated.static ModelState
Returns the enum constant of this class with the specified name.static ModelState[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NOT_STARTED
Model has not yet been started. -
STARTED
Model has been started, e.g. by a FederateStarter. -
RUNCONTROL
SimRunControl has been sent. -
PARAMETERS
Parameter(s) have been sent. -
SIMULATORSTARTED
Simulator has been started. -
SIMULATORENDED
Simulator has ended. -
STATISTICSGATHERED
Statistics have been gathered. -
TERMINATED
Model terminated. -
ERROR
Error occurred. Sequence should stop.
-
-
Method Details
-
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
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 nameNullPointerException
- 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
-