-
Notifications
You must be signed in to change notification settings - Fork 16
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
Upper bound and binary variables #115
Comments
Hi @javieravz---EAGO does support binary and integer JuMP variables. Would you be able to post a minimum breaking example to help isolate where your issue is coming from? |
Here is the example `using JuMP, EAGO model = Model(EAGO.Optimizer) M= #Sets #Variables @constraint(model, y>=800) @constraint(model,[c in C, t in T], ws[c,1,t]==v[t]) @constraint(model, [c in C, r=1:4, t in T], y_o[c,r+1,t] <= y_o[c,r,t]) @constraint(model, [c in C, r in R, t in T], y_o[c,r,t] <= y_b[c,r]) @constraint(model, [c in C, r in R, t in T], p_out_ac[c,r,t] <= p_out[c,r,t]) @constraint(model, [c in C, r in R, t in T], ws[c,r,t]== sum(f[i, c, r, t] for i in I)) @constraint(model, 370000 <= sum(p_out_ac[c,r,t] for c in C, r in R, t in T)*365) #power_tot #Objective function And here is the output MathOptInterface.UpperBoundAlreadySet{MathOptInterface.Interval{Float64}, MathOptInterface.LessThan{Float64}}: Cannot add Stacktrace: |
We were able to isolate the issue. This and a couple other small changes will be pushed out in v0.8.1. Your example shouldn't throw any errors with this fix, though I'll note that EAGO requires each variable to have a compact set as its domain. The continuous variables in your model are missing upper bounds, or both lower and upper bounds for |
I'm working on solving a MINLP problem but I'm getting this message: MathOptInterface.UpperBoundAlreadySet{MathOptInterface.Interval{Float64}, MathOptInterface.LessThan{Float64}}: Cannot add
VariableIndex
-in-MathOptInterface.LessThan{Float64}
constraint for variable MOI.VariableIndex(6001) as aVariableIndex
-in-MathOptInterface.Interval{Float64}
constraint was already set for this variable and both constraints set an upper bound.It appears any time I add binary variables. Does EAGO support binary variables in JuMP?
The text was updated successfully, but these errors were encountered: