Schedule Cycle
Before reading this page, be sure you understand the Scheduler Concepts of a Project, Plan, Observation, and ImageSet. Excluded from this explanation are the startup and shutdown phases described in Scheduler Concepts. Each cycle of the Scheduler consists of the following general phases (there are many more steps in detail). Also, this description of the schedule cycle is simplified. For a complete description see the paper Dispatch Scheduling of Automated Telescopes (PDF).
- If any fixed-time Plans have not yet been dispatched, do it now. In general, their Observations will not run until some later time. If a fixed-time Plan is added while the dispatcher is running, and if other Plans are already running with linked observations scheduler in the future, the fixed-time plan may preempt these, causing them to fail. Use with caution!
- If any running Plan (including fixed-time Plans) has a linked Observation scheduled for the current time, the cycle ends here. The Observation is sent to the sequencer and all of its ImageSets are acquired. The logic in the Scheduler prevents multiple Plans from having linked observations scheduled for the same time.
- If no linked Observations can be run, each pending Plan is checked to see if it will fit before sunrise. Any that are too long to fit are deferred until the next night.
- Plans are then checked to see if their must-start-before time has been passed. If so, the Plan is deferred until the next night.
- Next, constraints for the current time, are applied to the remaining pending Plans. Constraints are applied to each observation in the Plan. If an Observation would not meet its constraints over the entire (estimated) observation time if it were started at its expected time, the Plan is deferred. Constraints can feed back an estimated time at which that constraint will be met. These are used to defer the Plan until the time it will likely pass all constraints.
- Now each remaining Pending Plan is checked to see of any of its linked Observations would clash with those of running plans if it were started at the current time. If so, the Plan is deferred to the next scheduler cycle.
- At this point in the cycle, any remaining pending Plans would likely succeed if started at the current time. Now the Scheduler must select the "best" plan to start. The selection algorithm and its parameters are described in detail in the paper Dispatch Scheduling of Automated Telescopes (PDF). The selected Plan's first Observation is then sent to the sequencer and all of its ImageSets are acquired. At this point the Plan is running, and all of its Observations are scheduled to run at their respective times. These linked Observations will prevent the scheduling of any other work at their appointed times.
- After the Observation has been completed, the dispatcher loops back and starts the cycle again. If the Close-If-Idle setting is a number n greater than zero, it also looks to see if there are any Plans that are currently running, and if not it then looks to see if it will be more than n hours until the first deferred Plan becomes eligible, and if so, it will close the dome or roof.
Once an Observation is sent to the sequencer for acquisition, the Scheduler enters the Sleeping state and will remain dormant until the sequencer completes its task. At that point, the Scheduler begins a new cycle.
Copyright © 2005-2016 Robert B. Denny, Mesa, AZ