Skip to content

Conversation

@ArthurGodet
Copy link
Collaborator

@ArthurGodet ArthurGodet commented Aug 14, 2025

Also fixes #1114

set the relative path to the settings
…izeOf fails at estimating the size of the model.
- interlace n arrays
- extract a sub-matrix from a matrix
+ remove 'scores' structure from PickOnFil
@ArthurGodet
Copy link
Collaborator Author

I had problems with git rebase, so, in order to keep a clean git history, we need to squash this PR whenever it is accepted/merged

@ArthurGodet ArthurGodet changed the base branch from develop to xcsp September 15, 2025 16:30
@ArthurGodet
Copy link
Collaborator Author

Important to note : the failing tests do not rely on the cumulative constraint

@cprudhom
Copy link
Member

cprudhom commented Oct 3, 2025

Here are some results of the new Cumulative (new) in comparison to the current version (base) on instances from the last 6 MiniZinc challenges declaring cumulative constraints.

With LCG off

image

The two instances that are faster with base than with new are :

  • gfd-schedule2_n200f5d50m40k6_10124 : 95s vs 100s
  • model4_opt_test03 : 106s vs 154s

The difference comes from the usage of the OverloadChecking algorithm which never helps on these instances.

image

With LCG on

image

The two instances where base-lcg is faster than new-lcg are:

  • mrcpsp_j30_29_3 : 22s vs 57s
  • mrcpsp_j30_54_2 : 12s vs 23s

I still need to understand the differences but as a recall, base-lcg time-based decomposes the cumulative constraint.

image

@ArthurGodet
Copy link
Collaborator Author

I confirm that base-lcg is based on decomposition for the cumulative. I wonder if the two instances where base-lcg does better are on a short horizon ? That might explain the performance difference.

@cprudhom
Copy link
Member

cprudhom commented Oct 4, 2025

Actually, in the benchmarks, there are 5 instances of mrcpsp_j30, with different results.

Instance Opt base-lcg new-lcg
mrcpsp_j30_25_5 min 27 - 3s - 995n - P 27 - 1s - 2470n - P
mrcpsp_j30_29_3 min 32 - 22s - 24110n - U 32 - 57s - 166551n - U
mrcpsp_j30_33_5 min 48 - 52s - 7150n - P 48 - 5s - 9829n - P
mrcpsp_j30_41_8 min 30 - 42s - 5822n - P 30 - 4s - 7984n - P
mrcpsp_j30_54_2 min 28 - 12s - 9537n - U 28 - 23s - 75877n - P

Edit 1 : I added the number of nodes (XXXn) and the termination (P for proven, U for unproven).
Now, it seems that base-lcg is able to find solutions exploring fewer nodes, but since the decomposition can be big, it also wastes time propagating (see for instance, mrcpsp_j30_25_5 or mrcpsp_j30_33_5).
This, also, mitigates mrcpsp_j30_54_2 because base-lcg is not able to prove the bound, unlike new-lcg.

We can conclude that the decomposition provides better explanations (probably, thanks to additional variables introduced by the decomposition) - which is, as far as I known, not surprising.
On the other hand, the global version of cumulative provides better propagation performances but suffer from weaker explanations.

Question is: can we live with that?

My opinionYes, we can

@cprudhom
Copy link
Member

Can we consider this PR as ready to be merged ?

@ArthurGodet
Copy link
Collaborator Author

ArthurGodet commented Oct 16, 2025

I didn't see your edits. So it seems that mrcpsp_j30_29_3 is the only instance that is better treated by base_lcg, and since the best found solution is not proven to be optimal, I'd say that it is not that important (especially compared to the better results we get wih new_lcg for the other instances). I agree that the explanations of new_lcg seem weaker, but my first impression would be that it is not surprising (even if I can't really explain why).

For me, even if it can still be improved (especially by better detecting when to apply the OverloadChecking or not, to improve performance), I consider that the PR can be merged. Don't forget to squash and merge the PR as the git history of the branch is awful.

@ArthurGodet ArthurGodet merged commit 89c999d into xcsp Oct 28, 2025
17 of 19 checks passed
@ArthurGodet ArthurGodet deleted the feature/cumulative branch October 28, 2025 16:33
cprudhom pushed a commit that referenced this pull request Jan 15, 2026
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.

4 participants