Lower Boundaries Error: MCP/PATH SOLVER
Posted: Mon Apr 04, 2016 5:04 pm
Dear All,
I have been recently trying to disallow negative values of variables (say intermediate inputs used in activity, X(energyc,NE)) after the shock. This is because these negative values do not give any economic sense. To do so, I tried to implement Non Negative Variables for X(energyc,NE) or allowing lower boundaries (X.LO(energyc,NE)).
The detailed codes are as follows:
SET
A All Activities
/ element of all industries /
NE(A) Non-Energy Producing (NE-th industry)
/ sub-set of A for non-energy industries /
C All commodities
/ element of all commodities /
energyc(C) Energy commodity
/ sub-set of C for energy commodities /
Variables
X(C,A)
... and so on
Parameters
X0(C,A)
... and so on
EQUATIONS
eq18(energyc,NE)
eq18(energyc,NE) $(X0(energyc, NE)>0)..
(1+TAXFUEL(energyc, NE)) * P_Z(energyc) * (X(energyc, NE)**(1+teta(NE)))
- (kappa(energyc, NE) ** (1+teta(NE) ) ) * P_ENCOM(NE) * ENCOM(NE) /
( sum(energyca $(X0(energyca, NE)>0 and kappa(energyca, NE)>0),
(kappa(energyca, NE) ** (1+teta(NE) ) ) * (X(energyca, NE) **
(-teta(NE) ) ) ) ) =e= 0;
X.L(C,A)$(X0(C,A)>0) = X0(C,A) / SCAL_I ;
X.FX(C,A)$(X0(C,A)=0) = X0(C,A) / SCAL_I ;
X.LO(energyc, NE)$(X0(energyc, NE)>0) = 0;
When I run (execute) the code, it did not generate solution. Instead, I read an error message:
**** Unmatched variable not free or fixed
X(COAL_C,CHEMICAL_A)
**** Unmatched variable not free or fixed
X(COAL_C,FODT_A)
**** Unmatched variable not free or fixed
X(COAL_C,HTEL_A)
**** Unmatched variable not free or fixed
X(COAL_C,METAL_A)
... and so on
**** Counts do not match
Single equations in unmatched =E= blocks 2447
Unmatched single free variables 2342
I tried to learn how to solve this issue by reading the PATH manual book. I found that I need to use complementarity to get pairing of variables and equations. This is done by using, i.e. z.lo(i) = 0; or alternatively positive variable z;
And to write F(z) =g= 0.
I implemented this PATH manual precisely to the above code I had, where I changed the equality (=e=) to =g= in equation 18 and allowing X.LO(energyc, NE)$(X0(energyc, NE)>0) = 0. But, it gives the unmatched variable as shown above.
Could anyone help me on this matter? Your helps are really appreciated.
Cheers,
Herbert
--
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 https://groups.google.com/group/gamsworld.
For more options, visit https://groups.google.com/d/optout.