How to define polynomial equation constraints in Yalmip Gurobi #1312
Unanswered
LindsayHNU
asked this question in
Optimization modelling
Replies: 1 comment 2 replies
-
That code makes no sense as it appears you want your manipulations of the exported model to magically make their way back to the YALMIP model. Once you export, you've left the YALMIP world. YALMIP does not support the built-in pwa-modelling of gurobi, but instead has a more general layer of pwa modelling https://yalmip.github.io/command/interp1/ where you for a MILP solver would use the flags sos2 or graph or milp depending on context and wanted model. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Dear yalmip developers.
Thank you for developing yalmip, it is really excellent in handling optimization problems. I would like to add a polynomial equation constraint to Yalmip Gurobi. The refman manual of Gurobi has the following instructions on page 666.
I am writing a program to output the Gurobi model through Yalmip and then add the following constraint, but this constraint does not work when solving.
[model,recoverymodel,diagnostic,internalmodel] = export(Cons, Cost_total, sdpsettings('solver','gurobi'));
model.genconpoly.xvar=X;
model.genconpoly.yvar=Y;
model.genconpoly.p=[-0.00003041,0.01901,0.2593,0];
model.genconpoly.funcpieces=10;
options=sdpsettings('solver','gurobi');
sol= optimize(Cons,Cost_total,options);
I would like to know how to solve this problem and I look forward to hearing from you~
Beta Was this translation helpful? Give feedback.
All reactions