Skip to content

Fix #500: [Model] SequencingToMinimizeMaximumCumulativeCost#674

Open
GiggleLiu wants to merge 6 commits intomainfrom
issue-500-sequencing-to-minimize-maximum-cumulative-cost
Open

Fix #500: [Model] SequencingToMinimizeMaximumCumulativeCost#674
GiggleLiu wants to merge 6 commits intomainfrom
issue-500-sequencing-to-minimize-maximum-cumulative-cost

Conversation

@GiggleLiu
Copy link
Contributor

Summary

Add the implementation plan for SequencingToMinimizeMaximumCumulativeCost, including the model design, CLI wiring, tests, and paper work.

Fixes #500

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 97.37828% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.04%. Comparing base (dfcc313) to head (994f414).

Files with missing lines Patch % Lines
.../sequencing_to_minimize_maximum_cumulative_cost.rs 96.33% 4 Missing ⚠️
src/models/misc/sequencing_within_intervals.rs 96.00% 2 Missing ⚠️
...t_tests/models/misc/sequencing_within_intervals.rs 94.44% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #674      +/-   ##
==========================================
- Coverage   97.04%   97.04%   -0.01%     
==========================================
  Files         284      286       +2     
  Lines       38037    38289     +252     
==========================================
+ Hits        36914    37158     +244     
- Misses       1123     1131       +8     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@GiggleLiu
Copy link
Contributor Author

Implementation Summary

Changes

  • Added src/models/misc/sequencing_to_minimize_maximum_cumulative_cost.rs with Lehmer-code permutation encoding, precedence feasibility checks, cumulative-prefix bound evaluation, metadata, and an example instance.
  • Registered the new model across src/models/misc/mod.rs, src/models/mod.rs, src/lib.rs, src/unit_tests/trait_consistency.rs, src/example_db/fixtures/examples.json, and the generated reduction export JSON.
  • Extended CLI support in problemreductions-cli/src/cli.rs and problemreductions-cli/src/commands/create.rs, including shared precedence parsing and validation for sequencing commands.
  • Added coverage in src/unit_tests/models/misc/sequencing_to_minimize_maximum_cumulative_cost.rs and problemreductions-cli/tests/cli_tests.rs, and documented the model in docs/paper/reductions.typ with new bibliography entries.

Deviations from Plan

  • During review follow-up, I factored precedence parsing and range validation into shared CLI helpers so the new command and MinimumTardinessSequencing return consistent, flag-specific errors.
  • I expanded the test scope beyond the original plan to cover precedence serialization, invalid precedence parsing, negative costs/bounds, and constructor panic behavior for out-of-range precedence endpoints.

Open Questions

  • None.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the SequencingToMinimizeMaximumCumulativeCost model (G&J SS7) to the core library, including schema/variant registration, example-db fixture, CLI pred create wiring, unit + CLI tests, and documentation/paper updates.

Changes:

  • Implement the new satisfaction model using Lehmer-code configurations and precedence/prefix-sum validation.
  • Wire the model into the library exports, example DB fixtures, and CLI creation (including shared precedence-pair parsing/validation).
  • Regenerate/update docs JSON and extend the paper with the new model description + references.

Reviewed changes

Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/models/misc/sequencing_to_minimize_maximum_cumulative_cost.rs New model implementation + schema registration + variants + example-db hook
src/models/misc/mod.rs Registers the new misc model module and example-db specs
src/models/mod.rs Re-exports the new model from models
src/lib.rs Re-exports the new model from the public prelude
src/unit_tests/models/misc/sequencing_to_minimize_maximum_cumulative_cost.rs New unit tests covering construction, evaluation, brute-force, serialization, edge cases
src/unit_tests/trait_consistency.rs Adds trait-consistency coverage for the new model
src/example_db/fixtures/examples.json Adds canonical example fixture + satisfying configs
problemreductions-cli/src/cli.rs Adds --costs flag and help-line for the new problem type
problemreductions-cli/src/commands/create.rs Adds creation path for the new model and shared --precedence-pairs parsing/validation helpers
problemreductions-cli/tests/cli_tests.rs Adds CLI tests for pred create SequencingToMinimizeMaximumCumulativeCost (success + error cases)
docs/src/reductions/problem_schemas.json Adds generated schema entry for the new model
docs/src/reductions/reduction_graph.json Adds generated node entry for the new model (index shifts reflected in edges)
docs/paper/references.bib Adds references for series-parallel precedence results
docs/paper/reductions.typ Adds paper definition/description/example/figure section for the new model

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

…00-sequencing-to-minimize-maximum-cumulative-cost

# Conflicts:
#	docs/paper/reductions.typ
#	docs/src/reductions/problem_schemas.json
#	docs/src/reductions/reduction_graph.json
#	problemreductions-cli/src/commands/create.rs
#	src/example_db/fixtures/examples.json
#	src/lib.rs
#	src/models/misc/mod.rs
#	src/models/mod.rs
#	src/unit_tests/trait_consistency.rs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Model] SequencingToMinimizeMaximumCumulativeCost

2 participants