Running an InterDyme Model in G7

The InterDyme software is distributed as a very simple model based on Chinese data. (A newer version, called Tiny, is built with U.S. data.) This model contains only the output and price solution and a simple imports equation. This simple model, called Slimdyme, should be installed and compiled first to make sure that everything is working correctly. The Slimdyme model file contains comments pointing out where you need to add the code for the functions of a typical interindustry model, such as final demand equations, employment equations, value added equations, etc. To install, create a directory called SLIMDYME and unzip the Slimdyme files into that directory. The SLIMDYME ZIP file will be named DYMEVxxx.ZIP, where the “xxx” indicates the current version of InterDyme. You also should have installed Borland Builder, which includes a 32-bit Borland C++ compiler called by “bcc32”, or alternatively install the Borland free compiler.

Here is a sequence of steps to operate the model. It also tests that everything is installed properly.

From the G7 command line, do

add initial

The file “initial” has the following contents.

# INITIAL for SLIMDYME
# Create vam file
vamcreate vam.cfg nohist
# Assign as bank b
vam hist b
# Make b the default vam file
dvam b

Set up a constant A-matrix, using the lint command:

add am.dat
fdates 1980 2000
f mover = 1
index 1980 mover am

Bring into the VAM file from the Mudan

# G7 bank data for some vectors.
ba mudan
fadd getout.add   sec33.fad
fadd getfd.add    sec33.fad
fadd getim.add    sec33.fad
fadd getprice.add sec33.fad
fadd getva.add    sec33.fad

# Move 1990 final demand vector, fd,
# forward by 2% per year.

add indexfor.add 1990 .02 fd

# Store the loaded vector, fd.  This is
# necessary only at the end of the work
# with the vam file.
store

# Before you can do Model | VecFixer, you
# must do "close b", but you may first want
# to "show b.fd" or show other vectors or
# matrices.

When the program finishes and the blinking prompt returns to the G7 command line, you may, as indicated by the comments at the end of the “initial” file, either first look at some of the vectors and matrices or proceed to build the rest of the model. Before proceeding, however, you first must give the command

close b

Build the macro part of the model by selecting from the G7 main menu

Model  |  IdBuild

This step also compiles and links the simulation model. Next, prepare the macro fixes:

Model  |  MacFixer

From the information on the form opened by this command, G7 will prepare the file MACFIXER.CFG and then execute the MacFixer program. For Slimdyme, you always should accept the default information in the form that opens in this and the following menus.

Prepare the vector fixes:

Model  |  VecFixer

From the information on the form opened by this command, G7 will prepare the file FIXER.CFG and then execute the Fixer program.

Run the model:

Model |  Run Dyme

From the information on the form which this command opens, G7 will prepare the file xxx.CFG, where xxx is the name of the model as you indicate on the form. The model then will be executed with this control file.

Execute the Compare program with the menu command

Model | Tables

The data in the form is used to make a control file for the Compare program. If you are running Compare again with exactly the same input control, you can use

Model | Express Tables

Once you have verified that Slimdyme is working correctly, you can create a directory for your own model. To copy only the necessary files into that directory, first copy the file GETDYME.BAT from the SLIMDYME directory to your new directory, and then type “getdyme slimdyme” from that directory. You also should examine the GETDYME.BAT file to see what it is copying. Before proceeding much further, you should study the InterDyme manual to learn how to build an interindustry model. Also, see The Craft of Economic Modeling on the Inforum web site.