Class FM2SimRunControlMessage
- java.lang.Object
-
- org.sim0mq.message.Sim0MQMessage
-
- org.sim0mq.message.federationmanager.FM2SimRunControlMessage
-
- All Implemented Interfaces:
Serializable
public class FM2SimRunControlMessage extends Sim0MQMessage
SimRunControlMessage, FM.2. Message sent by the Federation Manager to the Model to initialize a simulation.Copyright (c) 2016-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
BSD-style license. See Sim0MQ License.- Author:
- Alexander Verbraeck
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
FM2SimRunControlMessage.Builder
Builder for the SimRunControl Message.
-
Field Summary
-
Fields inherited from class org.sim0mq.message.Sim0MQMessage
VERSION
-
-
Constructor Summary
Constructors Constructor Description FM2SimRunControlMessage(Object[] objectArray)
FM2SimRunControlMessage(Object federationId, Object senderId, Object receiverId, Object messageId, Object runDuration, Object warmupDuration, Object offsetTime, double speed, int numberReplications, int numberRandomStreams, Map<Object,Long> streamMap)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getNumberRandomStreams()
int
getNumberReplications()
NumberTime
getOffsetTime()
NumberDuration
getRunDuration()
double
getSpeed()
Map<Object,Long>
getStreamMap()
NumberDuration
getWarmupDuration()
-
Methods inherited from class org.sim0mq.message.Sim0MQMessage
check, createByteArray, createObjectArray, decode, decodeToArray, encodeReplyUTF16, encodeReplyUTF8, encodeUTF16, encodeUTF8, getFederationId, getMagicNumber, getMessageId, getMessageTypeId, getNumberOfPayloadFields, getReceiverId, getSenderId, isBigEndian, listPayload, print
-
-
-
-
Constructor Detail
-
FM2SimRunControlMessage
public FM2SimRunControlMessage(Object federationId, Object senderId, Object receiverId, Object messageId, Object runDuration, Object warmupDuration, Object offsetTime, double speed, int numberReplications, int numberRandomStreams, Map<Object,Long> streamMap) throws Sim0MQException, NullPointerException
- Parameters:
federationId
- the federation id can be coded using different types. Examples are two 64-bit longs indicating a UUID, or a String with a UUID number, a String with meaningful identification, or a short or an int with a simulation run number.senderId
- The sender id can be used to send back a message to the sender at some later time.receiverId
- The receiver id can be used to check whether the message is meant for us, or should be discarded (or an error can be sent if we receive a message not meant for us).messageId
- The unique message number is meant to confirm with a callback that the message has been received correctly. The number is unique for the sender, so not globally within the federation.runDuration
- Duration of the run of a single replication, including the warmup time, if present. The type is any numeric type (1-5) or Float or Double with Unit (25, 26) of type Duration (25).warmupDuration
- Warmup time of the model in time units that the model uses. The type is any numeric type (1-5) or Float or Double with Unit (25, 26) of type Duration (25).offsetTime
- Offset of the time (e.g., a model time of 0 is the year 2016, or 1-1-2015). The type is any numeric type (1-5) or Float or Double with Unit (25, 26) of type Time (26).speed
- Speed as the number of times real-time the model should run; Double.INFINITY means as fast as possible.numberReplications
- Number of replications for stochastic uncertainties in the model.numberRandomStreams
- Number of random streams that follow.streamMap
- Random streams and seeds.- Throws:
Sim0MQException
- on unknown data typeNullPointerException
- when one of the parameters is null
-
FM2SimRunControlMessage
public FM2SimRunControlMessage(Object[] objectArray) throws Sim0MQException, NullPointerException
- Parameters:
objectArray
- Object[]; Full message object array- Throws:
Sim0MQException
- on unknown data typeNullPointerException
- when one of the parameters is null
-
-
Method Detail
-
getRunDuration
public final NumberDuration getRunDuration()
- Returns:
- runDuration
-
getWarmupDuration
public final NumberDuration getWarmupDuration()
- Returns:
- warmupDuration
-
getOffsetTime
public final NumberTime getOffsetTime()
- Returns:
- offsetTime
-
getSpeed
public final double getSpeed()
- Returns:
- speed
-
getNumberReplications
public final int getNumberReplications()
- Returns:
- numberReplications
-
getNumberRandomStreams
public final int getNumberRandomStreams()
- Returns:
- numberRandomStreams
-
-