Hi;
I have below code. But there is overlapping row name error. Could you please help me about this problem? My excel file is attached.
Thanks,
$onecho > taxin.txt
dset=K rng=a2:a82 rdim=1
dset=M rng=b2 cdim=1
dset=J rng=b167 cdim=1
dset=N rng=b84 cdim=1
par=Y0 rng=A1 rdim=1 cdim=1
par=X0 rng=A84 rdim=1 cdim=1
par=B0 rng=A167 rdim=1 cdim=1
$offecho
$call gdxxrw.exe deneme.xls @taskin.txt
$gdxin deneme.gdx
sets
K() countries
M() electricity
J() bads
N() fossilfuel
$load K M J N
display K,M,J,N;
ALIAS(K,ITER);
Table Y(K,M)
$call =xls2gms r=a1:b82 i=deneme.xls o=pard.inc
$include pard.inc
;
Table X(K,N)
$call =xls2gms r=a84:b165 i=deneme.xls o=pard.inc
$include pard.inc
;
Table B(K,J)
$call =xls2gms r=a167:b248 i=deneme.xls o=pard.inc
$include pard.inc
;
PARAMETERS
Y0(M) output
B0(J) bads
X0(N) input
GY(M) directional vector
GX(N) directional vector
GB(J) directional vector
NUMBER the number of countries
ONE the number one
A the observation;
ONE=1;
NUMBER=SUM(K,ONE);
GY(M)=SUM(K,Y(K,M))/NUMBER;
GB(J)=SUM(K,B(K,J))/NUMBER;
GX(N)=SUM(K,X(K,N))/NUMBER;
$load Y0 B0 X0
$gdxin
VARIABLES
BETA value of distance function
Z(K) intensity variables;
POSITIVE VARIABLES Z BETA ;
EQUATIONS
DISTANCE directional distance function
OUTPUT(M) output constraints for directional distance function
BADS(J)
INPUT(N) input constraints for directional distance function
INPUT1(N) input constraint assuming gx=0
OUTPUT1(M) output constraint assuming gy=0
BADS1(J) bad output constraint assuming gb=0
VRS variable returns to scale;
DISTANCE… BETA=E=BETA;
OUTPUT(M)… Y0(M)+BETA*GY(M) =L= SUM(K,Z(K)Y(K,M));
BADS(J)… B0(J)-BETAGB(J) =E= SUM(K,Z(K)B(K,J));
INPUT(N)… X0(N)-BETAGX(N) =G= SUM(K,Z(K)*X(K,N));
INPUT1(N)… X0(N) =G= SUM(K,Z(K)*X(K,N));
OUTPUT1(M)… Y0(M) =L= SUM(K,Z(K)*Y(K,M));
BADS1(J)… B0(J) =E= SUM(K,Z(K)*B(K,J));
VRS… SUM(K,Z(K)) =E=1;
–
deneme.xls (44.5 KB)