#84: temporal planner — sequential scheduling of durative-action domains#114
Merged
Conversation
Adds pddlpy/planning/temporal.py: a sequential temporal planner that solves durative-action domains, enforcing the full time-tagged contract (at start / over all / at end), applying start effects at the start point and end effects at start+duration. Uniform-cost search over accumulated duration returns a makespan-minimal TemporalPlan whose ScheduledAction steps carry start times and durations. Instantaneous actions participate as zero-duration steps, so mixed domains work. Registered as "temporal" with the :durative-actions capability. Sequential semantics v1: actions never overlap, so over all / at end are constrained only by an action's own start effects. Required concurrency is out of scope. Corpus: temporal-weld (over all genuinely constrains — an at-start-only checker would emit an invalid quick-weld), temporal-charge (mixed instantaneous + durative). Docs and CHANGELOG updated; README "Future development" now tracks concurrent temporal planning. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #84.
Adds a temporal planner that actually solves durative-action domains — the
piece deliberately left out of 1.0. Until now durative actions were parsed,
grounded and checked for
at startapplicability (DurativeState), but noplanner scheduled them.
What it does
pddlpy/planning/temporal.py— registered asget("temporal"), declaring the:durative-actionscapability, behind the existingPlannerABC(
solve(dp) -> Plan | None).apply_durative(state, action)applies one groundedDurativeAction:at startconditions must hold in the current state;over allinvariant andat endconditions are checked against thatmid-state (with no concurrency it persists for the whole duration);
start + duration.TemporalPlannerruns uniform-cost search over accumulated duration andreturns a
TemporalPlanwhosestepsareScheduledActions(
action,start,duration,end);makespandoubles as the plan cost.domains work.
Semantics & judgment calls
sequential semantics
over all/at endare constrained only by anaction's own start effects — an action whose start effect breaks its own
invariant is never executable. This is exactly the constraint an at-start-only
checker cannot express, and the
temporal-weldcorpus demonstrates it: anaive planner would emit the cheaper
quick-weld(which drops the clamp atstart, violating
over all (holding)), while the temporal planner correctlyschedules
steady-weld(makespan 6).overlap) — a documented follow-up. Also out of scope per the issue: PDDL 3.x
preferences and PDDL+ processes/events.
State(add-after-delete effect semantics)and the fail-fast requirement/capability guards, so it slots into the layer
without touching the reference planners. Strict layering is preserved (no
grammar import;
tests/test_layering.pypasses).Corpus & tests
Two solvable durative domains with correct schedules, plus an unsolvable
variant:
temporal-weld—over allgenuinely constrains the plan (naive → invalid);temporal-weld-notorch—at end (torch-lit)unsatisfiable → no schedule.temporal-charge— mixed instantaneous (plug) + durative (charge-battery),makespan 4.
Full suite green at 100% coverage (202 tests, +11);
ruffandmypy(strict on
pddlpy.planning.*) clean;make(grammar + all tests) green.Note for reviewers
An ADL workstream (#10) is running in parallel and may conflict with this PR in
the planner registry and docs (README /
docs/object-model.md) — worthsequencing the merges.