Hello GAMSworld,
I have the following problem: I have a sort of low triangular matrix (A) which has these values. I want to create new one (D) where if A has a non-zero element the corresponding value would be the value of the row-the value of the column.
For example, for DMU 8 the values of A matrix are: A(DMU9, DMU5)=0.543 and A(DMU9, DMU8)= 0.457, thus the corresponding D would be D(DMU9, DMU5)=9-5=4 and D(DMU9, DMU8)=1.
A
DMU1 DMU3 DMU5 DMU6 DMU7 DMU8
DMU3 1.000
DMU4 1.000
DMU5 1.000
DMU6 1.000
DMU7 1.000
DMU8 1.000
DMU9 0.543 0.457
DMU10 1.000
I have done the following
SETS t DMUs /DMU1DMU10/
kk(t) /DMU3DMU10/;
Parameter Alpha(kk,t), Delta(kk,t);
*Alpha matrix has already these values as presented above;.
set DD(kk,t);
DD(kk,t)$(Alpha(kk,t) NE 0)=YES;
Delta(kk,t)$DD(kk,t)=ORD(t)$DD(kk,t) - ORD(kk)$DD(kk,t);
But get wrong results. Could you please help me?
Best regards,
Kostas
–
To unsubscribe from this group and stop receiving emails from it, send an email to gamsworld+unsubscribe@googlegroups.com.
To post to this group, send email to gamsworld@googlegroups.com.
Visit this group at http://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.