Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confused about the problems supported in Alpine #233

Closed
Vaibhavdixit02 opened this issue Jun 9, 2023 · 4 comments
Closed

Confused about the problems supported in Alpine #233

Vaibhavdixit02 opened this issue Jun 9, 2023 · 4 comments
Labels

Comments

@Vaibhavdixit02
Copy link

Describe the bug

ERROR: Alpine does not support MINLPs with generic integer (non-binary) variables yet!
Stacktrace:
 [1] error(s::String)
   @ Base ./error.jl:35
 [2] load!(m::Alpine.Optimizer)
   @ Alpine ~/.julia/packages/Alpine/qayiX/src/main_algorithm.jl:100
 [3] optimize!(m::Alpine.Optimizer)
   @ Alpine ~/.julia/packages/Alpine/qayiX/src/main_algorithm.jl:151

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?

@harshangrjn
Copy link
Collaborator

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.

@Vaibhavdixit02
Copy link
Author

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

@odow
Copy link
Collaborator

odow commented Jun 11, 2023

We could have a bridge for the case that the variable bounds are also finite.

@harshangrjn
Copy link
Collaborator

Yes - at this point, a large bound is added for every unbounded variable, with a warning so that it could build the relaxations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants