This shows you the differences between two versions of the page.

Link to this comparison view

msd.gms_outdated [2017/08/23 08:40] (current)
jfoure created
Line 1: Line 1:
 +====== MSD.gms (Outdated) ======
 +''​MSD.gms''​ defines model'​s equations, and declares and initialise the variables. MSD stands for Model Static and Dynamic.
 +For standard simulations (those that did not require any modelling changes), this file must not be changed.
 +We describe here some parts of the file that seem to may some explanations.
 +===== First solve =====
 +At the end of the file, a first solve of the model is performed. It should be very fast, because, if the calibration was good, the system is already balanced, and no adjusment is needed. Infeasibility at the start must be below 1E-10. You must increase the limit if the scaling parameter is above 1E-4. If not, calibration and model definition must be checked.
 +===== Walras'​ law - LEON variable =====
 +Walras'​ law implies that if demand equals supply in all expect one market, then demand must equal supply in that market. Consequently,​ one market clearing equation in the model is useless, we can drop it. Instead, we keep it and add the LEON variable (for Leon Walras). This variable must always be almost zero. If not, Walras'​ law would be violated. We add LEON to the market clearing equation of skilled labour market (EQ_PH), for the first region in the set (Ref(r)).
 + <​code>​
 + ​Ref(r) ​         = yes$(ord(r)=1);​
 + ! =====================
 + ! =====================
 + ** 3.1 - Market clearing for full allocation
 + ​EQ_PLt ​           Equilibrium wage for unskilled labour market (Ltype)
 + ​EQ_PH  ​         Equilibrium wage for skilled labour market
 + ​EQ_PTEbar ​        ​Equilibrium price for land market ​
 + ​EQ_PKbar ​         Equilibrium price for capital market
 + ;
 + ​EQ_PLt(Ltype,​r,​t,​sim)$LtO(Ltype,​r)..
 +         ​Lt(Ltype,​r,​t,​sim) =e=  sum(j$Labor(j,​Ltype),​L(j,​r,​t,​sim));​
 + ​EQ_PH(r,​t,​sim)..
 +         ​Hbar(r,​t,​sim) ​    ​=e= ​ sum(j,​H(j,​r,​t,​sim)) + LEON(t,​sim)$Ref(r);​
 + ​EQ_PKbar(r,​t,​sim)$(dyn=0)..
 +         ​Kbar(r,​t,​sim) ​    ​=e= ​ sum(j,​KTOT(j,​r,​t,​sim));​
 + ​EQ_PTEbar(r,​t,​sim)$(CET=0)..
 +         ​TEbar(r,​t,​sim) ​   =e=  sum(j$TEO(j,​r),​TE(j,​r,​t,​sim));​
 +===== Test of homogeneity of degree 0 =====
 +At the end of the file, after the solve checking for the good calibration,​ you can find a test of homogeneity of degree 0. Every time you make a change in the modeling, please check that the model is still homogeneous of degree 0. If it is not, your results will depend on the choice of numeraire and the model is no more reliable.
 +The test consists in changing the value of the numeraire with an increase of 10%. All prices must rise of 10%, but quantities must not move. Check in the gdx files if the variables are still equal to their initial values. If it is not, you must find, in the changes where the homogeneity was lost.
 + * Test of homogeneity of degree 0
 + ​P.fx(Ref,"​2001","​ref"​) = PO(Ref)*1.1;​
 + solve maquette using cns;
 + * Check in the results if the variables are still equal to their initial values