Skip to content

Fix #501: Add PrecedenceConstrainedScheduling model#626

Merged
isPANN merged 11 commits intomainfrom
issue-501-precedence-constrained-scheduling
Mar 18, 2026
Merged

Fix #501: Add PrecedenceConstrainedScheduling model#626
isPANN merged 11 commits intomainfrom
issue-501-precedence-constrained-scheduling

Conversation

@zazabap
Copy link
Copy Markdown
Collaborator

@zazabap zazabap commented Mar 13, 2026

Summary

  • Add PrecedenceConstrainedScheduling satisfaction problem model (Garey & Johnson A5 SS9)
  • Unit-length tasks with precedence constraints, m processors, deadline D
  • Satisfaction problem: does a valid schedule exist?

Fixes #501

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 13, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.28%. Comparing base (f4e5c47) to head (7fc1a97).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #626      +/-   ##
==========================================
+ Coverage   97.26%   97.28%   +0.01%     
==========================================
  Files         316      318       +2     
  Lines       41058    41232     +174     
==========================================
+ Hits        39937    40111     +174     
  Misses       1121     1121              

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

zazabap and others added 2 commits March 13, 2026 08:05
Add satisfaction problem for scheduling unit-length tasks on m
processors by deadline D with precedence constraints (Garey & Johnson
A5 SS9, Ullman 1975).

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

zazabap commented Mar 13, 2026

Implementation Summary

Changes

  • src/models/misc/precedence_constrained_scheduling.rs — New model: satisfaction problem for scheduling unit-length tasks on m processors by deadline D with precedence constraints
  • src/unit_tests/models/misc/precedence_constrained_scheduling.rs — 12 unit tests: basic, evaluation (valid/invalid/edge cases), brute force, serialization
  • src/models/misc/mod.rs — Register module and re-export
  • src/models/mod.rs — Add to top-level re-exports
  • problemreductions-cli/src/dispatch.rs — Add load_problem and serialize_any_problem dispatch arms
  • problemreductions-cli/src/problem_name.rs — Add lowercase alias resolution

Deviations from Plan

  • Added input validation: num_processors > 0 and deadline > 0 assertions when num_tasks > 0 (quality review finding)
  • Used 0-indexed time slots {0, ..., D-1} instead of issue's 1-indexed {1, ..., D} — standard representation choice

Open Questions

  • Complexity string uses brute-force bound "deadline ^ num_tasks". No well-known refined exact algorithm exists for general PCS with variable m.
  • Paper entries (display-name + problem-def) deferred to separate PR.

@GiggleLiu
Copy link
Copy Markdown
Contributor

Autonomous project-pipeline stopped here because this resumed PR is now stale against main and GitHub reports it as merge-conflicting (mergeable=CONFLICTING). Handing off to Final review for human triage rather than forcing a large conflict repair inside the pipeline.

@GiggleLiu
Copy link
Copy Markdown
Contributor

GiggleLiu commented Mar 16, 2026

Complexity string uses brute-force bound "deadline ^ num_tasks".
No well-known refined exact algorithm exists for general PCS with variable m.
Paper entries (display-name + problem-def) deferred to separate PR.

I do not think these two problems are acceptable. Also, this PR does not have copilot review comments. I will move it back to final-review.

isPANN and others added 5 commits March 18, 2026 21:00
…constrained-scheduling

# Conflicts:
#	problemreductions-cli/src/dispatch.rs
#	problemreductions-cli/src/problem_name.rs
#	src/models/misc/mod.rs
#	src/models/mod.rs
…nedScheduling

- Resolve merge conflicts (dispatch.rs/problem_name.rs now use registry-based dispatch)
- Add `default sat` to declare_variants! macro
- Add missing ProblemSchemaEntry fields (display_name, aliases, dimensions)
- Add canonical_model_example_specs() with issue #501 example
- Add problem-def entry in paper with BibTeX references
- Regenerate example fixtures

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…constrained-scheduling

# Conflicts:
#	src/example_db/fixtures/examples.json
- Update canonical_model_example_specs to use new ModelExampleSpec fields
  (instance, optimal_config, optimal_value) instead of removed build closure
- Change complexity from brute-force D^n to 2^n (subset DP approach),
  consistent with other scheduling problems like MultiprocessorScheduling

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
isPANN and others added 3 commits March 18, 2026 21:46
Derive all example data (n, m, D, precedences, schedule) from the
canonical example database instead of hand-writing values.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@isPANN isPANN merged commit 70707a7 into main Mar 18, 2026
3 checks passed
@GiggleLiu GiggleLiu deleted the issue-501-precedence-constrained-scheduling branch April 12, 2026 00:53
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] PrecedenceConstrainedScheduling

3 participants