AnyLogic
Expand
Font size
Type Parameters:
V - the type of schedule values
All Implemented Interfaces:
com.anylogic.engine.internal.Child, Serializable
Direct Known Subclasses:
ScheduleWithUnits

public class Schedule<V extends Serializable>
extends Object
implements Serializable, com.anylogic.engine.internal.Child
Schedule class. Allows to track moments specified using time table with some period. Also, annual and single exceptions may be added to the schedule.
Schedule provides 4 types of information: All these accessor methods are available in several forms:
  • without any argument - data is retrieved for the current model time
  • with argument time of type double: data is retrieved for the provided model time. In case of +/-infinity or NaN argument value, getValue* and getDate* methods return null, and getTime* and getTimeout* methods return Double.NaN
  • with argument date of type Date: data is retrieved for the provided model date. In case of null argument value, getValue* and getDate* methods return null, and getTime* and getTimeout* methods return Double.NaN
This object may be used for event scheduling. See the following code example (please note, that it is more preferable to use getTimeOfNextValue() method instead of getTimeoutToNextValue() because of possible numeric calculation errors). Create the timeout event which occurs once at the time:
        schedule.getTimeOfValue() == time() ? time() : schedule.getTimeOfNextValue()
 
and has the following action code:
        // ...your custom actions are here...
        event.restartTo( schedule.getTimeOfNextValue() );
 
Author:
AnyLogic North America, LLC https://anylogic.com
See Also:
Serialized Form

Constructor Summary

ConstructorDescription
Schedule()
Creates new schedule object
Schedule(Utilities owner, boolean calendarType, int firstDayOfWeek, long period, long timeUnits, Long snapTo, V defaultValue, long[] starts, long[] ends, Object[] values, boolean glueIntervals, boolean[] exceptionsAnnually, boolean singleThreadMode)
Creates new schedule object
Schedule(Utilities owner, boolean calendarType, int firstDayOfWeek, long period, long timeUnits, Long snapTo, V defaultValue, long[] exStarts, long[] exEnds, Object[] exValues, boolean glueIntervals, boolean[] exceptionsAnnually, boolean singleThreadMode, boolean isLateInit)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

Method Summary

Modifier and TypeMethodDescription
voidaddException(int startYear, int startMonth, int startDay, int startHour, int startMinute, int startSecond, int endYear, int endMonth, int endDay, int endHour, int endMinute, int endSecond, V value, boolean annually)
Adds new particular time intervals when the value defined by this schedule should have other values
voidaddInterval(int startWeek, int startDayOfWeek, int startHour, int startMinute, int startSecond, int endWeek, int endDayOfWeek, int endHour, int endMinute, int endSecond, V value)
Adds new particular time interval to this schedule
voidaddInterval(int startDay, int startHour, int startMinute, int startSecond, int endDay, int endHour, int endMinute, int endSecond, V value)
Adds new particular time interval to this schedule
voidaddInterval(int startHour, int startMinute, int startSecond, int endHour, int endMinute, int endSecond, V value)
Adds new particular time interval to this schedule
voidaddInterval(int startHour, int startMinute, int startSecond, int endHour, int endMinute, int endSecond, V value, int[] weekDays)
Adds new particular time intervals to this schedule
voidaddInterval(long start, long end, V value)
Adds new particular time interval to this schedule
voidaddMoment(int week, int dayOfWeek, int hour, int minute, int second, V value)
Adds new particular time moment to this schedule
voidaddMoment(int day, int hour, int minute, int second, V value)
Adds new particular time moment to this schedule
voidaddMoment(int hour, int minute, int second, V value)
Adds new particular time moment to this schedule
voidaddMoment(int hour, int minute, int second, V value, int[] weekDays)
Adds new particular time moment to this schedule
voidaddMoment(long time, V value)
Adds new particular time moment to this schedule
DategetDateOfNextValue()
Returns the model date of the next change moment in the schedule.
In case when there is no 'next' value, returns null
DategetDateOfNextValue(double time)
Returns the model date of the schedule change moment next to the given model time.
In case when there is no 'next' value, returns null.
In case of +/-infinity or NaN argument value, returns null
DategetDateOfNextValue(Date date)
Returns the model date 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
DategetDateOfValue()
Returns the model date the current value of the schedule has been held since.
If the schedule has always been holding the current value, the method returns null
DategetDateOfValue(double time)
Returns the model date of the schedule change moment of the value corresponding to the given model time.
If the schedule has always been holding the current value (up to the given time), the method returns null.
In case of +/-infinity or NaN argument value, returns null
DategetDateOfValue(Date date)
Returns the model date of the schedule change moment of the value corresponding to the given model date.
If the schedule has always been holding the current value (up to the given date), the method returns null.
In case of null argument value, returns null
Set<V>getDistinctValues_xjal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
VgetNextValue()
Returns the value of the next change moment in the schedule.
In case when there is no 'next' value, returns null
VgetNextValue(double time)
Returns the value of the schedule change moment next to the given model time.
In case when there is no 'next' value, returns null.
In case of +/-infinity or NaN argument value, returns null
VgetNextValue(double time, TimeUnits 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
VgetNextValue(Date date)
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
doublegetTimeOfNextValue()
Returns the model time of the next change moment in the schedule.
In case when there is no 'next' value, returns positive infinity
doublegetTimeOfNextValue(double time)
Returns the model time of the schedule change moment next to the given model time.
In case when there is no 'next' value, returns positive infinity.
In case of +/-infinity or NaN argument value, returns Double.NaN
doublegetTimeOfNextValue(Date date)
Returns the model time of the schedule change moment next to the given model date.
In case when there is no 'next' value, returns positive infinity.
In case of null argument value, returns Double.NaN
doublegetTimeOfValue()
Returns the model time the current value of the schedule has been held since.
If the schedule has always been holding the current value, the method returns negative infinity
doublegetTimeOfValue(double time)
Returns the model time of the schedule change moment of the value corresponding to the given model time.
If the schedule has always been holding the current value (up to the given time), the method returns negative infinity.
In case of +/-infinity or NaN argument value, returns Double.NaN
doublegetTimeOfValue(Date date)
Returns the model time of the schedule change moment of the value corresponding to the given model date.
If the schedule has always been holding the current value (up to the given date), the method returns negative infinity.
In case of null argument value, returns Double.NaN
doublegetTimeoutToNextValue()
Returns timeout to the next change moment in the schedule, measured in the model time units from the current model time.
In case when there is no 'next' value, returns positive infinity
doublegetTimeoutToNextValue(double time)
Returns timeout to the schedule change moment next to the given time, measured in the model time units from that time.
In case when there is no 'next' value, returns positive infinity.
In case of +/-infinity or NaN argument value, returns Double.NaN
doublegetTimeoutToNextValue(Date date)
Returns timeout to the schedule change moment next to the given model date, measured in the model time units from that model date.
In case when there is no 'next' value, returns positive infinity.
In case of null argument value, returns Double.NaN
longgetTimeUnits()
Returns time units of the schedule
VgetValue()
Returns the value corresponding to the current model time
VgetValue(double time)
Returns the value of the schedule corresponding to the given model time.
In case of +/-infinity or NaN argument value, returns null
VgetValue(double time, TimeUnits units)
Returns the value of the schedule corresponding to the given time.
In case of +/-infinity or NaN argument value, returns null
VgetValue(Date date)
Returns the value of the schedule corresponding to the given model date.
In case of null argument value, returns null
voidinitialize() 
booleanisInitialized() 
voidlazyInit(long[] starts, long[] ends, Object[] values)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.
voidrestoreOwner(Object owner)
Deprecated.
voidsetCalendarType(boolean calendarType)
Sets the calendar type
voidsetDefaultValue(V defaultValue)
Sets the default value used when there is no interval defined in the schedule
voidsetFirstDayOfWeek(int firstDayOfWeek)
Sets the first day of the week
voidsetGlueIntervals(boolean glueIntervals) 
voidsetOwner(Utilities owner)
Sets the owner agent or experiment owning the schedule
voidsetPeriod(int period)
Sets the recurrence period of the schedule
voidsetSingleThreadMode(boolean singleThreadMode)
Sets the thread mode
voidsetSnapTo(int year, int month, int day, int hour, int minute, int second)
Sets start time of the schedule
voidsetSnapTo(long snapTo)
Sets start time of the schedule
voidsetTimeUnits(long timeUnits)
Sets the time units of the schedule
StringtoString() 

Methods inherited from class java.lang.Object

equals, getClass, hashCode, notify, notifyAll, wait, wait, wait

Constructor Details

Schedule

public Schedule()
Creates new schedule object

Schedule

@AnyLogicInternalAPI
public Schedule(Utilities owner,
 boolean calendarType,
 int firstDayOfWeek,
 long period,
 long timeUnits,
 Long snapTo,
 V defaultValue,
 long[] exStarts,
 long[] exEnds,
 Object[] exValues,
 boolean glueIntervals,
 boolean[] exceptionsAnnually,
 boolean singleThreadMode,
 boolean isLateInit)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

Schedule

public Schedule(Utilities owner,
 boolean calendarType,
 int firstDayOfWeek,
 long period,
 long timeUnits,
 Long snapTo,
 V defaultValue,
 long[] starts,
 long[] ends,
 Object[] values,
 boolean glueIntervals,
 boolean[] exceptionsAnnually,
 boolean singleThreadMode)
Creates new schedule object
Parameters:
owner - agent or experiment owning the schedule
calendarType - if true then schedule works with calendar dates. For example, if you create a schedule for 8:00-17:00 each day - these times will be preserved even during the days of Daylight Saving Time switching.
If this parameter is false, "1 day" will be treated as 24*60*60 seconds - this is good for modeling the behavior of some automatic machines which don't watch at the wall-clock during e.g. self-maintenance procedures.
firstDayOfWeek - the first day of the week, this parameter is actually used when calendarType == true and timeUnit is week
period - recurrence period of the schedule, measured in milliseconds. Milliseconds may be actual - if calendarType is false, and hypothetical - if true, which means that 1000*60*60*24 milliseconds denotes one day independently on Daylight Saving Time switching.
timeUnits - time units of the schedule, one of TIME_UNIT_* constants
In the calendar-mode the only supported time units are day and week
snapTo - the absolute date (if calendarType==true) or the number of milliseconds from the zero model time (if calendarType==false) which points to the start of some period. All schedule periods are cloned, started from the given time moment in both directions.
defaultValue - the value used when there is no interval defined in the schedule
starts - start times of intervals, measured in milliseconds from the beginning of the period (milliseconds may be actual - if calendarType is false, and hypothetical - if true, which means that 1000*60*60*24 milliseconds denotes one day independently on Daylight Saving Time switching). This array may also contain starts of exceptions (see exceptionsAnnually parameter)
ends - end times of intervals, the same description as for starts
values - values for intervals
glueIntervals - if true then intersecting intervals with the same 'value' will be merged, e.g. two intervals "Day1 18:00-24:00 value=5" and "Day2 00:00-02:00 value=5" will be treated as one interval "Day1 18:00 - Day2 02:00 value=5"
exceptionsAnnually - the array of exception flags (true means annual exception, false - single occurrence), may be empty. The number of exceptions equals the length of exceptionsAnnually array. The exceptions are read from starts, ends, values arrays. Exceptions data is located in the tails of these arrays. Note that for exceptions, starts and ends arrays contain absolute dates encoded as long numbers (see Date.getTime()).
singleThreadMode - this parameter indicates whether schedule will work in single thread environment or will be used by multiple concurrent threads. This parameter is usually set to true for schedules inside agents and experiment which don't allow parallel execution (e.g. simulation experiment). But for schedules, located in optimization and parameter variation experiment which allow parallel execution this parameter should be set to false.

Method Details

isInitialized

@AnyLogicInternalCodegenAPI
public boolean isInitialized()

lazyInit

@AnyLogicInternalAPI
public void lazyInit(long[] starts,
 long[] ends,
 Object[] values)
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

initialize

public void initialize()

setOwner

public void setOwner(Utilities owner)
Sets the owner agent or experiment owning the schedule
Parameters:
owner - - agent or experiment owning the schedule

setCalendarType

public void setCalendarType(boolean calendarType)
Sets the calendar type
Parameters:
calendarType - - if true then schedule works with calendar dates. For example, if you create a schedule for 8:00-17:00 each day - these times will be preserved even during the days of Daylight Saving Time switching.
If this parameter is false, "1 day" will be treated as 24*60*60 seconds - this is good for modeling the behavior of some automatic machines which don't watch at the wall-clock during e.g. self-maintenance procedures.

setFirstDayOfWeek

public void setFirstDayOfWeek(int firstDayOfWeek)
Sets the first day of the week
Parameters:
firstDayOfWeek - - the first day of the week, this parameter is actually used when calendarType == true and timeUnit is week

setTimeUnits

public void setTimeUnits(long timeUnits)
Sets the time units of the schedule
Parameters:
timeUnits - - time units of the schedule, one of TIME_UNIT_* constants
In the calendar-mode the only supported time units are day and week
snapTo - the absolute date (if calendarType==true) or the number of milliseconds from the zero model time (if calendarType==false) which points to the start of some period. All schedule periods are cloned, started from the given time moment in both directions

setPeriod

public void setPeriod(int period)
Sets the recurrence period of the schedule
Parameters:
period - - recurrence period of the schedule, measured in milliseconds. Milliseconds may be actual - if calendarType is false, and hypothetical - if true, which means that 1000*60*60*24 milliseconds denotes one day independently on Daylight Saving Time switching.

setSnapTo

public void setSnapTo(long snapTo)
Sets start time of the schedule
Parameters:
snapTo - - the absolute date (if calendarType==true) or the number of milliseconds from the zero model time

setSnapTo

public void setSnapTo(int year,
 int month,
 int day,
 int hour,
 int minute,
 int second)
Sets start time of the schedule
Parameters:
year - - year
month - - month
day - - day
hour - - hour
minute - - minute
second - - second

setDefaultValue

public void setDefaultValue(V defaultValue)
Sets the default value used when there is no interval defined in the schedule
Parameters:
defaultValue - - the value used when there is no interval defined in the schedule

setGlueIntervals

public void setGlueIntervals(boolean glueIntervals)
Parameters:
glueIntervals - if true then intersecting intervals with the same 'value' will be merged, e.g. two intervals "Day1 18:00-24:00 value=5" and "Day2 00:00-02:00 value=5" will be treated as one interval "Day1 18:00 - Day2 02:00 value=5"

setSingleThreadMode

public void setSingleThreadMode(boolean singleThreadMode)
Sets the thread mode
Parameters:
singleThreadMode - - this parameter indicates whether schedule will work in single thread environment or will be used by multiple concurrent threads. This parameter is usually set to true for schedules inside agents and experiment which don't allow parallel execution (e.g. simulation experiment). But for schedules, located in optimization and parameter variation experiment which allow parallel execution this parameter should be set to false.

addInterval

public void addInterval(long start,
 long end,
 V value)
Adds new particular time interval to this schedule
Parameters:
start - - start time of the interval, measured in milliseconds
end - - end time of the interval, measured in milliseconds
value - - value of the interval

addInterval

public void addInterval(int startWeek,
 int startDayOfWeek,
 int startHour,
 int startMinute,
 int startSecond,
 int endWeek,
 int endDayOfWeek,
 int endHour,
 int endMinute,
 int endSecond,
 V value)
Adds new particular time interval to this schedule
Parameters:
startWeek - - start week of the interval
startDayOfWeek - - start day of week of the interval
startHour - - start hour of the interval
startMinute - - start minute of the interval
startSecond - - start second of the interval
endWeek - - end week of the interval
endDayOfWeek - - end day of week of the interval
endHour - - end hour of the interval
endMinute - - end minute of the interval
endSecond - - end second of the interval
value - - value of the interval

addInterval

public void addInterval(int startDay,
 int startHour,
 int startMinute,
 int startSecond,
 int endDay,
 int endHour,
 int endMinute,
 int endSecond,
 V value)
Adds new particular time interval to this schedule
Parameters:
startDay - - start day of the interval
startHour - - start hour of the interval
startMinute - - start minute of the interval
startSecond - - start second of the interval
endDay - - end day of the interval
endHour - - end hour of the interval
endMinute - - end minute of the interval
endSecond - - end second of the interval
value - - value of the interval

addInterval

public void addInterval(int startHour,
 int startMinute,
 int startSecond,
 int endHour,
 int endMinute,
 int endSecond,
 V value)
Adds new particular time interval to this schedule
Parameters:
startHour - - start hour for interval
startMinute - - start minute for interval
startSecond - - start second for interval
endHour - - end hour for interval
endMinute - - end minute for interval
endSecond - - end second for interval
value - - value for interval

addInterval

public void addInterval(int startHour,
 int startMinute,
 int startSecond,
 int endHour,
 int endMinute,
 int endSecond,
 V value,
 int[] weekDays)
Adds new particular time intervals to this schedule
Parameters:
startHour - - start hour of the interval
startMinute - - start minute of the interval
startSecond - - start second of the interval
endHour - - end hour of the interval
endMinute - - end minute of the interval
endSecond - - end second of the interval
value - - value of the interval
weekDays - - week days of the intervals

addMoment

public void addMoment(long time,
 V value)
Adds new particular time moment to this schedule
Parameters:
time - - time of the moment, measured in milliseconds
value - - value of the moment

addMoment

public void addMoment(int week,
 int dayOfWeek,
 int hour,
 int minute,
 int second,
 V value)
Adds new particular time moment to this schedule
Parameters:
week - - week of the moment
dayOfWeek - - day of the week of the moment
hour - - hour of the moment
minute - - minute of the moment
second - - second of the moment
value - - value of the moment

addMoment

public void addMoment(int day,
 int hour,
 int minute,
 int second,
 V value)
Adds new particular time moment to this schedule
Parameters:
day - - day of the moment
hour - - hour of the moment
minute - - minute of the moment
second - - second of the moment
value - - value of the moment

addMoment

public void addMoment(int hour,
 int minute,
 int second,
 V value)
Adds new particular time moment to this schedule
Parameters:
hour - - hour of the moment
minute - - minute of the moment
second - - second of the moment
value - - value of the moment

addMoment

public void addMoment(int hour,
 int minute,
 int second,
 V value,
 int[] weekDays)
Adds new particular time moment to this schedule
Parameters:
hour -
minute -
second -
value -
weekDays -

addException

public void addException(int startYear,
 int startMonth,
 int startDay,
 int startHour,
 int startMinute,
 int startSecond,
 int endYear,
 int endMonth,
 int endDay,
 int endHour,
 int endMinute,
 int endSecond,
 V value,
 boolean annually)
Adds new particular time intervals when the value defined by this schedule should have other values
Parameters:
startYear - - start year of the interval
startMonth - - start month of the interval
startDay - - start day of the interval
startHour - - start hour of the interval
startMinute - - start minute of the interval
startSecond - - start second of the interval
endYear - - end year of the interval
endMonth - - end month of the interval
endDay - - end day of the interval
endHour - - end hour of the interval
endMinute - - end minute of the interval
endSecond - - end second of the interval
value - - value of the interval
annually - - if you want the defined exception to occur annually in the specified day, sets true. Otherwise, if you want it to occur only in the specified year, sets false

getTimeUnits

public long getTimeUnits()
Returns time units of the schedule
Returns:
time units of the schedule, one of TIME_UNIT_* constants

getTimeoutToNextValue

public double getTimeoutToNextValue()
Returns timeout to the next change moment in the schedule, measured in the model time units from the current model time.
In case when there is no 'next' value, returns positive infinity
Returns:
the timeout to the next schedule change or +infinity

getTimeoutToNextValue

public double getTimeoutToNextValue(double time)
Returns timeout to the schedule change moment next to the given time, measured in the model time units from that time.
In case when there is no 'next' value, returns positive infinity.
In case of +/-infinity or NaN argument value, returns Double.NaN
Returns:
the timeout to the schedule change next to the given time or +infinity

getTimeoutToNextValue

public double getTimeoutToNextValue(Date date)
Returns timeout to the schedule change moment next to the given model date, measured in the model time units from that model date.
In case when there is no 'next' value, returns positive infinity.
In case of null argument value, returns Double.NaN
Returns:
the timeout to the schedule change next to the given date or +infinity

getTimeOfNextValue

public double getTimeOfNextValue()
Returns the model time of the next change moment in the schedule.
In case when there is no 'next' value, returns positive infinity
Returns:
the model time of the next schedule change or +infinity

getTimeOfNextValue

public double getTimeOfNextValue(double time)
Returns the model time of the schedule change moment next to the given model time.
In case when there is no 'next' value, returns positive infinity.
In case of +/-infinity or NaN argument value, returns Double.NaN
Returns:
the model time of the schedule change next to the given time or +infinity

getTimeOfNextValue

public double getTimeOfNextValue(Date date)
Returns the model time of the schedule change moment next to the given model date.
In case when there is no 'next' value, returns positive infinity.
In case of null argument value, returns Double.NaN
Returns:
the model time of the schedule change next to the given date or +infinity

getDateOfNextValue

public Date getDateOfNextValue()
Returns the model date of the next change moment in the schedule.
In case when there is no 'next' value, returns null
Returns:
the model date of the next schedule change or null

getDateOfNextValue

public Date getDateOfNextValue(double time)
Returns the model date of the schedule change moment next to the given model time.
In case when there is no 'next' value, returns null.
In case of +/-infinity or NaN argument value, returns null
Returns:
the model date of the schedule change next to the given time or null

getDateOfNextValue

public Date getDateOfNextValue(Date date)
Returns the model date 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
Returns:
the model date of the schedule change next to the given date or null

getNextValue

public V getNextValue()
Returns the value of the next change moment in the schedule.
In case when there is no 'next' value, returns null
Returns:
the value of the next schedule change or null

getNextValue

public V getNextValue(double time)
Returns the value of the schedule change moment next to the given model time.
In case when there is no 'next' value, returns null.
In case of +/-infinity or NaN argument value, returns null
Returns:
the value of the schedule change next to the given time or null

getNextValue

public V getNextValue(double time,
 TimeUnits 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
Parameters:
units - the units of time
Returns:
the value of the schedule change next to the given time or null

getNextValue

public V getNextValue(Date date)
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
Returns:
the value of the schedule change next to the given date or null

getTimeOfValue

public double getTimeOfValue()
Returns the model time the current value of the schedule has been held since.
If the schedule has always been holding the current value, the method returns negative infinity
Returns:
the model time of the current schedule change or -infinity

getTimeOfValue

public double getTimeOfValue(double time)
Returns the model time of the schedule change moment of the value corresponding to the given model time.
If the schedule has always been holding the current value (up to the given time), the method returns negative infinity.
In case of +/-infinity or NaN argument value, returns Double.NaN
Returns:
the model time of the schedule change corresponding to the given time or -infinity

getTimeOfValue

public double getTimeOfValue(Date date)
Returns the model time of the schedule change moment of the value corresponding to the given model date.
If the schedule has always been holding the current value (up to the given date), the method returns negative infinity.
In case of null argument value, returns Double.NaN
Returns:
the model time of the schedule change corresponding to the given date or -infinity

getDateOfValue

public Date getDateOfValue()
Returns the model date the current value of the schedule has been held since.
If the schedule has always been holding the current value, the method returns null
Returns:
the model date of the current schedule change or null

getDateOfValue

public Date getDateOfValue(double time)
Returns the model date of the schedule change moment of the value corresponding to the given model time.
If the schedule has always been holding the current value (up to the given time), the method returns null.
In case of +/-infinity or NaN argument value, returns null
Returns:
the model date of the schedule change corresponding to the given time or null

getDateOfValue

public Date getDateOfValue(Date date)
Returns the model date of the schedule change moment of the value corresponding to the given model date.
If the schedule has always been holding the current value (up to the given date), the method returns null.
In case of null argument value, returns null
Returns:
the model time of the schedule change corresponding to the given date or null

getValue

public V getValue()
Returns the value corresponding to the current model time
Returns:
the value corresponding to the current model time

getValue

public V getValue(double time)
Returns the value of the schedule corresponding to the given model time.
In case of +/-infinity or NaN argument value, returns null
Parameters:
time - the model time
Returns:
the value corresponding to the given model time

getValue

public V getValue(double time,
 TimeUnits units)
Returns the value of the schedule corresponding to the given time.
In case of +/-infinity or NaN argument value, returns null
Parameters:
time - the time
units - the units of time
Returns:
the value corresponding to the given time

getValue

public V getValue(Date date)
Returns the value of the schedule corresponding to the given model date.
In case of null argument value, returns null
Parameters:
date - the model date
Returns:
the value corresponding to the given model date

toString

public String toString()
Overrides:
toString in class Object

getDistinctValues_xjal

@AnyLogicInternalAPI
public Set<V> getDistinctValues_xjal()
This method is internal and shouldn't be called by user.
it may be removed/renamed in future.

restoreOwner

@AnyLogicInternalCodegenAPI
@Deprecated
public void restoreOwner(Object owner)
Deprecated.
Description copied from interface: com.anylogic.engine.internal.Child
This method normally should not be called by user
This method restores owner of this object
This method is used in snapshot saving/loading
Note, that some objects may support several owners (e.g. of different types)
Specified by:
restoreOwner in interface com.anylogic.engine.internal.Child
Parameters:
owner - owner of this object, usually Agent, Experiment or ShapeGroup