Here is a toy example of my question.
sdpvar x;
obj = -x;
constr0 = [ x <= 1];
optimize(constr0, obj)
value(x)
% some additional changes required, and I prefer to modify existing constraint constr0
% I want to solve minimize -x, subject to x+s <= 1, s>= 0
% Is the code below correct?
a = sdpvar(constr0);
sdpvar s;
constr1 = [a-s >= 0, s>=0] ;
optimize(constr1, obj)
value(x), value(a), value(s)
A more general version: currently I have the constraint F = [f(x) <= 0];
let a = sdpvar(F), what I need is the constraint like F1 = [ f(x)+g(y) <=0 ], where y are new variables. What is the right way to formulate it using a and F ?
Thanks!