Hello,
I have a computed parameter which is a function of other parameters as well as some variables.
So I first declare it:
param beta{battery, panel, 1..T};
And then after, I write its expression as a constraint:
subject to beta_limits {b in battery, pv in panel, t in 1..T}:
beta[b,pv,t] = (if (N_PV[pv,b] * G[pv,t] )- L[t] < max (-(N_B[pv,b] * betamin[b]) , (N_B[pv,b] * Cmin[b] - SE[b,pv,t]) * n_dis[b]) then 0
else
(if (N_PV[pv,b] * G[pv,t] )- L[t] > min ( betamax[b] * N_B[pv,b] , (N_B[pv,b] * Cmax[b] - SE[b,pv,t]) / n_char[b]) then min ( betamax[b] * N_B[pv,b] , (N_B[pv,b] * Cmax[b] - SE[b,pv,t]) / n_char[b])
else (N_PV[pv,b] * G[pv,t] )- L[t]
)
);
I note that all the elements here are parameters except:
N_PV[pv,b], N_B[pv,b] which are variables, and
SE[b,pv,t] which is a computed parameter having variables in its expression.
(to not complicate things more, I attached the two files .mod and .dat of my problem to have clearer idea)
When trying to solve the model, I get the error:
Error executing "objective" command:
error processing objective total_cost['pv1','b1']:
no value for beta['b1','pv1',1]
Can anyone help me with that please?
Thank you in advance.