public class TimeModelContinuous extends TimeModelDateBased
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
PROP_AccelerationFactor |
static java.lang.String |
PROP_TimeFormat |
static java.lang.String |
PROP_TimeStart |
static java.lang.String |
PROP_TimeStop |
DEFAULT_TIME_FORMAT, timeFormat, timeStart, timeStop
Constructor and Description |
---|
TimeModelContinuous()
Instantiates a new continuous TimeModel .
|
TimeModelContinuous(java.lang.Long startTime,
java.lang.Long stopTime)
Instantiates a new continuous TimeModel ..
|
Modifier and Type | Method and Description |
---|---|
double |
getAccelerationFactor()
Gets the acceleration factor.
|
TimeModel |
getCopy()
Returns a copy of the current TimeModel.
|
TimeModelBaseExecutionElements |
getDisplayElements4Execution()
Returns a DisplayJToolBar4Execution (an extended JToolBar) that consists of the necessary
tools to handle a TimeModel during execution.
|
JPanel4TimeModelConfiguration |
getJPanel4Configuration(Project project)
Returns the DisplayJPanel4Configuration.java (an extended JPanel) for the configuration
of a TimeModel (before the agency is executed).
|
protected long |
getSystemTimeSynchronized()
Returns the system time, which is either the synchronized time of the SimulationService
or, in case of an inactive JADE platform, the time of the local machine.
|
long |
getTime()
Returns the current time depending on the simulation setup.
|
jade.core.Agent |
getTimeAskingAgent()
Gets the agent.
|
long |
getTimeDiff()
Returns the time difference.
|
java.util.HashMap<java.lang.String,java.lang.String> |
getTimeModelSetting()
Returns the setup configuration of the TimeModel as HashSet
|
boolean |
isExecuted()
Checks if this time model is executed and so, if time is moving forward.
|
protected void |
logTookLocalTime()
Outputs a message to the STDERR console, indicating that no load balancing agent was set and therefore the local time was taken
|
void |
setAccelerationFactor(double accelerationFactor)
Sets the acceleration factor.
|
void |
setExecuted(boolean executeTimeModel)
Sets the time model to be executed in order to forward the time in the model.
|
void |
setTimeAskingAgent(jade.core.Agent askingAgent)
Sets the agent.
|
void |
setTimeModelSettings(java.util.HashMap<java.lang.String,java.lang.String> timeModelSettings)
Sets the setup configuration as HashSet
|
void |
step()
Steps the TimeModel.
|
void |
stepBack()
Steps the TimeModel.
|
getDateForMidnight, getDateForMidnight, getTimeFormat, getTimeStart, getTimeStop, setTimeFormat, setTimeStart, setTimeStop
getStopWatch, setStopWatch
public static final java.lang.String PROP_TimeStart
public static final java.lang.String PROP_TimeStop
public static final java.lang.String PROP_AccelerationFactor
public static final java.lang.String PROP_TimeFormat
public TimeModelContinuous()
public TimeModelContinuous(java.lang.Long startTime, java.lang.Long stopTime)
startTime
- the start time for the time modelpublic TimeModel getCopy()
TimeModel
public double getAccelerationFactor()
public void setAccelerationFactor(double accelerationFactor)
accelerationFactor
- the accelerationFactor to setpublic void setExecuted(boolean executeTimeModel)
executeTimeModel
- the new executedpublic boolean isExecuted()
public long getTimeDiff()
public long getTime()
getTime
in class TimeModelDateBased
setTimeAskingAgent(Agent)
,
SimulationServiceHelper.getSynchTimeMillis()
protected long getSystemTimeSynchronized()
SimulationServiceHelper.getSynchTimeMillis()
protected void logTookLocalTime()
public jade.core.Agent getTimeAskingAgent()
public void setTimeAskingAgent(jade.core.Agent askingAgent)
askingAgent
- the new agentpublic void step()
TimeModel
public void stepBack()
TimeModel
public JPanel4TimeModelConfiguration getJPanel4Configuration(Project project)
TimeModel
getJPanel4Configuration
in class TimeModel
project
- the current Agent.GUI Projectpublic TimeModelBaseExecutionElements getDisplayElements4Execution()
TimeModel
getDisplayElements4Execution
in class TimeModel
public void setTimeModelSettings(java.util.HashMap<java.lang.String,java.lang.String> timeModelSettings)
TimeModel
setTimeModelSettings
in class TimeModel
timeModelSettings
- the time model setup configuration as HashSetpublic java.util.HashMap<java.lang.String,java.lang.String> getTimeModelSetting()
TimeModel
getTimeModelSetting
in class TimeModel