API reference#
The .NET API of Planning Engine ships as two NuGet packages. 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. Both target net10.0.
How the API is organized#
The first level of this reference is the package:
- core -
Plen.Core, namespacePlen. Every core type lives in this one namespace. The folders undercoregroup the types by topic and aren't namespaces. - assign -
Plen.Assign, namespacePlen.Assign. It depends onPlen.Core. ItsSkillLayer.Slotsmethod returns the slot list thatProject.SuggestAssignmentstakes.
Each call has its own page at the top of api/: the methods of Project and the static methods Engine.Schedule and SkillLayer.Slots.
Add Plen.Assign only for skill-based auto-assignment. JSON input and output are in a separate package, Plen.Wire; see Exchange JSON with a client.
using Plen;
using Plen.Assign;
Every call in both packages is synchronous: there are no Async methods and no CancellationToken parameters. Nothing is IDisposable. A Project isn't thread-safe; see Share a project between threads.
Failures are exceptions. Invalid input throws InputException, and a call that doesn't fit the project's state throws ProjectException. Both derive from PlenException. A null argument that isn't declared nullable throws ArgumentNullException. Cycles, conflicts and rejected edits come back as data in the result. See Error handling for which failures throw and which don't.
Calls by task#
Preview, LoadProfile, Evaluate, EvaluateWith, SuggestAssignments, Roster and SkillLayer.Slots need a solved project. The constructor, Clone() and ToString() are on the Project page.