Information Technology Reference
In-Depth Information
de.rsiegfried.grams.model.time
Time
+getTime(Resolution res, int start, int end) : Time
+getInterval(Resolution res, int duration) : TimeInterva l
+getStart() : TimePoint
+getEnd() : TimePoint
+getTimePoint(Resolution res, int timePoint) : TimePoint
«enumeration»
Resolution
TENTH_SECONDS,
SECONDS,
MINUTES,
TIME_STEPS
resolution
start
end
«interface»
TimePoint
less(TimePoint other) : boolean
...
«interface»
TimeInterval
add(TimeInterval other) : TimeInterval
IntegerTimePoint
-Resolution resolution
-int timePoint
IntegerInterval
-Resolution resolution
-int duration
Figure 9.3: Class diagram of package time .
9.2.1 Simulation time
The simulation time is represented by the class Time and the two
interfaces TimePoint and TimeInterval (see Figure 9.3). Furthermore,
due to the discretization of simulation time, the enumeration type
Resolution is introduced.
The central class of this package is Time . In order to create an
instance of this class, the client has to call the static getTime() -
method. This method takes as arguments the desired resolution as
well as the start point and end point of the simulation time. The
start point and end point are evaluated by the simulation engine and
define the duration (in terms of simulation time) of a simulation.
The interfaces TimePoint and TimeInterval define operations avail-
able on a single point in time and on a time interval (e.g., comparison
Search WWH ::




Custom Search