yalmip / YALMIP

MATLAB toolbox for optimization modeling
https://yalmip.github.io/
Other
463 stars 134 forks source link

mpMILP with parametric cost fails #1350

Closed johanlofberg closed 7 months ago

johanlofberg commented 7 months ago

sdpvar p1 p2 y binvar x1 x2 Model = [-5 <= [p1,p2] <= 5, x1+x2 == 1]; Objective = 0.98x1p1+0.99x2p2+abs(y-p1); [sol,diagn,Z,valuefcn,op] = solvemp(Model,Objective,[],[p1 p2],[x1 x2 y]) assign([p1 p2],[.5 1]) value(op) value(valuefcn)