Below is a brief description of some of the new features in Release 9.0 (April 2005) which were not available in Release 8.0 (October 2002) of GEMPACK.
The idea is that you can add statements to the TAB file to carry out calculations, create tables and write the results to text or Header Array files. The calculations you perform and tables you create can be based on
These three kinds of values are available and can be processed using Formulas and Write statements in the post-simulation part of the TAB file. These post-simulation Formulas and Write statements are carried out after the simulation had been completed and the results and updated data written in the usual way. In particular, you can access simulation results in this part of the TAB file as if the Variables were Coefficients. We give some examples below.
Consider the GTAP model. You may wish to build up a table showing the results for some important variables in each region. Prior to Release 9, the program SLTOHT could be used to do this - see the first example (for variables u, y and EV) in section 9.4 of the Release 8 version of GPD-4. With the Release 9 software, this table can be set up in the TAB file as follows.
PostSim (Begin) ; ! The beginning of a section of post-sim code ! SET RegVar1 (u, y, EV) ; Coefficient (All,r,REG)(All,v,RegVar1) RegResults1(r,v) ; Formula (All,r,REG) RegResults1(r,"u") = u(r) ; Formula (All,r,REG) RegResults1(r,"y") = y(r) ; Formula (All,r,REG) RegResults1(r,"EV") = EV(r) ; File (new, text, spreadsheet) PostSim1 ; Write RegResults1 to File PostSim1 ; PostSim (End) ; ! Marks end of a section of post-sim processing !
Note the Formulas with Variables u, y and EV on the right-hand side.
Many models write summaries of the salient features of a database as part of the TAB file used to solve the model, or in a related TAB file. For example, in ORANIG03.TAB, such information is written to the logical file SUMMARY. ORANIG03.TAB contains statements such as:
Coefficient (all,i,IND) V1CST(i) # Total cost of industry i #; (all,i,IND) V1TOT(i) # Total industry cost plus tax #; (all,i,IND) PTXRATE(i) # Rate of production tax #; Formula (all,i,IND) V1CST(i) = V1PRIM(i) + V1OCT(i) + V1MAT(i); (all,i,IND) V1TOT(i) = V1CST(i) + V1PTX(i); (all,i,IND) PTXRATE(i) = V1PTX(i)/V1CST(i); Write PTXRATE to file SUMMARY header "PTXR";
These statements calculate the production tax rates (from the pre-simulation data) and write the values to the SUMMARY file.
When you run a simulation with these models, GEMPACK produces the updated data. If you want to know the same summary facts about the updated data as you calculated about the pre-simulation data, in the past you have had to run the appropriate TAB file (for example, ORANIG03.TAB) on the updated data. Now you can easily arrange for that to happen as part of the simulation. All you have to do is to duplicate the write statements, as shown below.
File (New) SUMMARY_UPD # Summary info for updated data # ; Write (PostSim) PTXRATE to file SUMMARY_UPD header "PTXR";
The values of PTXRATE written will be the updated values (since those are the values in Coefficients during the processing of the post-simulation part of the TAB file).
This applies to very large models when you may not have enough physical memory on your computer to solve the model.
There are many other minor enhancements and new features, including the following.
All the new features in Release 9.0 are documented in GEMPACK document GPD-5 (April 2005) which you can download. A more complete list of the new features in Release 9 is given in section 1.4 of GPD-5.