Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
chocosolver chokes on #property * a statement? #24
Note: Resubmission of gsdlab/ClaferChocoIG#7. I just checked with 0.4.2.1 (binary distribution), and the problem is exactly the same. As it's friday evening, it's a perfect moment to do these kinds of things :-)
Consider the following clafer model
Whereas claferIG seems to be able to succesfully generate instances from this model, it seems like the chocoIG fails to do the same. Removing the
and then the the solver seems to get stuck in an endless loop...
Add-on questions from a follow-up comment on my side:
On the other hand, would there (in this particular case) be a possibility to somehow declare that the price attribute of the Deployment variable is "derived" (in the UML sense), such that the backend knows it should actually not branch on this variable for instance?
I'd forgotten about this issue.
It turns out the issue was actually due to the Fourier-Motzkin elimination optimization. Long story short, it was spinning in an infinite loop because it couldn't detect a fixed-point due to the way linear equations were being eliminated.
The problem is now fixed in the latest chocosolver develop branch (commit 8af6d24).
Thanks for the bug report!
I've added a feature in commit a432d8d that can be used to have this same effect. The feature is very new, so you will have to do a bit of manual work to take advantage of it right now. For this specific example, you would add the following line to your .js file:
branchingPriority([[c0_hwComponents, c0_platforms, c0_CAN, c0_DO, c0_D1, c0_price, c1_price]]);
Couple of notes.
You can use Choco escapes to add that piece directly into your Clafer model:
the contents of choco escapes are added at the end of the compiler's output for choco.
If a name is unique in the whole model, then it'll always have the c0_ prefix. But because two different clafers have the name
Seriously, it's time for a new release :-)
Thx for this!