-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Hello
With @JolanPhilippe, we have a software stack that generates MiniZinc models.
Sometimes, the model generated is not consistent, so we use findMUS.
There was some unexpected behaviour and we realised that it was due to the declaration of the objective function.
Here are the two versions tested with MiniZincIDE version 2.8.3.
We don't understand why we have to declare the intermediate variable scost.
Can anyone help us with this?
Obviously, we can provide a model, if that helps.
Thank you
First version
model.mzn
% the model ...
solve minimize sum(cost);
comand line
/Applications/MiniZincIDE.app/Contents/Resources/bin/findMUS model.mznresults in:
SubSolver: hard cons: 214 soft cons: 154 leaves: 154 branches: 169 Built tree in 0.05303 seconds.
SubSolver: Exception during sub-solving: GecodeSolverInstance::processFlatZinc: Error: Unbounded variable: X_INTRODUCED_104_, rerun with --allow-unbounded-vars to add arbitrary bounds.
: error
IDE
With the IDE, it results in:
Command: minizinc --json-stream --param-file-no-push /private/var/folders/14/7lwdz4lx3fn922xmc1kv0g600000gr/T/mzn_LBsEnF.mpc /Users/kyzrsoze/Downloads/model.mzn --output-html
Configuration:
{
"intermediate-solutions": true,
"solver": "[email protected]"
}
SubSolver: hard cons: 214 soft cons: 154 leaves: 154 branches: 169 Built tree in 0.05376 seconds.
MiniZinc:
Finished in 296msec.
Second version
If I change the model to:
% the model ...
var int: scost;
constraint scost = sum(cost);
solve minimize scost;
I get:
comand line
SubSolver: hard cons: 214 soft cons: 154 leaves: 154 branches: 169 Built tree in 0.04780 seconds.
%%%mzn-progress 0.00
MUS: 104
Brief: int_eq_reif;:(i=11)
Traces:
/Users/kyzrsoze/Downloads/model.mzn|43|12|43|88|ca|forall;/Users/kyzrsoze/Downloads/model.mzn|43|12|43|88|ac;/Users/kyzrsoze/Downloads/model.mzn|43|20|43|20|i=11;/Users/kyzrsoze/Downloads/model.mzn|43|35|43|87|bin|'<->';/Users/kyzrsoze/Downloads/model.mzn|43|68|43|87|bin|'=';/Users/kyzrsoze/Downloads/model.mzn|43|68|43|87|ca|int_eq;/Users/kyzrsoze/Downloads/model.mzn|43|68|43|87|ca|int_eq_reif
%%%mzn-progress 100.00
%%%mzn-progress 100.00
Total Time: 0.19920 nmuses: 1 map: 11 sat: 10 total: 21
IDE
Command: minizinc --json-stream --param-file-no-push /private/var/folders/14/7lwdz4lx3fn922xmc1kv0g600000gr/T/mzn_LBsEnF.mpc /Users/kyzrsoze/Downloads/model.mzn --output-html
Configuration:
{
"intermediate-solutions": true,
"solver": "[email protected]"
}
SubSolver: hard cons: 214 soft cons: 154 leaves: 154 branches: 169 Built tree in 0.05527 seconds.
The following constraints are incompatible:
Uncategorised:
- model.mzn|43|68|43|87|ca|int_eq_reif ( i=11 )
----------
%%%mzn-stat: map=11
%%%mzn-stat: nmuses=1
%%%mzn-stat: sat=10
%%%mzn-stat: time=0.19706
%%%mzn-stat: total=21
%%%mzn-stat-end
Metadata
Metadata
Assignees
Labels
No labels