Defining a schedule with no calendar mapping
view is used when there is no mapping to calendar dates. Schedule intervals/moments are defined simply as number of time units (milliseconds, seconds, minutes, hours, days, or weeks) passed from the model start. Define schedule in this view
when only interval durations are important, not the exact calendar times.
This view is convenient e.g. for defining maintenance intervention times, failures, etc. of various devices.
Let's study how to define the device maintenance intervention times using the schedule in the
Custom (no calendar mapping)
view. Assume that maintenance is held irrelatively of calendar time, after 50 operational hours. Maintenance lasts 2 hours.
Define device maintenance times using the schedule in the Time units view
- Drag the
element from the
palette on the graphical diagram of the agent.
- Go to the
- Specify the name of the element in the
field. This name will be used later on for accessing the schedule from AnyLogic object(s) properties, or programmatically from code.
- Go to the
section of the schedule properties. Choose the type of the value that will be controlled by this schedule from the
group of butttons:
real. In our case we need just to define how the device status changes from available (on) to unavailable (off) during the maintenance, so leave the default option
- Choose the schedule mode - whether it defines intervals or discrete time moments. Choose the option
Intervals (Start, End)
from the group of buttons
The schedule defines.
- Choose the most convenient view for your task - in our case it is
Custom (no calendar mapping), so choose this option from the
group of buttons.
- Specify the recurrence of the schedule in the
field. In our case the full cycle composes 50 2 = 52 hours. Therefore type
- In the
field you can specify the default value for the schedule - the value that will be used for the intervals not defined in the schedule. In our case it makes no sense, since we will define the whole lifecycle for the device. Leave the default value
List of ranges
selected. Define intervals in the table below. Each interval is defined in a separate row of the table. Add new row in the table by clicking the
button to the right of the table. Define
times for this interval and the value that will correspond to this interval, in the
cell. First, we want to define operational interval - so, leave
- Now define one more interval corresponding to maintenance hours. Add one more row in the table as described above. Specify
time of this interval,
and click in the
cell to change its state from
You may delete any intervals from the table and move them in the table up and down (in this case you should contain the schedule integrity by yourself). This can be done by selecting the row in the table and then using the corresponding buttons
to the right of the table.
- If you want to shift the schedule in time anyhow (so that its start moment will correspond not to the start of the model, but to some other moment of model time), you can choose this particular moment in the
control (here you define it again as the number of selected time units passed from the model start).
the schedule in the convenient way that is commonly used in digital diaries, organizers, and office software tools. Just open the
properties page of the schedule and check whether the schedule defines the desired behavior:
When finished with defining the schedule, you may use it in your model by referring to it in the properties of required objects, and/or programmatically using the corresponding
of the schedule.
Schedule with N Days/Weeks duration