Course contentsShow

Module 08 · Lesson 2

Scheduling Approaches

Choosing which requests to fly is constrained optimization. This lesson compares greedy, constraint-based, mixed-integer and repair methods, and explains why operators value predictability.

8 minute readUpdated November 23, 2026

Learning objectives

After this lesson you will be able to:

  • Frame spacecraft scheduling as a constrained optimization problem with decisions, constraints and an objective
  • Compare greedy, constraint programming, mixed-integer and repair-based approaches and their trade-offs
  • Evaluate a scheduler on validity, value, run time, stability and explainability

The scheduling problem

The previous lesson checked whether a proposed plan respected its constraints. Scheduling is the step before that: deciding what goes into the plan. Operational spacecraft are usually oversubscribed, meaning there are more requests than can be flown, so the scheduler is deciding what to leave out.

Stated formally, scheduling is constrained optimization with three parts.

  • Decisions. For each request: is it accepted, which opportunity does it use, and when exactly does it start?
  • Constraints. The hard limits from the previous lesson: one pointing direction at a time, slew gaps, storage, energy, keep-out zones and operational rules.
  • An objective function. The quantity to maximize, such as the total priority of accepted requests, often with penalties for soft-constraint violations.

The difficulty is combinatorial. Each accepted request changes what else can fit, through slew time, storage and energy. Except for a few simplified cases, problems of this kind have no known method that finds the best answer quickly at every size. Real schedulers therefore choose a point between speed and quality.

Greedy and priority-based scheduling

A greedy algorithm makes the best-looking choice at each step and never revisits it. The most common form in operations sorts requests by priority and places each one in turn if it fits with what has already been placed.

The example schedules one resource, such as a single instrument, where the only constraint is that activities must not overlap.

// Times in seconds from the start of the planning window. Higher priority wins.
interface Request { id: string; start: number; end: number; priority: number }

function scheduleGreedy(requests: Request[]) {
  // Highest priority first; ties go to the request that finishes earliest, then by id.
  const order = [...requests].sort(
    (a, b) => b.priority - a.priority || a.end - b.end || a.id.localeCompare(b.id),
  );
  const accepted: Request[] = [];
  const rejected: { id: string; blockedBy: string }[] = [];
  for (const r of order) {
    const clash = accepted.find((a) => r.start < a.end && a.start < r.end);
    if (clash) rejected.push({ id: r.id, blockedBy: clash.id });
    else accepted.push(r);
  }
  accepted.sort((a, b) => a.start - b.start);
  return { accepted: accepted.map((r) => r.id), rejected };
}

const requests: Request[] = [
  { id: "port-survey", start: 0, end: 600, priority: 5 },
  { id: "farm-east", start: 0, end: 300, priority: 4 },
  { id: "farm-west", start: 300, end: 600, priority: 4 },
  { id: "calibration", start: 600, end: 900, priority: 2 },
  { id: "coast-strip", start: 800, end: 1100, priority: 3 },
];
console.log(scheduleGreedy(requests));

The output is:

{
  accepted: [ 'port-survey', 'coast-strip' ],
  rejected: [
    { id: 'farm-east', blockedBy: 'port-survey' },
    { id: 'farm-west', blockedBy: 'port-survey' },
    { id: 'calibration', blockedBy: 'coast-strip' }
  ]
}

The result shows both the strength and the weakness of the method. Every rejection has a single, checkable reason. The sort is fully specified, including tie-breaks, so the same input always gives the same plan. The run time is small and easy to bound.

The weakness is in the first two rejections. The two farm requests fit together in the time taken by the port survey and are worth 8 between them, against 5. Greedy scheduling guarantees that a higher-priority request is never displaced by lower-priority ones. It does not maximize total value. Whether that is a defect depends on what the priorities mean. If priority 5 means a paying customer's urgent order, strict priority order may be exactly the policy the operator wants.

For one narrow case a greedy method is provably optimal: when all requests on a single resource are equally valuable, taking them in order of earliest finish time fits in the largest possible number. Real problems rarely have that shape.

Constraint programming and mixed-integer approaches

Two families of general-purpose solver are used when plan quality justifies more effort.

In constraint programming, the problem is stated as variables, the values each may take, and constraints between them. A variable might be the start time of an activity, with its access window as the set of allowed values. The solver alternates between deduction, which removes values that cannot appear in any valid plan, and search, which tries a value and backtracks if it leads to a dead end.

In mixed-integer programming, decisions become yes-no or whole-number variables, and the constraints and objective are written as linear expressions. "Accept request A" is a variable that is 0 or 1. "A and B cannot both be accepted" becomes the statement that their sum is at most 1. The solver explores combinations systematically while computing a bound on how good any remaining answer could be.

Both give something a greedy method cannot: a statement of quality. A solver stopped after a fixed time can report its best plan and how far that might be from the optimum. The costs are run time that varies from one day's input to the next, and a mathematical model that must be maintained as carefully as code. A plan that is optimal for a wrong model is still wrong.

Heuristics and repair

Between greedy and exact methods lies a large family of heuristics: rules of thumb, randomized restarts and local search that swaps or shifts activities and keeps changes that help.

Iterative repair deserves particular attention because it matches how operations work. Instead of building a plan from nothing, it starts from an existing plan, finds the conflicts, and fixes them with local changes: move an activity to another opportunity, remove a low-priority one, add a downlink. It is the natural tool for rescheduling, because most of yesterday's plan is still good.

Why predictability matters to operators

A scheduler's output is reviewed, approved and defended by people. Three qualities matter to them as much as the score.

  • Explainability. A customer whose request was rejected is owed a reason, and "the optimizer preferred another combination" is a poor one. Operators want to see which constraint or which competing request was responsible.
  • Plan stability. If adding one request reshuffles forty others, every downstream product changes and every review starts again. Small input changes should cause small plan changes.
  • Determinism. The same inputs should produce the same plan, or an anomaly investigation cannot reproduce what the planner did.

The parallel in mainstream software is a query planner or a cluster scheduler: engineers accept a slightly worse result in exchange for behavior they can predict. The difference here is that every plan is read by a person before it is used.

How to evaluate a scheduler

Evaluation needs realistic inputs, ideally recorded requests and opportunities replayed through each candidate. Useful measures are:

  • Validity. No hard constraint violated, as judged by a checker that is independent of the scheduler.
  • Value. Total priority or revenue scheduled, and the fraction of top-priority requests satisfied.
  • Run time. Typical and worst case, against the time available in the planning cycle.
  • Stability. How much the plan changes when a few requests are added or removed.
  • Explainability. Whether each rejection carries a reason an operator accepts.

A simple baseline, usually the greedy scheduler, shows whether added complexity is earning its keep.

A practical example: a late urgent request

Tomorrow's plan is approved and due for upload in three hours. A priority 9 request arrives for a 300-second image that overlaps coast-strip.

Rerunning a full optimization might produce a slightly better plan in which thirty activities have moved, with no time to review them. The team uses repair instead. The scheduler inserts the urgent request, reports one conflict, removes coast-strip, and searches for another opportunity for it. It finds one on a later orbit. Storage and energy are rechecked along the whole timeline, because the new image changes both.

The reviewer sees a difference of two lines: one activity added and one moved. That is a change a person can assess in minutes, which is one reason repair-based rescheduling is common in operations.

From a plan to commands

A schedule is still a list of intentions. The next lesson follows it through the steps that make it real: expansion into commands, validation, approval, upload and comparison with what the spacecraft did.

Key takeaways

  • Scheduling chooses which requests to accept and which opportunity each one uses, subject to hard constraints, to maximize a stated objective.
  • Greedy priority scheduling is fast, predictable and easy to explain, which is why it is common. It guarantees priority order, not the best total value.
  • Constraint programming and mixed-integer solvers can find better plans and report how close to optimal they are, at the cost of run time and a model that must be kept correct.
  • Operators need to know why a request was rejected and need small input changes to cause small plan changes. A scheduler is judged on those as well as on its score.

Knowledge check

Check your understanding. These questions are not graded and you can retry as often as you like.

Question 1 of 3· Select one answerIn the lesson's example, the greedy scheduler accepts one priority 5 request and rejects two priority 4 requests that would have fit together in the same time. What does this show?
Question 2 of 3· Select all that applyWhich of these are sound reasons for an operations team to prefer a simpler scheduler over one that produces higher-scoring plans? Select all that apply.
Question 3 of 3· Select one answerWhich evidence best supports replacing an existing scheduler with a new one?

0 of 3 questions answered.

Glossary

Objective function

The quantity a scheduler tries to maximize or minimize, such as the total priority of scheduled requests.

Greedy algorithm

A method that makes the best-looking choice at each step and never revisits it.

Constraint programming

A solving technique in which a problem is stated as variables, their possible values and constraints, and a solver combines logical deduction with search.

Mixed-integer programming

An optimization technique in which decisions are whole-number or yes-no variables, and the constraints and objective are linear expressions.

Iterative repair

Starting from a complete plan that has conflicts, or from an existing valid plan, and making local changes until the conflicts are resolved.

Plan stability

The degree to which a small change in inputs produces only a small change in the resulting plan.

References and further reading

Finished this lesson?

Loading your progress…

Lesson version 1.0.0.