- java.lang.Object
- com.anylogic.engine.Schedule<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
,Serializable
public class ScheduleWithUnits<U extends IUnits<U>> extends Schedule<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
Constructor | Description |
---|---|
ScheduleWithUnits |
This method is internal and shouldn't be called by user.
it may be removed/renamed in future. |
ScheduleWithUnits | |
ScheduleWithUnits |
Modifier and Type | Method | Description |
---|---|---|
Double | getNextValue | |
Double | getNextValue | |
Double | getNextValue |
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 |
Double | getNextValue |
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() |
Double | getValue | |
Double | getValue | |
Double | getValue |
Returns the value of the schedule corresponding to the given model
date .In case of null argument value, returns null |
Double | getValue |
Returns the value corresponding to the current model time
|
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
public ScheduleWithUnits(U units)
public ScheduleWithUnits(Utilities owner, boolean calendarType, int firstDayOfWeek, long period, long timeUnits, Long snapTo, Double defaultValue, long[] starts, long[] ends, Object[] values, boolean glueIntervals, boolean[] exceptionsAnnually, boolean singleThreadMode, U units)
@AnyLogicInternalAPI public ScheduleWithUnits(Utilities owner, boolean calendarType, int firstDayOfWeek, long period, long timeUnits, Long snapTo, Double defaultValue, long[] exStarts, long[] exEnds, 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 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 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 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 Double getValue(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 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 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 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 Double getNextValue(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