Package com.amalgamasimulation.engine
Interface Agent
- All Superinterfaces:
Timeable
- All Known Implementing Classes:
GraphAgent
,LongAgent
,LongAgentTail
,Train
Base type of all agent classes
- Author:
- Andrey Malykhanov
-
Method Summary
Modifier and TypeMethodDescriptiondefault LocalDateTime
Returns the begin date, i.e.engine()
Returns the reference to theEngine
that is used to simulate this agent's behaviorgetName()
Returns the name of this agentdefault double
time()
Returns the current simulation timedefault ChronoUnit
timeUnit()
Returns the simulation time unit, i.e.Methods inherited from interface com.amalgamasimulation.utils.time.Timeable
dateToTime, dateToTime, day, duration, hour, minute, second, timeToDate, week, wholeDays, wholeDays, wholeHours, wholeHours, wholeUnits
-
Method Details
-
getName
String getName()Returns the name of this agent- Returns:
- name of this agent
-
engine
Engine engine()Returns the reference to theEngine
that is used to simulate this agent's behavior- Returns:
- reference to the
Engine
that is used to simulate this agent's behavior
-
time
default double time()Returns the current simulation time- Returns:
- current simulation time
-
beginDate
Description copied from interface:Timeable
Returns the begin date, i.e. the simulation date that corresponds to zero simulation time -
timeUnit
Description copied from interface:Timeable
Returns the simulation time unit, i.e. period unit that corresponds to one unit of simulation time
-