Shorter plan from the same team
Four people, fourteen tasks, and too much at once: unleveled, the plan ends on 28 August with people double-booked. Every leveling run below removes the overload with the same team. They differ in how long the plan gets.
The table has one row per run, under the Unleveled plan they all start from, drawn first. Frontier is the default strategy, the one MS Project users know: find the earliest overload, delay a task, repeat. Forward places the tasks one by one in dependency order, each at the earliest start where its person is free, then repairs what is left. With more effort it tries several orders and keeps the best plan. Click a row to draw that plan.
What the numbers mean
- Project end: the last task's finish. The delta is in working days against frontier.
- Total delay: for every task, how many working days later it finishes than in the unleveled plan, summed. This is what the forward strategy minimises after the project end, so a plan where many tasks wait a little beats one where a few wait long.
- Split tasks: tasks that leveling paused. Turn on Allow splitting tasks to let it; every run is repeated.
- Passes and time: how hard each run searched and what that took in your browser. The search budget is in passes, not milliseconds, so the same input gives the same plan every time.
On this plan, without splits, forward ends four working days before frontier, and the six-pass
balanced search finds a plan two days shorter than the single fast pass. With splits,
one pause in Reports is enough for every forward run to end five days earlier. That is this plan, not a
rule: on another plan the runs can tie, and more passes never make the result worse, only slower.
// Each run levels its own copy, so the four plans can be compared side by side.
const variants = [
{ strategy: "frontier", allowSplits },
// 1 pass
{ strategy: "forward", effort: "fast", allowSplits },
// 6 passes, the best is kept
{ strategy: "forward", effort: "balanced", allowSplits },
// 6 + 32 random passes
{ strategy: "forward", effort: "thorough", allowSplits },
];
for (const options of variants) {
const copy = project.clone();
const result = copy.level(options); // result.passes: 0 / 1 / 6 / 38
// …read copy.getState() for the chart, then copy.dispose()
}
Measuring the runs
The numbers are the engine's. evaluate levels a run on a copy and reports how far the
project end and every task in focus finish from the accepted plan, in working days on
their calendars. The accepted plan here is the unleveled one, which is what the table compares with.
evaluate returns numbers only, so each run is leveled a second time on a
clone() for the chart, the split count and the passes.
// The numbers of a run, measured by the engine against the unleveled plan:
const [scored] = project.evaluate(
[{ id: "run", changes: {} }],
{ level: options, focus: taskIds },
).candidates;
// project end: working days later
scored.leveled.finish.project.delta;
// every task's finish; the sum is the total delay
scored.leveled.finish.tasks.map(t => t.finish.delta);
The priority demo uses the forward strategy to decide which project goes first, and level resources shows the default strategy step by step.