Project::level#
Resolves resource overallocation in a Project. It runs solve(None) with default options first, then writes persistent leveling_delay and pauses edits and accepts the leveled state as the baseline.
Signature#
Takes &mut self. Synchronous and CPU-only.
Parameters#
| Name | Type | Description |
|---|---|---|
options |
&LevelingOptions |
Scope, order, basis and how leveling may move tasks |
Behavior#
- Forward scheduling only.
- On a cyclic project, it returns the initial solve's result with
rounds: 0. - The leveled dates replace the baseline. To see leveling without committing it, call
levelon aclone.
Returns#
Errors#
| Error | When |
|---|---|
Error::Input |
An unknown id in options.scope.resources or options.scope.tasks (path scope.resources / scope.tasks); the project has config.schedule_from_end: true (path config.schedule_from_end) |
Error::Project(ProjectError::NeedsResync) |
Returned by the initial solve |
Example#
Level two tasks that share one resource, first on a copy, then for real.
use ;
Related#
Project- the type and its other methodsLevelingOptions- scope, order, basis and stepLevelingResult- the returned result- Leveling Resources - how leveling works and its options
- Preview leveling and Clear leveling - step-by-step tasks