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
juniper_opt =optimizer_with_attributes(Juniper.Optimizer, "nl_solver"=> Ipopt.Optimizer, "mip_solver"=> Gurobi.Optimizer)
model =Model(juniper_opt)
@variable(model, a)
@NLconstraint(model, a *abs(a) >=3)
@objective(model, Min, a)
optimize!(model)
Now when Juniper creates a MILP to do the feasibility pump it's my understanding it uses everything but the non-linear constraints. In my instance I have a linear relaxation of the non-linear constraints. So I've made it so that Juniper can accept an mip model for the feasibility pump.
mip =Model(juniper_opt)
@variable(mip, a)
@constraint(mip, a * a >=3)
@objective(mip, Min, a)
set_optimizer_attribute(model, "mip_model", mip)
optimize!(model)
Essentially all that changes is in the fpump code I pass the mip model, perhaps there's more that could be done. For my use case this is helpful as my linear relaxation won't remove any valid solutions and it can quickly show a lot to be infeasible.
Is this code of interest? If so, I can open a PR.
The text was updated successfully, but these errors were encountered:
Yes that would be a nice addition. It currently removes all non linear constraints and changes the objective such that it minimizes the difference to the NLP relaxation.
Looking forward to your PR 😊
After reviewing my current implementation I think I need to better understand MOI before I can do a good job of this. For now I'll have to put this on pause, but it is still on my lists of things to do.
I have a non-linear program
Now when Juniper creates a MILP to do the feasibility pump it's my understanding it uses everything but the non-linear constraints. In my instance I have a linear relaxation of the non-linear constraints. So I've made it so that Juniper can accept an
mip
model for the feasibility pump.Essentially all that changes is in the fpump code I pass the mip model, perhaps there's more that could be done. For my use case this is helpful as my linear relaxation won't remove any valid solutions and it can quickly show a lot to be infeasible.
Is this code of interest? If so, I can open a PR.
The text was updated successfully, but these errors were encountered: