chocoteam / chocoteam/choco-solver
[BUG] Bounds are not checked on variable definition
- Dominant language
- Java
- Stars
- 779
- Forks
- 159
- Avg merge
- 6d 9h
- Merged PRs (30d)
- 10
Description
**Describe the bug**
The lower and upper bounds are not checked on variable definition.
**To Reproduce**
Define a variable with invalid bounds.
```java
m.intVar( 2 * IntVar.MIN_INT_BOUND, 2 * IntVar.MAX_INT_BOUND);
```
**Expected behavior**
I am unsure, but the behavior should depend on the nature of the variable : decision or auxiliary.
- One can ask the user to bound decision variables.
- However, auxiliary variables can be assigned large values even in a small search space. It is the case for a product or power constraints, or more generally arithmetic expressions.
For now, the practical issue is that the behavior is hard to predict.
Some later checks can raise an exception, or not, when building a model with arithmetic expressions.
Contributor guide
Assessment
This issue has not been assessed yet.