Expand description
Concurrent scheduling phase for temporal plans.
ferroplan’s temporal search finds what to do but lays the actions out
sequentially (it’s guided by action count, not makespan) — so more workers never
shortened the schedule. This pass takes a found TimedPlan and repacks it
onto the domain’s actor-objects: one job per actor at a time, each action
starting as early as its inputs (consumed resources) and prerequisites (the
build-order predicates) allow. Independent work then overlaps across actors, so
more actors ⇒ shorter makespan — the parallelism the planner couldn’t show.
It’s the planner’s scheduling phase (search = causal structure, this = who does
what, when), gated by crate::features::tconc. The result is always run through
crate::temporal::validate; if the concurrent schedule doesn’t validate (or
isn’t shorter), the original sequential plan is returned unchanged. So it can only
help, never produce a wrong plan.
Convention. The actor is the first parameter of each durative action (e.g.
(?w - worker …)); actors are the problem objects of that type. A task’s
actor-referencing PRECONDITIONS are its required skills (e.g. (smith ?w)) —
a worker is eligible only if they hold for it in the init state, so skill-gated
tasks go only to workers who can do them (location works the same way). Effects
that depend on which actor (a (when (lumberjack ?w) …)) would change when an
action is reassigned, so a domain meant for this pass keeps actor effects
interchangeable — only preconditions/skills may differ between workers.
Functions§
- n_
actors - Number of actor-typed objects in
problem(0 if the domain has no durative actions / actor type). - reschedule
- Repack
planonto the domain’s actor objects to minimise makespan. Returns a shorter, validated concurrent plan, orNoneto keep the original. - single_
actor_ problem - A copy of
problemreduced to a single super-worker: keep the first actor object, drop the rest, and grant the kept one the UNION of every actor’s init properties (skills, location, …). The causal search is flaky with many symmetric actors, so it runs on this lone worker — who can do the whole job, including skill-gated tasks.reschedulethen reassigns each task to a REAL worker that actually has the required skill. Returns the problem unchanged if there are fewer than two actors.