suggest#

Types for auto-assignment. You describe each staffing need as a Slot: one requirement instance on one task, with the resources eligible for it. Pass the slots and SuggestOptions to Project::suggest_assignments. AssignTarget picks which slot categories the call acts on.

The call returns a SuggestResult: a change set to commit with Project::apply, plus a log of SuggestStep entries with their StepCost. Its totals are an AssignTotal for the reference state and a SuggestProposal for the final state.

Roster and RosterAssignment come from Project::roster, a skill-free read of the accepted state's tasks, resources and assignments. To build slots from workers with skills, use the assign crate.

Everything is re-exported at the crate root, so you import plen_core::Slot, not an internal module path. For a walk-through, see Suggesting assignments.

  • AssignTargetA slot category that suggest_assignments acts on - empty, broken or valid
  • AssignTotalCost and resource count of the reference state in a suggest_assignments result
  • RosterSkill-free inventory of the accepted state's scheduled tasks, resources and active assignments
  • RosterAssignmentOne active assignment in a Roster, as its id, task and resource
  • SlotOne requirement instance on one task, with the resources eligible to fill it
  • StepCostThe state cost before and after one suggest_assignments step
  • SuggestOptionsOptions for Project::suggest_assignments - slot categories, fixed assignments, new-resource penalty, scoring stage, passes and cleared reference state
  • SuggestProposalCost, resource count and metrics of the final working state in a suggest_assignments result
  • SuggestResultThe assignment proposal returned by Project::suggest_assignments - net changes, step log, unfilled and invalid slots, and scores
  • SuggestStepOne decision of suggest_assignments that changed the working state