CPLEX is not showing any solution after I have integrated the equations of pevch[i][j] and pevdis[i][j]
int t=24; int n=10; int j=0; range number =1..n; range tavail=1..t; float soc[number][tavail]=...; //forcasted load at 0..4 float pl[tavail]=[10000000,7000000,9000000,6000000,12000000,6000000,4000000,15000000,9000000,12000000,6000000,8000000,10000000,7000000,9000000,6000000,12000000,6000000,4000000,15000000,9000000,12000000,6000000,8000000]; //soc of ev at 0..11 //generation float pg[tavail]=[10000000,9500000,8500000,11000000,600000,7500000,10000000,9500000,8500000,11000000,600000,7500000,10000000,9500000,8500000,11000000,600000,7500000,10000000,9500000,8500000,11000000,600000,7500000]; //target load at 0..11 float pt[tavail]=[10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000,10000000]; //bus voltage at 0..11 float v[tavail]=[240,232,229,233,230,235,228,234,227,229,231,230,226,232,233,230,236,233,231,232,232,233,233,230]; //bus voltage at target bus voltage at 0..11 float vt[tavail]=[230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230,230]; //decision variable charging power ev dvar float pevch[tavail][number] in 0..100000; //decision variable discharging power of ev dvar float pevdis[tavail][number] in 0..100000; //objective function minimize sum(i in tavail)((pt[i]-pl[i])+sum(j in number)-pevch[i][j]+sum(j in number)pevdis[i][j]); subject to
forall(i in tavail,j in number) if(pt[i]-pl[i]<0 && soc[j][i]>0.7&& v[i]<vt[i]) pevch[i][j]==(0.9-soc[j][i])*100000/(24-i); else pevdis[i][j]==0;
forall(i in tavail,j in number) if(pt[i]-pl[i]>0 && soc[j][i]<=0.7 && v[i]>vt[i]) pevch[i][j]==(0.7-soc[j][i])*100000/(24-i); else pevch[i][j]==0; }
if you name your constraints cplex will provide relaxations that should help you debug your model.
You can change
into