Skip to content

[BUG] Bounds are not checked on variable definition  #978

@arnaud-m

Description

@arnaud-m

Describe the bug
The lower and upper bounds are not checked on variable definition.

To Reproduce
Define a variable with invalid bounds.

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.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions