Originally posted by: NiuX-HNU
Hello everyone:
I'm using cplex to do some research on MIP problem, but when I try to execute this script I have the error "cplex error 5002: Q in objective is not positive semi-definite."
The model:
int T=...;
int nw=...;
int ns=...;
int np=...;
range time=1..T;
range wind=1..nw;
range solar=1..ns;
range price=1..np;
float gbmax=...;
dvar float+ gc[wind,solar,price,time];
dvar float+ gch[wind,solar,price,time];
dvar float+ gb[wind,solar,price,time];
dvar boolean u[wind,solar,price,time];
dvar boolean v[wind,solar,price,time];
int Cbat=...;
int At=...;
float effic=...;
float effid=...;
float climt=...;
float dlimt=...;
sum(w in wind,s in solar,p in price,t in time)
pip[p]*(gb[w,s,p,t]/gbmax)*(gch[w,s,p,t]+gd[w,s,p,t])*Cbat/At;
subject to{
ct1
forall(w in wind,s in solar,p in price,t in 2..T)
gb[w,s,p,t]==gb[w,s,p,t-1]+effic*gch[w,s,p,t]-gd[w,s,p,t]/effid;
ct2:
forall(w in wind,s in solar,p in price,t in time)
gch[w,s,p,t]<=climt*u[w,s,p,t];
forall(w in wind,s in solar,p in price,t in time)
gd[w,s,p,t]<=dlimt*v[w,s,p,t];
ct3:
forall(w in wind,s in solar,p in price,t in time)
u[w,s,p,t]+v[w,s,p,t]<=1;
......
}
I guess (gb[w,s,p,t]/gbmax)*(gch[w,s,p,t]+gd[w,s,p,t])*Cbat/At' in the objective function may be the reason, because gb[w,s,p,t], gch[w,s,p,t] and gd[w,s,p,t] are all decision variables, that makes the objective function quadratic.
So I'm wondering how to solve this problem? Are there any methods to linearize this formulation? Thanks very much!
#CPLEXOptimizers#DecisionOptimization