Skip to content

Fix #506: Add OpenShopScheduling model#959

Closed
isPANN wants to merge 6 commits intomainfrom
fix-506-openshopscheduling
Closed

Fix #506: Add OpenShopScheduling model#959
isPANN wants to merge 6 commits intomainfrom
fix-506-openshopscheduling

Conversation

@isPANN
Copy link
Copy Markdown
Collaborator

@isPANN isPANN commented Mar 29, 2026

No description provided.

isPANN and others added 6 commits March 30, 2026 04:03
Implement the internal macro data compression problem (GJ SR23) with
direct ILP reduction, CLI support, canonical example, and paper entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add W type parameter to MinimumTardinessSequencing: W=One for unit-length
tasks (existing behavior), W=usize for arbitrary task lengths. Includes
ILP reduction for both variants, canonical examples, and updated tests.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement the weighted tardy task scheduling problem (GJ SS3) with
direct ILP reduction, CLI support, canonical example, and paper entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement the scheduling feasibility problem with compiler-class setup
times (GJ SS6) with direct ILP reduction, CLI support, and paper entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implement multiprocessor preemptive scheduling (GJ SS12) with binary
time-slot assignment, direct ILP<i32> reduction, CLI support, and paper entry.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Implements the Open Shop Scheduling optimization model (minimize makespan)
with a direct ILP reduction using disjunctive formulation (binary ordering
variables + integer start times + makespan objective). Canonical example
uses the 4 jobs × 3 machines instance with true optimal makespan = 8.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@isPANN
Copy link
Copy Markdown
Collaborator Author

isPANN commented Mar 29, 2026

Implementation Summary

Changes

  • src/models/misc/open_shop_scheduling.rs — New OpenShopScheduling model: n×m direct-permutation config, greedy simulation evaluator, Value = Min<usize>, declare_variants! with factorial(num_jobs)^num_machines complexity, canonical example with 4×3 instance
  • src/models/misc/mod.rs — Added module declaration and pub re-export for OpenShopScheduling
  • src/rules/openshopscheduling_ilp.rs — Direct ILP reduction using disjunctive formulation: binary x_{j,k,i} (job ordering per machine), binary y_{j,i,i'} (task ordering per job), integer s_{j,i} (start times), integer C (makespan objective)
  • src/rules/mod.rs — Added feature-gated module declaration and canonical example registration
  • src/unit_tests/models/misc/open_shop_scheduling.rs — 19 unit tests (creation, dims, evaluate, decode_orders, compute_makespan, serialization, brute-force)
  • src/unit_tests/rules/openshopscheduling_ilp.rs — 6 ILP tests (structure, closed-loop, extract_solution, edge cases)
  • docs/paper/reductions.typ — Added problem-def("OpenShopScheduling") with Gantt chart and reduction-rule("OpenShopScheduling", "ILP") with full formulation
  • docs/paper/references.bib — Added Gonzalez & Sahni 1976 JACM entry

Deviations from Plan

  • Canonical example optimal value: The issue body claimed optimal makespan = 11 for the 4×3 instance. Exhaustive brute-force reveals the true optimal is 8 (224/13824 orderings achieve it; the issue's schedule with makespan 11 is valid but suboptimal). The canonical example stores the correct optimal config and value.
  • Upper bounds on ILP start times: Added s_{j,i} <= total_p bounds to prevent unbounded integer search; without these, the ILP solver timed out on even 2×2 instances.

Open Questions

  • None.

@isPANN
Copy link
Copy Markdown
Collaborator Author

isPANN commented Mar 29, 2026

Closing - will be included in batch-models branch instead

@isPANN isPANN closed this Mar 29, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 29, 2026

Codecov Report

❌ Patch coverage is 99.39811% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 97.94%. Comparing base (a70b132) to head (54a63d1).

Files with missing lines Patch % Lines
.../rules/sequencingwithdeadlinesandsetuptimes_ilp.rs 96.03% 4 Missing ⚠️
src/types.rs 0.00% 3 Missing ⚠️
src/models/misc/preemptive_scheduling.rs 98.44% 2 Missing ⚠️
...ls/misc/minimum_internal_macro_data_compression.rs 99.00% 1 Missing ⚠️
src/models/misc/open_shop_scheduling.rs 99.00% 1 Missing ⚠️
...c/rules/minimuminternalmacrodatacompression_ilp.rs 99.38% 1 Missing ⚠️
src/unit_tests/rules/openshopscheduling_ilp.rs 98.64% 1 Missing ⚠️
.../rules/sequencingwithdeadlinesandsetuptimes_ilp.rs 98.71% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #959      +/-   ##
==========================================
+ Coverage   97.89%   97.94%   +0.04%     
==========================================
  Files         651      671      +20     
  Lines       71463    73707    +2244     
==========================================
+ Hits        69959    72189    +2230     
- Misses       1504     1518      +14     

☔ 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.

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.

1 participant