Hi everyone!
I have a problem in a summation where I need to include a $conditional
expresion:
==========
Sets
i units / 0000139357 /
k classes / 0186 /
is(i) Selected unit
ks(k) Selected class
m inputs & outputs / I01I86, IC, IL, 0186 /
x(m) reallocable inputs / I01I86, IC, IL /
y(m) outputs / 0186 /
r(y) class specific output
;
Table dataki(k,i,m)
$ondelim
$include mioan.csv
$offdelim
;
Parameter dataik(i,k,m); option dataikks
(in the sum over y). I have not even been able to sum where y=ks (I
could reformulate the equation if it is the only solution). I have
tried to use an $condition and a dynamic set (r) but I can not assign
r(y)=ks(k) in the loop. I have tried also:
yks
sum(y$(y ne ks), pk4(y)*sum(i, dataik(i,ks,y)))
sum(y$(y ne ks(k)), pk4(y)*sum(i, dataik(i,ks,y)))
y=ks
sum(y$ord(y), pk4(y)*sum(i, dataik(i,ks,y)))
sum(y$(y=ks), pk4(y)*sum(i, dataik(i,ks,y)))
sum(y$r(y), pk4(y)*sum(i, dataik(i,ks,y))) r(y)=ks in
the loop
…
Every thingh reports different errors.
Any clue?
Thank you in advance.
Best,
Antonio
\