Dear everyone,
After running the gams, I met the “error: division by zero (0)†in the row "“txid0(r,rr,s)= it0(r,rr,s) / (idtl0(r,rr,s)-it0(r,rr,s));†which defines one type tax.
Set defination is as follows.
set
R REGIONS /
NE, BT, NC , EC , SC , CE , NW, SW /,
S sectors /
Agri Agriculture,
Mine Mining and Processing,
Food Manufacture of Foods and Tobacoco,
TeCl Textile and Clothing,
Wood Processing of Timbers woods and Manufacture of Furniture,
Pape Paper making, printing and Manufacture of Articles for education,
Chem Chemical Industry,
NMet Manufacture of Nonmetallic Mineral Products,
Meta Metals Smelting and Products,
Mach Machinery industry,
TrEq Manufacture of Transport Equipment,
ElEq Manufacture of Electrical Machinery and Equipment,
OMan Other Manufacture,
EHGW Production and Supply of Electric Power, Heat Power, Gas and Water,
Cons Construction,
TdTp Trade and Transportation,
OSer Other Services/,
alias (s,g), (r, rr);
Then I use “put” to show the r, rr,and s of zero value, like follow:
parameter Test1(r,rr,s);
Test1(r,rr,s) = idtl0(r,rr,s)-it0(r,rr,s);
display Test1;
file Test /Test.txt/;
put Test;
loop((r,rr,s),
if(Test1(r,rr,s)=0,
put r.tl, " “, rr.tl,” ", s.tl, " ";
put /;
);
);
The results Text.txt shows like :
NE NE printing
NE NE Heat
NE NE Gas
NE BT printing
NE BT Heat
NE BT Gas
NE NC printing
NE NC Heat
NE NC Gas
NE EC printing
NE EC Heat
NE EC Gas
NE SC printing
…… …… ……
All the zero values happen to the three sectors “Printing, Heat, Gas” in the third column, But the question is I didnot define the three sectors in “set s”.
How does it happen, and how to deal with this problem?
Any of your help will be appreciated very much.
Waiting for someone’s help.
Best regards.
Fan
–
To view this discussion on the web visit https://groups.google.com/d/msg/gamsworld/-/K4lUHjavdv8J.
To post to this group, send email to gamsworld@googlegroups.com.
To unsubscribe from this group, send email to gamsworld+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/gamsworld?hl=en.