
==========================================================================
             NOTE: This document should print nicely from any 
                Wordprocessor with the font COURIER 10 pt
                      or from the DOS-editor EDIT
==========================================================================


                            HANDS-ON DOCUMENT 
                 Export quotas in a 3x3 Version of GTAP
                     by C.F. Bach and K.R. Pearson



This hands-on document describes simulations with a version of the 
standard GTAP model which has had bilateral export quotas added. 
The simulations are carried out using GEMPACK. Prior knowledge of
the GEMPACK software is necessary to follow the instructions.

The document builds upon the GTAP Technical Paper No. 4 by C.F. Bach 
and K.R. Pearson (1996): Implementing Quotas in GTAP using GEMPACK - 
or How to Linearize and Inequality. 
This document is referred to here as Tech.Paper No. 4 (or simply
as "the paper").

The first examples (A1 to A7 in sections 1 to 5)  here are ones in which the 
only shocks to the model are to change the level of various quotas. 
The final examples (P1 and P2 in section 6 below) are more realistic in
that there the export quotas are not shocked - rather the example looks at
the effect of the existing quotas on a projection simulation (a stylized
version of that described in section 2 of the Tech.Paper No. 4) aimed at
taking the economy from 1992 to 2005.

Before extracting the files for the simulations, you should change
directory into the directory (perhaps C:\QUOTAS) where you have put 
the file QUOTA-EX.ZIP which contains all the files needed
for these examples (see Appendix 1 of the paper). You will also
need the file PKUNZIP.EXE (in this directory or in another
directory on your DOS path).

Then, to extract the files from QUOTA-EX.ZIP, issue the command:

---> pkunzip quota-ex.zip

The most important files are:
GTAP33XQ.TAB  - TABLO Input file with the model code. It is the standard
                TABLO input file GTAP94.TAB with the maximum set size 
                reduced so that at most 3 tradeable commodities and 3 
                regions are allowed AND a quota section added at the end.
                The original EXPRICES equation is modified as indicated in 
                section 3. The export quota part of this file is shown in 
                full in Appendix 2 of Tech.Paper No. 4.
DAT201XQ.HAR  - This is a standard datafile DAT2-01.HAR but with an additi-
                onal header VXQD added. This header contains the VXQD
                data (see section 3.4 of the paper) which has been 
                set equal to the usual VXWD data. By setting VXQD=VXWD 
                we are assuming that none of the export quotas are 
                binding in the initial data.
XQ2-01.DAT    - This file contains the other supplementary data namely 
                the QXS_RATIO_L(i,r,s) values. The file is the actual file
                corresponding to the logical file called GTAPQUOTA in 
                GTAP33XQ.TAB.  Since no quotas are binding, all QXS_RATIO_L 
                values on this file are less than 1.  We have set these 
                ratios:
                - equal to 0.98 for exports of manufactures "mnfcs" from the 
                  Rest of the World "ROW" to both the United States "USA" 
                  and the European Union "EU". This value means that these 
                  two quotas are nearly binding.
                - equal to 0.2 in all other cases, which means that these 
                  other quotas are far from binding.
XQCHK.TAB     - This file checks that the ratios QXS_RATIO_L and TQXS_L
                are not larger than 1.0, and that, for each (i,r,s), at
                least one of these equals 1.0. 
                It reads the post-simulation values of QXS_RATIO_L, VXQD 
                and VXWD and computes the post-simulation TQXS_L values and 
                MAX_RATIOS(i,r,s) = MAX[QXS_RATIO_L(i,r,s),TQXS_L(i,r,s)] 
                for all (i,r,s).
XQ-BIND.TAB   - This file produces shocks for the variables tqxs and
                qxs_quota in export quota simulations. The shocks are
                written to the two files with logical names
                QXS_RAT_SH (this contains qxs_quota shocks) and 
                TQXS_SH (this contains tqxs shocks).

These files, together with one Stored-input file and a number of
command files, are used in the examples described in the rest of this
document.

Getting started:
   The first step is to implement the model by running TABLO: this can be 
   done easily by using a Stored-input file.
   [This first step is done differently if you are using the
     Demonstration Version of GEMPACK - see below.]
---> Run TABLO with the Stored-input file TP33XQ.STI
   The STI file is designed for those having a source-code version
   of GEMPACK. The output will be the TABLO-generated program 
   TP33XQ.FOR (and associated Auxiliary files TP33XQ.AXS and .AXT)
   If you have only an executable-image version of GEMPACK, you will 
   first need to edit TP33XQ.STI so that it produces GEMSIM Auxiliary 
   files. You do this by changing the response "wfp" near the end
   of the file to "pgs". In this case TABLO will produce the GEMSIM 
   Auxiliary files TP33XQ.GSS and .GST.
   If you produced the TABLO-generated program, now compile and link
   it via the command
---> LTG TP33XQ

   If you are using the Demonstration Version of GEMPACK, you
   cannot run TABLO to process the model GTAP33XQ since it has
   too many variables for the Demonstration Version's TABLO. Instead
   we have prepared an executable image of the TABLO-generated 
   program TP33XQ.EXE and its associated Auxiliary files
   TP33XQ.AXS and TP33XQ.AXT. These are in the file XQ-TG.ZIP.
   You can extract these from XQ-TG.ZIP via the command
---> PKUNZIP XQ-TG

   Before running the simulations it is a good idea to implement 
   the other TABLO Input files associated with these examples, 
   XQCHK.TAB and XQ-BIND.TAB. To implement this:
---> Run TABLO and respond XQCHK when asked for TABLO input file.
   Once again you must chose wfp for TABLO-generated program (if you 
   have a source-code version) or pgs to generate GEMSIM Auxiliary 
   files. [Readers with the Demonstration Version of GEMPACK
   should follow the GEMSIM route.]
   If you chose a TABLO-generated program: 
---> LTG XQCHK
   Similarly for XQ-BIND.TAB:
---> Run TABLO and write XQ-BIND when asked for TABLO input file.
---> LTG XQ-BIND if you have a source-code version

   Now you are ready to run simulations. In the text below give 
   alternative instructions for the different versions of GEMPACK, 
   namely source-code, executable image (exe-image) and 
   Demonstration version.

   We also assume that you use the DOS text editor EDIT to view the 
   contents of text files (but you can use another editor if you 
   prefer). If you use EDIT, when we write
---> Edit XQ-A1.CMF
   you should type in the command "edit xq-a1.cmf". If you use 
   another editor you will know the command to type.

--------------------------------------------------------------------------
1.  Examples A1 and A2 - Decreasing Quota by 10 percent.
--------------------------------------------------------------------------

   The export quota on mnfcs from ROW to USA is nearly binding in the 
   initial data (the associated QXS_RATIO_L value is 0.98). The first 
   simulation is to decrease the export quota on mnfcs from ROW to USA 
   by 10 per cent. This should surely make the quota binding.

Example A1. The approximate version.
==========================================================================
   The first simulation uses the Command file XQ-A1.CMF. Look at this 
   file with the command:
---> Edit XQ-A1.CMF
   As it appears, the file takes the standard export-quota closure for 
   GTAP (as described in section 3.5 in Tech.Paper No. 4) and shocks 
   qxs_quota("mnfcs","ROW","USA") by -10 per cent. Also shocked by one is 
   the technical variable del_Newton whose job is to make the linearized 
   version of equation (L4) in section 2 above behave well in a multi-step 
   Euler calculation. This simulation uses Euler's method and carries out a 
   single 10-step calculation. (Extrapolation is not used.)
   To run the simulation:
---> Run TP33XQ with the Command file XQ-A1.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A1.CMF [exe-image version]
   The main purpose of this simulation A1 is to find which quotas change 
   their binding/non-binding status. To determine this look in the updated
   GTAPQUOTA data after the simulation:
---> Edit XQ-A1.UPD
   This file shows a value of 1.0 for QXS_RATIO_L("mnfcs","ROW","USA") as 
   expected (and all other values remain less than one although that for 
   mnfcs from ROW to EU has increased from 0.98 to over 0.99). Thus the 
   only quota which has changed its binding/non-binding status is that for 
   mnfcs from ROW to USA.

Example A2. The accurate version.
==========================================================================
   Example A1 told us which quotas changed status. In this simulation, 
   we feed in this information to get an accurate solution. Take a look
   at the command file:
---> Edit XQ-A2.CMF
   Since we know from Example A1 that the export quota on mnfcs from 
   ROW to USA is to become binding, we make qxs_ratio("mnfcs","ROW","USA") 
   exogenous and the corresponding slack variable xq_slack("mnfcs","ROW","USA") 
   endogenous with a swap statement in the Command file.
   We give the same shock to qxs_quota for mnfcs from ROW to USA as in 
   XQ-A1.CMF. 
   In addition we give the shock to qxs_ratio("mnfcs","ROW","USA") which 
   will take it from its pre-simulation value of 0.98 to exactly 1.0 (that 
   is, make it binding) - this shock is (0.02/0.98)*100=2.04082 per cent. 
   We also remove the shock to del_Newton since it is no longer needed. 
   [The equation Exp_Quo_Ratios has done its job in the first approximate 
   simulation XQ-A1.] For this simulation we can use Gragg's method 
   (4,6,8-steps and extrapolation) instead of Euler's since the non-smooth
   Exp_Quo_Ratios equation is playing no role here, and we can extrapolate 
   to get accurate solutions. To run the simulation:
---> Run TP33XQ with the Command file XQ-A2.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A2.CMF [exe-image version]
   After having carried out this simulation, look at the extrapolation
   accuracy file:
---> Edit XQ-A2.XAC 
   You will see that all results are converging very accurately except 
   for the slack variable xq_slack("mnfcs","ROW","USA") which is of 
   no interest.
   Because the equation Exp_Quo_Ratios has been turned off for the flow
   ("mnfcs","ROW","USA") there is no guarantee that this equation will hold 
   in this case, though it should do so provided our initial simulation A1 
   has correctly identified which binding/non-binding changes there are.  
   Before we can declare this second version to be correct, it is 
   therefore essential to check the post-simulation values of the two 
   ratios QXS_RATIO_L and TQXS_L. None of these values should be larger 
   than 1.0, and, for each (i,r,s), at least one of these should equal 1.0.
   [This is just what the levels version of the Exp_Quo_Ratios equation (L4)
   in the Tech.Paper No. 4 says.]
   Checking that the QXS_RATIO_L values do not exceed 1.0 is easy -
   just look at the updated GTAPQUOTA file which is a text file.
---> Edit XQ-A2.UPD
   Checking the TQXS_L values is less easy since these are calculated
   as ratios of the VXQD and VXWD values which are on the Header Array file
   DAT-A2.UPD. Therefore we have provided XQCHK.TAB for calculating these 
   TQXS_L values. This is the file XQCHK.TAB which we implemented earlier.
   You can now run it:
---> Run XQCHK with the command file XQCHK-A2.CMF [source-code version]
---> Run GEMSIM with the command file XQCHK-A2.CMF [exe-image and Demo versions]
   This will produce a LOG file XQCHK-A2.LOG containing the post-simulation 
   TQXS_L values. Look at this to check that none of these exceeds 1.0:
---> Edit XQCHK-A2.LOG
   This LOG file also contains the values of a coefficient MAX_RATIOS which 
   reports the maximum of the QXS_RATIO_L and the TQXS_L values. Look at its 
   values to check that each is 1.0 (or very close to it).
   For future reference note that this LOG file also contains the
   post-simulation QXS_RATIO_L values.
   Finally, and for later comparison with the results of simulation XQ-A4, 
   we want to look at some other results from the simulation. To do this
   we convert the solution file into a text format:
---> Run GEMPIE on XQ-A2.SL4 
   to produce GEMPIE Print file XQ-A2.PI5.
---> Edit XQ-A2.PI5
   Note the results of qxs for mnfcs from ROW to both USA and EU - these 
   are -8.16326 and 1.23038 respectively. [Of course exports from the ROW 
   to USA must go down because the quota has been decreased; exports to EU 
   increase slightly in this GE situation.]

--------------------------------------------------------------------------
2.  Examples A3 and A4 - Restoring the Quota on mnfcs from ROW to USA
--------------------------------------------------------------------------

   In these examples, we analyse a simulation in which the quota on mnfcs 
   from ROW to USA is restored to the value it had before the simulations 
   above. As above, we need to carry out 2 simulations, first the approx-
   imate one (Example A3) to see which quotas change their binding/non-
   binding state. Then an accurate one (Example A4) using this knowledge.

   Above the quota was decreased by 10 per cent. To reverse this we must 
   increase it. The increase is not 10 per cent but a little more. For 
   suppose that the quota was originally 1000 tonnes. Then, after the 10%
   decrease it has dropped to 900 tonnes. 
   To bring it back to the original 1000 tonnes requires an increase of 100
   tonnes which is a percentage increase of (100/900)*100 = 11.1111 per cent.

Example A3. The approximate version.  
==========================================================================
   Since we are reversing the original decrease, we start from the data files
   updated after the accurate simulation XQ-A2 above; this means starting from
   files DAT-A2.UPD and XQ-A2.UPD as seen in the command file of the previous 
   example:
---> Edit XQ-A2.CMF
   We take the standard closure, use Euler's method with 10 steps and give 
   the mentioned shock to qxs_ratio("mnfcs","ROW","USA") and a shock of one 
   (as usual in these approximate simulations) to del_Newton. 
   You can look in the Command file XQ-A3.CMF for this Example A3 to see where
   these shocks and pre-simulation data files are specified. 
---> Edit XQ-A3.CMF
   Now run the simulation:
---> Run TP33XQ with the Command file XQ-A3.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A3.CMF [exe-image version]
   The first thing to look at after this simulation is the updated GTAPQUOTA
   data file:
---> Edit XQ-A3.UPD
   You can see that, as expected, the value of QXS_RATIO_L for mnfcs from ROW 
   to USA has gone from 1.0 (binding) to a value less than one (non-binding). 
   No other quotas have changed their binding/non-binding state (all remain 
   non-binding). This tells us how to proceed in Example A4 to get accurate 
   results for this quota reversal. 

Example A4. The accurate version.  
==========================================================================
   Because the quota for mnfcs from ROW to USA becomes non-binding, we know 
   that the associated TQXS_L value must become EXACTLY equal to 1.0 
   afterwards. To find its pre-simulation value we can look at the Display file
   produced in Example A3 
---> Edit XQ-A3.DIS, search for TQXS_L.
   We see that its value in the DAT-A2.UPD data base (the pre-simulation data 
   for Examples A3 and A4) is 0.963705. Hence, in order for it to be increased
   to 1.0, the shock to it must be 0.036295/0.963705*100=3.766194 per cent. 
   This shock is applied in the command file:
---> Edit XQ-A4.CMF
   The closure is the standard one except that tqxs("mnfcs","ROW","USA") is 
   made exogenous (and shocked by 3.766194 as indicated above) and the 
   corresponding slack variable xq_slack("mnfcs","ROW","USA") is made 
   endogenous. Run the simulation:
---> Run TP33XQ with the Command file XQ-A4.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A4.CMF [exe-image version]
   Again the results of a Gragg 4,6,8-step calculation with extrapolation
   appear to be adequately accurate:
---> Edit XQ-A4.XAC 
   To check the values of QXS_RATIO_L, TQXS_L and MAX_RATIOS you 
   must proceed as in Example A2 above:
---> Run XQCHK with the command file XQCHK-A4.CMF
---> Edit XQCHK-A4.LOG
   Check that no QXS_RATIO_L or TQXS_L value exceeds 1.0 and that,
   for each (i,r,s) MAX_RATIOS(i,r,s) is (almost) exactly 1.0.

   Next we must check that the simulation in Example A4 really does reverse
   the results of Example A2. There are several ways to do this:
   (1) Firstly, compare the post-simulation QXS_RATIO_L values in XQ-A4.UPD 
   with their original values (in XQ2-01.DAT). You will see that they 
   are virtually identical (all 0.2 except those for mnfcs from ROW to 
   USA and EU which are 0.98).
   (2) Secondly, have a look at various simulation results for selected 
   variables. To do this we must convert the solution file:
---> Run GEMPIE on XQ-A4.SL4
---> Edit XQ-A4.PI5, search for "qxs (".
   We noted what happened to qxs for mnfcs from ROW to USA and EU in 
   simulation A2. We can now check the results from A4 and see if they 
   are really the opposite. [For mnfcs from ROW to USA, the A2 result is 
   a decrease of 8.16326% while for A4 the result is an increase of 8.88886%.
   You can see that these reverse each other since an 8.16326% decrease 
   goes from say 1000 initially to 918.3674 from where an 8.88886% increase 
   puts it back to almost identically 1000.] You can repeat this for other 
   variables which are endogenous in both simulations.
   (3) Thirdly we could compare the pre-simulation input-output and trade 
   data in file DAT2-01.HAR with the updated data in DAT-A4.UPD after Example 
   A4. Because these contains lots of arrays of data, a mechanical procedure 
   is ideal for comparing them. The GEMPACK program CMPHAR is designed to 
   compare the data on two Header Array files. If you run it to compare the 
   data on these two files you should find that the data are very close 
   indeed: 
   [Readers using the Executable-Image or Demonstration Version 
    will not be able to do this since the program CMPHAR is not supplied 
    with these versions of GEMPACK.]
---> Run CMPHAR on the files DAT2-01.HAR and DAT-A4.UPD. Call the print
     file CMP-A4.PRN. Chose "Compare all common headers".
---> Edit CMP-A4.PRN, go to end for summary.
     The best measure is probably the so-called "difference ratios".
     You should find that the largest one is less than 0.000001 which
     means that the largest difference between the two files is not
     more than one part in a million.

--------------------------------------------------------------------------
3.  Examples A5 and A6 - Two Quotas Change their Binding/Non-binding Status
--------------------------------------------------------------------------

   In these examples we start from the post-simulation data from Example A2
   above, in which the quota on mnfcs from ROW to USA is binding but that on
   mnfcs from ROW to EU is not. The idea in Examples A5 and A6 is to restore
   the quota on mnfcs from ROW to USA to its original value (as in Examples 
   A3 and A4 above) and, at the same time, reduce the quota on mnfcs from 
   ROW to EU by 10 per cent (which should make it binding).

Example A5. The approximate version.
==========================================================================
   This example shows what binding/non-binding status changes occur, and 
   sheds some light on how accurate the first simulation must be. Its 
   purpose is to find out which quotas change their binding/non-binding 
   status, and it must do this accurately.  First take a look at the
   Command file:
---> Edit XQ-A5.CMF
   We have suggested doing 10,15,20-step Euler calculations and extra-
   polating from them. Although this is not the usual way of proceeding,
   we suggest this because it illustrates the danger of extrapolating
   in these approximate simulations.  Now run the simulation:
---> Run TP33XQ with the Command file XQ-A5.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A5.CMF [exe-image version]
   Now look at the updated GTAPQUOTA file:
---> Edit XQ-A5.UPD
   You see that the post-simulation QXS_RATIO_L values for mnfcs from ROW 
   to USA and EU appear to be about 1.006 and 1.0 respectively. The second
   of these is what we expect (namely that the reduced quota to EU will be
   binding). But the first is unexpected since we expect that the restored 
   quota to USA will be non-binding again. To see what goes wrong look at
   the Extrapolation accuracy file:
---> Edit XQ-A5.XAC, search for qxs_ratio.
   The qxs_ratio("mnfcs","ROW","USA") results (this is component number 8
   of qxs_ratio) in the Extrapolation Accuracy file report 10,15,20 and 
   extrapolated results approximately as shown below:
    8    0.000000       -0.640328       -0.644700        0.605359     MC?  2
   The 15- and 20-step results are both negative suggesting that the levels
   value of QXS_RATIO_L("mnfcs","ROW","USA") has fallen from 1.0 (binding) 
   to below 1.0 (not binding). The 10-step result of zero suggests on the
   contrary that this levels values has stayed binding at 1.0.  
   Most surprising, however, and in complete conflict with these, is the 
   extrapolated result of approximately 0.6 per cent (positive instead of 
   negative) which suggests that this levels quota ratio has increased 
   above 1.0 (to about 1.006), which contradicts the levels equation (see 
   equation L4 in section 2 of the Tech.Paper No. 4) saying that this ratio
   should never exceed 1.0. Clearly these results leave us uncertain as 
   to whether this quota has changed its binding/non-binding status. When 
   the three results are not close together (the 10-step results is an out-
   lier here), the extrapolated result can be misleading. The theory under-
   pinning extrapolation relies on the underlying levels equations being 
   smooth but the Exp_Quo_Ratios equation is not smooth. This is why extra-
   polation should not be used when this equation is doing work (as it does 
   in the approximate simulation we always run to see which quotas change 
   their binding/non-binding status).  
   You can also see that, in this case, 10 steps is not quite enough to get
   reliable results from this preliminary simulation to find out which 
   quotas have changed their binding/non-binding status, but that 15 or 20 
   are (since their qxs_quota results are fairly close to each other). This 
   is the other reason we have discussed this example. If you are not sure
   whether your preliminary simulation had sufficient Euler steps, you can 
   carry out two more with more steps and look at the qxs_ratio and tqxs 
   results in the Extrapolation Accuracy file to see if they all say the 
   same about binding/non-binding quotas (that is, if all three lots of 
   results agree as to which quotas are binding or non-binding after the 
   simulation).
   You should rerun this simulation, altering the number of steps specified 
   in the Command file XQ-A5.CMF so that is just does a single 15-step Euler
   calculation. 
---> Edit XQ-A5.CMF. Replace "steps = 10 15 20 ;" by "steps = 15 ;"
   Now proceed as in Example A1 or A3 to determine which quotas change 
   status. Remember that the only binding quota before the simulation was
   the quota on mnfcs from ROW to USA. Then go on to Example A6.

Example A6. The accurate version.
==========================================================================
   As determined in Example A5 one quota changes from binding to non-
   binding and another changes from non-binding to binding. The closure 
   swap used in A6 reflects this.
---> Edit XQ-A6.CMF
   Because the quota on mnfcs from ROW to USA becomes non-binding,
   tqxs("mnfcs","ROW","USA") is made exogenous (and shocked as in Example 
   A4 above). Because the quota on mnfcs from ROW to EU becomes binding, 
   qxs_quota("mnfcs","ROW","USA") is made exogenous and shocked (much as in
   Example A2 above). The two corresponding components of variable xq_slack 
   are set endogenous.
   As above we could calculate the shocks to qxs_quota("mnfcs","ROW","USA")
   and tqxs("mnfcs","ROW","EU") with a calculator. But this process can be
   automated. This is done in the TABLO Input file XQ-BIND.TAB which we 
   implemented above. 
   So, before running the simulation, first run XQ-BIND:
---> Run XQ-BIND with the command file BIND-A5.CMF [source-code version]
---> Run GEMSIM with the command file BIND-A5.CMF [exe and Demo versions]
   The result is the two files QXSR-A6.SHK (containing qxs_quota shocks) 
   and TQXS-A6.SHK (containing tqxs shocks).
   Now you can run the simulation a second time:
---> Run TP33XQ with the Command file XQ-A6.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A6.CMF [exe-image version]
   Again accurate results are obtained in this case where two quotas 
   change their binding/non-binding status (one in each direction). 
   To check this look in the Extrapolation Accuracy file:
---> Edit XQ-A6.XAC
   You also need to check the post-simulation values of QXS_RATIO_L, 
   TQXS_L and MAX_RATIOS:
---> Run XQCHK with the command file XQCHK-A6.CMF
---> Edit XQCHK-A6.LOG
   More details about automating this second, accurate simulation in 
   general are given in section 8 in the Tech.Paper No. 4.

Example A6 again if you have Release 5.2 of GEMPACK
==========================================================================
   As indicated in section 8.3 of the associated Technical Paper, the
   second (accurate) simulation is more easily automated if you have
   Release 5.2 of GMEPACK. In this case the explicit closure swaps
   required do not have to be put in for each relevant component.
   We have prepared file XQ-A62.CMF to be used with Release 5.2 of
   GEMPACK with these general statements. Have a look at this file:
---> Edit XQ-A62.CMF
   If you have Release 5.2 of GEMPACK then re-run Example A6 by taking 
   inputs from this Command file. 
   You results should be the same as before.


--------------------------------------------------------------------------
4.  Example A7 - The importance of checking
--------------------------------------------------------------------------
   To see the importance of carrying out the check described in section 
   3.6.1 of the Tech.Paper No. 4, you might like to see what happens in 
   Example A2 above if you incorrectly think that the quota on exports of 
   food from ROW to USA becomes binding.

Example A7.
==========================================================================
   To do this, copy XQ-A2.CMF to say XQ-A2X.CMF and edit it to make the 
   changes required to have this second quota binding. 
---> COPY XQ-A2.CMF XQ-A2X.CMF
---> Edit XQ-A2X.CMF
   Don't forget to add the shock required to have QXS_RATIO_L increase to 
   one for food from ROW to USA. Now run the simulation:
---> Run TP33XQ with the Command file XQ-A2X.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-A2X.CMF [exe-image version]
   You will see that it converges very accurately:
---> Edit XQ-A2.XAC
   But you will see from the output of XQCHK that the post-simulation 
   value of TQXS_L("food","ROW","USA") in greater than one. 
---> Run XQCHK with the command file XQCHK-A2.CMF
---> Edit XQCHK-A2.LOG
   This is the only obvious indication that the results are incorrect.

--------------------------------------------------------------------------
5.  Other Examples of Quota Shocks
--------------------------------------------------------------------------

   Which quotas change their binding/non-binding status is not always 
   obvious a priori, of course. This may be the case even in those (arti-
   ficial) examples where just quotas are being changed. For example, 
   consider modifying Examples A1 and A2 so that the quota on mnfcs from 
   ROW to USA is decreased by 20 per cent instead of the 10 per cent there. 
   If you do this you will see that the quota on mnfcs from ROW to EU also 
   becomes binding.

--------------------------------------------------------------------------
6.  GTAP Projection from 1992 to 2005 (Examples P1 and P2)
--------------------------------------------------------------------------

   These examples are projections from 1992 to 2005 (much as in the 
   example described in section 2 above) for the 3-tradeable-commodity, 
   3-region  version of GTAP described above. The simulation shocks tech-
   nical change, population, labor force and physical capital in the 
   various regions to approximate what might happen in the period 1992 to 
   2005. The projections are done in the presence of the export quotas.
   Readers are encouraged to carry out the simulations on their PC.  
   They illustrate how the methodology described here works in more 
   realistic simulations.

Example P1. The approximate version.
==========================================================================
   The closure (which differs slightly from the standard closure) and 
   the shocks for the projections from 1992 to 2005 can be seen in the 
   command file:
---> Edit XQ-P1.CMF
   Run the simulation:
---> Run TP33XQ with the Command file XQ-P1.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-P1.CMF [exe-image version]
   This carries out a 10-step Euler calculation. Look at the updated 
   GTAPQUOTA file to see which quotas become binding. [None were binding 
   originally.]
---> Edit XQ-P1.UPD
   As you know, this preliminary simulation must be sufficiently accurate 
   to correctly identify which quotas  change their binding/non-binding 
   status. One way of checking that P1 was sufficiently accurate is to run
   it with different numbers of steps (usually more) and see if the same 
   changes in binding/non-binding occur. For example, you might like to 
   run it with 15 or 20 steps instead of the original 10. To do this:
---> Edit XQ-P1.CMF. Replace "steps = 10" with "steps = 20"
---> Run TP33XQ with the Command file XQ-P1.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-P1.CMF [exe-image version]
   Look at the results to see if the same quotas become binding:
---> Edit XQ-P1.UPD
   An alternative is to carry out say 10,15,20-step Euler calculations
   and look in the Extrapolation Accuracy file at variable qxs_ratio.
   Check that the values of its important components (in this case numbers 
   8 and 17 which correspond to mnfcs from ROW to USA and EU resepctively) 
   have very similar values in each of the separate calculations.

Example P2. The accurate version.
==========================================================================
   The first step in the accurate version is to compute the extra shocks.
   These are computed from XQ-BIND.TAB:
---> Run XQ-BIND with the command file BIND-P1.CMF [source-code version]
---> Run GEMSIM with the command file BIND-P1.CMF [exe and Demo versions]
   Have a look at the resulting files to see that the sizes of the shocks 
   are consistent with what you noted after P1 about which quotas become
   binding:
---> Edit TQXS-P2.SHK
---> Edit QXSR-P2.SHK
   The next step is to determine the necessary swaps and shocks. Check
   that this is done correctly in the command file for this accurate 
   version:
---> Edit XQ-P2.CMF
   Then run the simulation:
---> Run TP33XQ with the Command file XQ-P2.CMF [source-code and Demo versions]
---> Run GEMSIM with the Command file XQ-P2.CMF [exe-image version]
   The simulation uses 4,6,8-Gragg calculations. Check that the results
   are accurate in the Extrapolation Accuracy file:
---> Edit XQ-P2.XAC
   And do the necessary checking:
---> Run XQCHK with the command file XQCHK-P2.CMF
---> Edit XQCHK-P2.LOG

Example P2. Using Release 5.2 of GEMPACK
==========================================================================
   If you have access to Release 5.2 (or later) of GEMPACK, you can take 
   advantage of the automation described in section 8.3 of the Tech.Paper 
   No. 4. We have prepared Command file XQ-P22.CMF with the required 
   statements. Have a look at it and see how it differs from XQ-P2.CMF:
---> Edit XQ-P22.CMF
   You might like to run it and check that the results agree with those 
   from XQ-P2.CMF

==========================================================================
                               END
==========================================================================

