API reference#

The Rust API of Planning Engine ships as two crates. plen-core schedules, edits, levels and scores projects. plen-assign is an optional skill layer that turns workers and skill requirements into slots for auto-assignment.

How the API is organized#

The first level of this reference is the crate:

cargo add plen-core
cargo add plen-assign

Add plen-assign only for skill-based auto-assignment.

use plen_core::{Project, ProjectData, ProjectOptions, SolveOptions};
use plen_assign::{slots, Pool, Requirement};

Every call in both crates is synchronous. Fallible calls return Result. See Error handling for which failures are errors and which are data in the result.

Calls by task#

To Call Options Returns
Schedule a snapshot once schedule SolveOptions ScheduleResult
Load a live project or reschedule its edits Project::solve SolveOptions ScheduleResult
See what an edit would do Project::preview PreviewOptions ScheduleResult
Get critical path and slack without scheduling Project::analyze AnalyzeOptions ScheduleResult
Commit an edit Project::apply SchedulingChanges ApplyReport
Resolve resource overallocation Project::level LevelingOptions LevelingResult
Read resource load per day or week Project::load_profile LoadProfileOptions LoadProfile
Compare alternative edits Project::evaluate EvaluateOptions EvaluateResult
Pick resources for open positions Project::suggest_assignments SuggestOptions SuggestResult
Read tasks, resources and assignments for building slots Project::roster - Roster
Build slots from skills and requirements plen_assign::slots Pool, Requirement Vec<Slot>

preview, load_profile, evaluate, suggest_assignments and roster need a solved project. The full type with constructors and clone is on the Project page.