Package com.anylogic.engine
- java.lang.Object
-
- com.anylogic.engine.Schedule<java.lang.Double>
-
- com.anylogic.engine.ScheduleWithUnits<U>
- Type Parameters:
V
- the type of schedule valuesU
- the type of units used by this schedule
- All Implemented Interfaces:
com.anylogic.engine.internal.Child
,java.io.Serializable
public class ScheduleWithUnits<U extends IUnits<U>> extends Schedule<java.lang.Double>
Schedule with units (Time, Rate etc.). For more information, see
Usage:
Schedule
.Usage:
ScheduleWithUnits<Double, RateUnits> s = new ScheduleWithUnits<Double, RateUnits>(PER_HOUR); // configure 's': s.setPeriod() etc. s.initialize(); double rate = s.getValue(PER_MINUTE);
- Author:
- AnyLogic North America, LLC https://anylogic.com
- See Also:
Schedule
, Serialized Form
ScheduleWithUnits(Utilities owner,
boolean calendarType,
int firstDayOfWeek,
long period,
long timeUnits,
java.lang.Long snapTo,
java.lang.Double defaultValue,
long[] exStarts,
long[] exEnds,
java.lang.Object[] exValues,
boolean glueIntervals,
boolean[] exceptionsAnnually,
boolean singleThreadMode,
boolean isLateInit,
U units) |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
ScheduleWithUnits(Utilities owner,
boolean calendarType,
int firstDayOfWeek,
long period,
long timeUnits,
java.lang.Long snapTo,
java.lang.Double defaultValue,
long[] starts,
long[] ends,
java.lang.Object[] values,
boolean glueIntervals,
boolean[] exceptionsAnnually,
boolean singleThreadMode,
U units) |
|
ScheduleWithUnits(U units) |
|
Constructor | Description |
---|
java.lang.Double |
getNextValue(double time,
TimeUnits timeUnits,
U valueUnits) |
Returns the value of the schedule change moment next to the given
time .In case when there is no 'next' value, returns null .In case of +/-infinity or
NaN argument value, returns null |
java.lang.Double |
getNextValue(double time,
U units) |
Returns the value of the schedule change moment next to the given
time .In case when there is no 'next' value, returns null .In case of +/-infinity or
NaN argument value, returns null |
java.lang.Double |
getNextValue(java.util.Date date,
U units) |
Returns the value of the schedule change moment next to the given
model
date .In case when there is no 'next' value, returns null .In case of null argument value, returns null |
java.lang.Double |
getNextValue(U units) |
Returns the value of the next change moment in the schedule.
In case when there is no 'next' value, returns null |
U |
getUnits() |
Returns units used by functions like
Schedule.getValue() |
java.lang.Double |
getValue(double time,
TimeUnits timeUnits,
U valueUnits) |
Returns the value of the schedule corresponding to the given
time .In case of +/-infinity or
NaN argument value, returns null |
java.lang.Double |
getValue(double time,
U units) |
Returns the value of the schedule corresponding to the given model
time .In case of +/-infinity or
NaN argument value, returns null |
java.lang.Double |
getValue(java.util.Date date,
U units) |
Returns the value of the schedule corresponding to the given model
date .In case of null argument value, returns null |
java.lang.Double |
getValue(U units) |
Returns the value corresponding to the current model time
|
Modifier and Type | Method | Description |
---|
addException, addInterval, addInterval, addInterval, addInterval, addInterval, addMoment, addMoment, addMoment, addMoment, addMoment, getDateOfNextValue, getDateOfNextValue, getDateOfNextValue, getDateOfValue, getDateOfValue, getDateOfValue, getDistinctValues_xjal, getNextValue, getNextValue, getNextValue, getNextValue, getTimeOfNextValue, getTimeOfNextValue, getTimeOfNextValue, getTimeOfValue, getTimeOfValue, getTimeOfValue, getTimeoutToNextValue, getTimeoutToNextValue, getTimeoutToNextValue, getTimeUnits, getValue, getValue, getValue, getValue, initialize, isInitialized, lazyInit, restoreOwner, setCalendarType, setDefaultValue, setFirstDayOfWeek, setGlueIntervals, setOwner, setPeriod, setSingleThreadMode, setSnapTo, setSnapTo, setTimeUnits, toString
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
public ScheduleWithUnits(U units)
public ScheduleWithUnits(Utilities owner, boolean calendarType, int firstDayOfWeek, long period, long timeUnits, java.lang.Long snapTo, java.lang.Double defaultValue, long[] starts, long[] ends, java.lang.Object[] values, boolean glueIntervals, boolean[] exceptionsAnnually, boolean singleThreadMode, U units)
@AnyLogicInternalAPI public ScheduleWithUnits(Utilities owner, boolean calendarType, int firstDayOfWeek, long period, long timeUnits, java.lang.Long snapTo, java.lang.Double defaultValue, long[] exStarts, long[] exEnds, java.lang.Object[] exValues, boolean glueIntervals, boolean[] exceptionsAnnually, boolean singleThreadMode, boolean isLateInit, U units)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
it may be removed/renamed in future.
public U getUnits()
Returns units used by functions like
Schedule.getValue()
- Returns:
- the units used by functions like
Schedule.getValue()
public java.lang.Double getValue(U units)
Returns the value corresponding to the current model time
- Parameters:
units
- the units of value- Returns:
- the value corresponding to the current model time
public java.lang.Double getValue(double time, U units)
Returns the value of the schedule corresponding to the given model
In case of
time
.In case of
+/-infinity
or
NaN
argument value, returns null
- Parameters:
time
- the model timeunits
- the units of value- Returns:
- the value corresponding to the given model
time
public java.lang.Double getValue(double time, TimeUnits timeUnits, U valueUnits)
Returns the value of the schedule corresponding to the given
In case of
time
.In case of
+/-infinity
or
NaN
argument value, returns null
- Parameters:
time
- the timetimeUnits
- the units of timevalueUnits
- the units of value- Returns:
- the value corresponding to the given
time
public java.lang.Double getValue(java.util.Date date, U units)
Returns the value of the schedule corresponding to the given model
In case of
date
.In case of
null
argument value, returns null
- Parameters:
date
- the model dateunits
- the units of value- Returns:
- the value corresponding to the given model
date
public java.lang.Double getNextValue(U units)
Returns the value of the next change moment in the schedule.
In case when there is no 'next' value, returns
In case when there is no 'next' value, returns
null
- Parameters:
units
- the units of value- Returns:
- the value of the next schedule change or
null
public java.lang.Double getNextValue(double time, U units)
Returns the value of the schedule change moment next to the given
In case when there is no 'next' value, returns
In case of
time
.In case when there is no 'next' value, returns
null
.In case of
+/-infinity
or
NaN
argument value, returns null
- Parameters:
units
- the units of value- Returns:
- the value of the schedule change next to the given
time
ornull
public java.lang.Double getNextValue(double time, TimeUnits timeUnits, U valueUnits)
Returns the value of the schedule change moment next to the given
In case when there is no 'next' value, returns
In case of
time
.In case when there is no 'next' value, returns
null
.In case of
+/-infinity
or
NaN
argument value, returns null
- Parameters:
timeUnits
- the units of timevalueUnits
- the units of value- Returns:
- the value of the schedule change next to the given
time
ornull
public java.lang.Double getNextValue(java.util.Date date, U units)
Returns the value of the schedule change moment next to the given
model
In case when there is no 'next' value, returns
In case of
date
.In case when there is no 'next' value, returns
null
.In case of
null
argument value, returns null
- Parameters:
units
- the units of value- Returns:
- the value of the schedule change next to the given
date
ornull
-
How can we improve this article?
-