ConSol-Lab / Pumpkin

A lazy clause generation constraint solver written in Rust.
Apache License 2.0
17 stars 4 forks source link

fix: issue with time-point ending up between profiles for pointwise sequence explanation #78

Closed ImkoMarijnissen closed 3 weeks ago

ImkoMarijnissen commented 4 weeks ago

Running cargo run rcpsp.fzn --cumulative-explanation-type=pointwise --cumulative-generate-sequence led to an incorrect result for the instance 01.dzn.

This was because the explanation was incorrect since the time-point could end up between profiles while the current_profile_index points to the profile.

This PR addresses this issue by adding additional checks for detecting this scenario; if it occurs then the time-point is set to the end (or start in the case of upper-bound propagation) of the current profile.

It also fixes the issue of infinitely looping when a profile potentially being able to propagate a task does not actually propagate