Fix #498: [Model] SequencingToMinimizeWeightedTardiness#672
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #672 +/- ##
========================================
Coverage 97.45% 97.46%
========================================
Files 351 353 +2
Lines 44931 45097 +166
========================================
+ Hits 43788 43954 +166
Misses 1143 1143 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
Adds a new NP-complete scheduling model, SequencingToMinimizeWeightedTardiness (1 || Σ w_j T_j), and integrates it across the crate (exports, schema/variants, examples, CLI creation support, tests, and documentation/paper).
Changes:
- Introduces
SequencingToMinimizeWeightedTardinessmodel with Lehmer-code encoding, schema registration, and declared default variant complexity. - Adds unit tests + example-db fixture entry for the new model.
- Extends
pred createCLI support (flags, examples, tests) and regenerates docs JSON + paper section/bibliography.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/models/misc/sequencing_to_minimize_weighted_tardiness.rs |
New problem model implementation + schema entry + variants + example-db spec + test wiring |
src/models/misc/mod.rs |
Registers and re-exports the new misc model; adds to example-db aggregation |
src/models/mod.rs |
Re-exports the new model at the top-level models module |
src/lib.rs |
Re-exports the new model in the public prelude |
src/unit_tests/models/misc/sequencing_to_minimize_weighted_tardiness.rs |
New model-focused unit tests (evaluation, invalid configs, solver, serialization) |
src/unit_tests/trait_consistency.rs |
Adds the new model to trait consistency checks |
src/example_db/fixtures/examples.json |
Adds a canonical example instance + sample/optimal configs |
problemreductions-cli/src/commands/create.rs |
Adds pred create SequencingToMinimizeWeightedTardiness parsing + example usage text |
problemreductions-cli/src/cli.rs |
Documents required flags for the new pred create problem type |
problemreductions-cli/tests/cli_tests.rs |
Adds CLI tests for successful creation, mismatch rejection, and help output |
docs/src/reductions/problem_schemas.json |
Adds generated schema entry for the new model |
docs/src/reductions/reduction_graph.json |
Adds generated graph node for the new model and reindexes affected edges |
docs/paper/references.bib |
Adds bibliography entries referenced by the new paper section |
docs/paper/reductions.typ |
Adds the paper definition + example/figure block for the new model |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| // SequencingToMinimizeWeightedTardiness | ||
| "SequencingToMinimizeWeightedTardiness" => { | ||
| let sizes_str = args.sizes.as_deref().ok_or_else(|| { | ||
| anyhow::anyhow!( | ||
| "SequencingToMinimizeWeightedTardiness requires --sizes, --weights, --deadlines, and --bound\n\n\ | ||
| Usage: pred create SequencingToMinimizeWeightedTardiness --sizes 3,4,2,5,3 --weights 2,3,1,4,2 --deadlines 5,8,4,15,10 --bound 13" | ||
| ) |
| } | ||
|
|
||
| @article{tanaka2009, | ||
| author = {Shunji Tanaka and Shuji Fujikuma and Mituhiko Araki}, |
Agentic Review ReportStructural Check
Build: Issue Compliance (Issue #498): 8/8 checks passed. Lehmer code encoding (vs raw position indices) is a justified deviation — standard in this codebase. Canonical example uses K=13 (uniquely satisfying) instead of issue's K=15 — beneficial tightening. Semantic Review:
Whitelist deviation: Result: 14/14 structural checks passed. 0 critical, 0 important issues. Quality CheckDesign Principles:
HCI (CLI changed):
Test Quality:
Issues:
Agentic Feature Tests
Issues:
Generated by review-pipeline |
…ocks, format
- Update canonical_model_example_specs to use new ModelExampleSpec struct fields
- Fix duplicate #{ block opener in reductions.typ from merge
- Restore missing load-model-example and prefix-sums bindings for CumulativeCost
- Run cargo fmt to fix import line wrapping
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The auto-generated Parameters section showed --lengths (from the schema field name) while the Example and actual handler used --sizes. Add a field-name override so both are consistent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Summary
Add the execution plan and implementation for SequencingToMinimizeWeightedTardiness.
Fixes #498