|
|||||||||
| Home >> All >> [ desmoj overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
desmoj
Class SimTime

java.lang.Objectdesmoj.SimTime
- public class SimTime
- extends java.lang.Object
Represents points in simulation time. Is used to indicate points in simulation time at which the state of the model changes. Each point in simulation time is represented by an individual object of this class and offers its own methods for arithmetic operations. Ensures that only valid points of time are generated.
- Version:
- DESMO-J, Ver. 1.5 copyright (c) 2001 licensed under GNU GPL
| Field Summary | |
private double |
myTime
Stores the point of simulation time as double value for each SimTime object. |
static SimTime |
NOW
NOW defines the value for scheduling an object immediately, even replacing the current SimProcess. |
| Constructor Summary | |
SimTime(double time)
Constructs a simtime object with the given initial time value. |
|
SimTime(SimTime time)
Constructs a simtime object with the given initial time object. |
|
| Method Summary | |
static SimTime |
add(SimTime a,
SimTime b)
Returns a new simtime object with a time value representing the sum of the time values of the given simtime objects. |
static SimTime |
diff(SimTime a,
SimTime b)
Returns a new simtime object with a time value representing the absolute difference of the time values of the given simtime objects. |
double |
getTimeValue()
Returns the value of the simtime object as type double. |
static boolean |
isEqual(SimTime a,
SimTime b)
Checks if the two simtime parameters describe the same point of simulation time. |
static boolean |
isLarger(SimTime a,
SimTime b)
Checks if the first of two points of simulation time is larger than the second. |
static boolean |
isLargerOrEqual(SimTime a,
SimTime b)
Checks if the first of two points of simulation time is larger or equal to the second. |
static boolean |
isNotEqual(SimTime a,
SimTime b)
Checks if the two simtime parameters describe the different points of simulation time. |
static boolean |
isSmaller(SimTime a,
SimTime b)
Checks if the first of two points of simulation time is smaller than the second. |
static boolean |
isSmallerOrEqual(SimTime a,
SimTime b)
Checks if the first of two points of simulation time is smaller or equal to the second. |
static SimTime |
now()
Returns the special point of time to be used for replacing the current running process or schedule an entity at the first position in the event-list. |
java.lang.String |
toString()
Prints the time value of this simtime with all floating point digits. |
java.lang.String |
toString(int floats)
Prints the time value of this simtime with the given number of floating point digits. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
NOW
public static final SimTime NOW
- NOW defines the value for scheduling an object immediately, even replacing
the current SimProcess.
Since the value is otherwise
arbitrary as long as it is unique and can not be confused with any
other legal or illegal (negative) value, it is set to be the constant
defined in java.lang.Double and in java.lang.Float representing a
non-number value.
- See Also:
- java.lang.Double, java.lang.Float
myTime
private double myTime
- Stores the point of simulation time as double value for each
SimTime object.
| Constructor Detail |
SimTime
public SimTime(double time)
- Constructs a simtime object with the given initial time value.
It represents a point in simulation time.
Note that only points of future simulation time can be accessed
and that trying to create a simtime object with negative initial
value will stop the simulation immediately.
SimTime
public SimTime(SimTime time)
- Constructs a simtime object with the given initial time object.
It represents a point in simulation time.
Note that only points of future simulation time can be accessed
and that trying to create a SimTime object with negative initial
value will stop the simulation immediately.
| Method Detail |
add
public static final SimTime add(SimTime a, SimTime b)
- Returns a new simtime object with a time value representing the sum of
the time values of the given simtime objects.
diff
public static final SimTime diff(SimTime a, SimTime b)
- Returns a new simtime object with a time value representing the absolute
difference of the time values of the given simtime objects.
Note that since no negative time values are allowed,
nullwill be returned if the result of the subtraction would have resulted in a negative value. That is, a's time value is smaller than b's.
getTimeValue
public double getTimeValue()
- Returns the value of the simtime object as type double.
isEqual
public static final boolean isEqual(SimTime a, SimTime b)
- Checks if the two simtime parameters describe the same point of
simulation time.
Note that this is a static method available through calling the class
SimTimei.e.SimTime.isEqual(a,b)where a and b are valid simtime objects.
isLarger
public static final boolean isLarger(SimTime a, SimTime b)
- Checks if the first of two points of simulation time is larger
than the second. Larger means, that the time value of simtime a is
larger and hence "later" than simtime b.
Note that this is a static method available through calling the class
SimTimei.e.SimTime.isLargerThan(a,b)where a and b are valid simtime objects.
isLargerOrEqual
public static final boolean isLargerOrEqual(SimTime a, SimTime b)
- Checks if the first of two points of simulation time is larger or equal to
the second. Larger means, that the time value of simtime a is
larger and hence "later" than simtime b. Equal means, that they both
describe the same point in simulation time.
Note that this is a static method available through calling the class
SimTimei.e.SimTime.isLargerOrEqual(a,b)where a and b are valid simtime objects.
isNotEqual
public static final boolean isNotEqual(SimTime a, SimTime b)
- Checks if the two simtime parameters describe the different points of
simulation time.
Note that this is a static method available through calling the class
SimTimei.e.SimTime.isNotEqual(a,b)where a and b are valid simtime objects.
isSmaller
public static final boolean isSmaller(SimTime a, SimTime b)
- Checks if the first of two points of simulation time is smaller
than the second. Smaller means, that the time value of SimTime a is
larger and hence "sooner" than simtime b.
Note that this is a static method available through calling the class
SimTimei.e.SimTime.isLargerThan(a,b)where a and b are valid simtime objects.
isSmallerOrEqual
public static final boolean isSmallerOrEqual(SimTime a, SimTime b)
- Checks if the first of two points of simulation time is smaller or equal to
the second. Smaller means, that the time value of simtime a is
smaller and hence "sooner" than simtime b. Equal means, that they both
describe the same point in simulation time.
Note that this is a static method available through calling the class
SimTimei.e.SimTime.isSmallerOrEqual(a,b)where a and b are valid simtime objects.
now
public static final SimTime now()
- Returns the special point of time to be used for replacing the current
running process or schedule an entity at the first position in
the event-list.
toString
public java.lang.String toString()
- Prints the time value of this simtime with all floating point digits.
toString
public java.lang.String toString(int floats)
- Prints the time value of this simtime with the given number of floating
point digits.
|
|||||||||
| Home >> All >> [ desmoj overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC
desmoj.SimTime