CP-SAT: TimeTableEdgeFinding can report false INFEASIBLE for large cumulative scheduling models

Open
#5,672 2 comments 0 reactions 1 assignee View on GitHub

Maintainers usually reply within 1 day

@lperron is already working on this.

Since Dec 1, 2026.

  • #5673 by @lperron — open

Assessment

This issue has not been assessed yet.

Description

Bug Solver: CP-SAT Solver

Version and environment

  • OR-Tools: 10.0 development build (RC1)

  • Audited commit: e58369423a1af21e8d5a996a4f2255420d1eb7c0

  • Solver: CP-SAT

  • Platform: Linux x86-64

  • Python: 3.13

  • Build: From upstream source

Description

During a mathematical correctness audit of CP-SAT cumulative scheduling propagators, we observed incorrect INFEASIBLE results for synthetic models whose feasibility was independently established.

The investigation identified an arithmetic correctness issue in:

  • File: ortools/sat/timetable_edgefinding.cc

  • Component: TimeTableEdgeFinding

The existing arithmetic safeguards appear insufficient to guarantee that all intermediate energy calculations remain representable within signed 64-bit integer limits.

Expected behavior

CP-SAT must not classify a mathematically feasible model as INFEASIBLE.

When an intermediate energy calculation cannot be represented safely, the propagator should conservatively avoid making an unsupported inference.

Actual behavior

The unmodified audited build returned INFEASIBLE on feasible cumulative scheduling instances.

Experimental evidence

The following results were obtained from actual source builds and regression testing:

Test | Original build | Experimental correction -- | -- | -- Targeted native regression tests | 6 failures | 6 passes UBSan signed arithmetic findings in the affected propagator | 2 | 0 observed Existing cumulative and timetable regression targets | — | PASS

A separate Python differential test using an independent mathematical oracle also identified an incorrect infeasibility result.

The combined audit build subsequently recovered the correct optimal solution.

For transparency, the Python differential result was obtained using a combined set of audit corrections, whereas the targeted native regression tests evaluated the isolated arithmetic correction.

Suggested investigation

Please review the representability checks and intermediate energy arithmetic in TimeTableEdgeFinding.

Potential approaches include checked arithmetic, wider intermediate arithmetic, or conservatively skipping propagation when the required calculations cannot be represented safely.

The experimental correction is not presented as a definitive upstream implementation.

Limitations

  • Runtime testing was performed on the specified audited commit.

  • The issue has not yet been independently runtime-verified against the latest upstream revision.

  • The experimental results establish a correctness concern within the tested cases, not a general proof covering every execution path.

Transparency

This investigation was conducted using AI-assisted source-code review, native regression tests, sanitizer checks, and independent mathematical oracles.

The reported test results were obtained from actual executions using synthetic models, without proprietary application data.

Dominant language
C++
Stars
14.5k
Forks
2.6k
Avg merge
9h 43m
Merged PRs (30d)
53

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from google/or-tools

All issues in google/or-tools

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.