You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found out that posting an equality constraint on IntVar can create new variables in the model. An example of code showing that variables are created is the following:
On the first time executing the line when posting the constraint, two variables are created, on the second time, one variable is created, and on the third time no variable is created.
After testing a little, it seems that creation of variables depends on the lower bound of the variables, and on the constant in the equality (in this case, the constants are either 1 or 2, so only two different variables are created).
The text was updated successfully, but these errors were encountered:
It is related to scalar conversion. It turns the int into an IntVar to ease linear combination reduction.
I suppose this needs to be revamped.
I let you know.
In fact, it is more related to BiReExpression which was initially designed to deal with 2 IntVars.
Here, one element of the binary relation is an int, so it is automatically turned into a IntVar.
I found out that posting an equality constraint on IntVar can create new variables in the model. An example of code showing that variables are created is the following:
On the first time executing the line when posting the constraint, two variables are created, on the second time, one variable is created, and on the third time no variable is created.
After testing a little, it seems that creation of variables depends on the lower bound of the variables, and on the constant in the equality (in this case, the constants are either 1 or 2, so only two different variables are created).
The text was updated successfully, but these errors were encountered: