Originally posted by: NiuX-HNU
Hi Alex
I didn't use HP previously. And it was only used after the subject to block. So I still get the error message that I told you before.
Yesterday, I tried to set a new decision variable HP3[time] which subject to
forall(t in time)
HP3[t]==sum(w in wind,s in solar,p in price,b in battery)piw[w]*pis[s]*pip[p]*(pt[p,t]*(G[t]+gdown[w,s,p,t]*prdown-gup[w,s,p,t]*prup)-Cc[w,s,p,t]-y[w,s,p,t]*Sc-abs(Db[w,s,p,b,t]));
So the hourly profit is obtained by HP3[t]. However, the solutions changed because I added the above constraint to my project. It seems that this way is not helpful.
So, as you told me before, is that you mean write the code like this?
...
...
maximize
sum(w in wind,s in solar,p in price,b in battery,te in temperature,t in time)
piw[w]*pis[s]*pip[p]*pit[te]*(pt[p,t]*(G[t]+gdown[w,s,p,te,t]*prdown-gup[w,s,p,te,t]*prup)-Cc[w,s,p,te,t]-y[w,s,p,te,t]*Sc-DOD[w,s,p,te,t]-AT[w,s,p,te,t]);
subject to{
...
...
}
float HP[t in time ]=sum(w in wind,s in solar,p in price,b in battery)
piw[w]*pis[s]*pip[p]*(pt[p,t]*(G[t]+gdown[w,s,p,t]*prdown-gup[w,s,p,t]*prup)-
Cc[w,s,p,t]-y[w,s,p,t]*Sc-abs(Db[w,s,p,b,t]));
I'm waiting for you reply, regards.
#DecisionOptimization#OPLusingCPLEXOptimizer