Adding NaN to an SDPVAR makes no sense.

34 views
Skip to first unread message

ran tao

unread,
May 5, 2020, 4:12:30 AM5/5/20
to YALMIP
Dear professor

i want solve a MIP problem
but the yalmip tells me the error:

i think this code make the mistakes:Adding NaN to an SDPVAR makes no sense.

i want to modify the value of Pload1(t) using sdpvar.

Pload1(t)=BusP1(j,t) - x_P_rdc_C(1,t);

Pload1(t) and BusP1(j,t) are constant number, x_P_rdc_C(1,t) is a 'sdpvar'

How can i rewirte it ?

thanks a lot!

Johan Löfberg

unread,
May 5, 2020, 4:18:11 AM5/5/20
to YALMIP
You probably put an sdpvar in a double 

Bad
sdpvar y
x = 0;
x(1) = y;

Good
sdpvar y
x = [];
x = [x y]
Reply all
Reply to author
Forward
0 new messages