Closed Vaibhavdixit02 closed 1 year ago
What you are observing is expected to be so. Alpine does not support integer variables at this point. In case you are still interested to solve an integer variable problem, any integer-valued variable can be reformulated as a problem with binary variables. For example, if x in {-2, -1, 0, 1, 2},
a set of additional binary variables z_i
could be introduced with these additional constraints:
x = -2*z_1 - z_2 + z_3 + 2*z_4
z_1 + z_2 + z_3 + z_4 <= 1
z_i in {0,1}, i in [1:4]
With the above reformulation, you could use Alpine.
To reduce the confusion, will drop the integer.jl
from examples
folder.
Ah, that's an interesting point, though if it can't be done automatically it seems pretty cumbersome to do it manually. Do you think that can be something handled here?
I'll close this issue since the point is resolved
We could have a bridge for the case that the variable bounds are also finite.
Yes - at this point, a large bound is added for every unbounded variable, with a warning so that it could build the relaxations.
Describe the bug
I got this when trying to solve the https://github.com/lanl-ansi/Alpine.jl/blob/master/examples/MINLPs/integer.jl#L122 problem in the examples through the MOI interface (not the jump implementation there directly), am I doing something wrong?