T-C — Planning engine daily mode: opportunities, travel provider, OR-Tools VRP model, result mapping #18

Open
opened 2026-09-11 09:02:11 +00:00 by bart · 2 comments
Collaborator

Parent

Row T-C in docs/12-implementation-plan.md (branch, owned paths and doc section are defined there).

What to build

Given a PlanningSnapshot, the engine enumerates opportunities, builds the OR-Tools model from docs/05-planning-engine.md §4 (daily mode) with a TravelMatrixProvider (haversine implementation), and returns a PlanResult with assignments and unassigned jobs with reasons. Pure module; replayable from a file.

Acceptance criteria

  • Tiny fixture solves to its known optimum; medium fixture solves within the time budget
  • Every lock type in the every-lock-type fixture is honoured
  • Unassigned jobs carry a reason from the closed reason list
  • polaris replay-run --file produces the result; a slow regression test is marked and skipped by default
  • Engine imports only core and contracts; docs/05 §2–§7 updated

Blocked by

  • #12 — Engine contracts: PlanningSnapshot, PlanResult, Finding, projector/scorer I/O, task payloads, code lists, fixtures
## Parent Row **T-C** in `docs/12-implementation-plan.md` (branch, owned paths and doc section are defined there). ## What to build Given a `PlanningSnapshot`, the engine enumerates opportunities, builds the OR-Tools model from docs/05-planning-engine.md §4 (daily mode) with a `TravelMatrixProvider` (haversine implementation), and returns a `PlanResult` with assignments and unassigned jobs with reasons. Pure module; replayable from a file. ## Acceptance criteria - [x] Tiny fixture solves to its known optimum; medium fixture solves within the time budget - [x] Every lock type in the every-lock-type fixture is honoured - [x] Unassigned jobs carry a reason from the closed reason list - [x] `polaris replay-run --file` produces the result; a `slow` regression test is marked and skipped by default - [x] Engine imports only `core` and `contracts`; docs/05 §2–§7 updated ## Blocked by - #12 — Engine contracts: PlanningSnapshot, PlanResult, Finding, projector/scorer I/O, task payloads, code lists, fixtures
patrick self-assigned this 2026-09-11 11:47:12 +00:00
Owner

Starting work on branch feature/engine-daily-mode. Owned paths: backend/src/polaris/engine/**, backend/tests/unit/engine/**, backend/tests/fixtures/snapshots/** (additions only). Building daily-mode OR-Tools VRP model per docs/05-planning-engine.md §2–§7, on top of the merged #12 engine contracts.

Starting work on branch `feature/engine-daily-mode`. Owned paths: `backend/src/polaris/engine/**`, `backend/tests/unit/engine/**`, `backend/tests/fixtures/snapshots/**` (additions only). Building daily-mode OR-Tools VRP model per docs/05-planning-engine.md §2–§7, on top of the merged #12 engine contracts.
Owner

Done — PR #72 (#72), branch feature/engine-daily-mode. All acceptance criteria ticked above. mypy --strict and ruff clean; 196 unit tests green (plus a --run-slow regression test against the medium fixture's real 120s daily budget). Note in the PR's Additional Context: cli/replay_run.py's stub wiring is a small follow-up now that both T-C and T-D have merged, left untouched here since it's outside this ticket's owned paths.

Done — PR #72 (https://git.xor.nu/patrick/Polaris/pulls/72), branch `feature/engine-daily-mode`. All acceptance criteria ticked above. mypy --strict and ruff clean; 196 unit tests green (plus a `--run-slow` regression test against the medium fixture's real 120s daily budget). Note in the PR's Additional Context: `cli/replay_run.py`'s stub wiring is a small follow-up now that both T-C and T-D have merged, left untouched here since it's outside this ticket's owned paths.
Sign in to join this conversation.
No labels
ready-for-agent
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
patrick/Polaris#18
No description provided.