TGCPRS Complementarity Bug and Bug Fixes

The Problem

In some circumstances, Release 8.0 TABLO-generated programs or GEMSIM could produce incorrect results when solving a model involving COMPLEMENTARITY statements (see section 3.19 of GPD-2 and chapter 16 of GPD-3).

If you use COMPLEMENTARITY statements in your models, you can check the LOG files from your simulations to see if your results have been affected by this bug by searching for the words:

No state change when redoing this step.
Will increase step length slightly and redo the step again.

during the approximate complementarity simulation. [For example, you can search your LOG files for the words "increase step length slightly".]

If these words appear, it is quite likely that your results are not accurate because of this bug. Otherwise there is no problem.

Second Way of Checking Results

If the bug has affected your results, the shocks shown by ViewSOL when you use ViewSOL option "Show levels results (if present)" will be different from the shocks you specified in your Command file. This provides another way of checking whether or not this bug has produced incorrect results for you. [If you use this check, make sure that the above ViewSOL option is selected since otherwise this will not be an effective check.]

The GEMPACK developers apologise for the inconvenience and uncertainty this bug causes.

If you are uncertain as to whether or not this bug has affected some of your results, we will be happy to assist.

We are grateful to Kevin Hanslow for providing the example which showed this bug.

Bug Fix for Release 8.0 of Source-code GEMPACK

The following fix is recommended for those

(i) working on a Windows PC

(ii) with Release 8.0 (October 2002) to Release 8.0-005 (June 2004) of Source-Code GEMPACK.

If you have Release 8.0-006 (October 2004) or later of GEMPACK, you do not need to download this fix since it is already included in your source code.

If you have a unix version of GEMPACK, please contact the GEMPACK developers to obtain a fix.

To install this fix on a Windows PC, proceed as follows.

1. Download the file CPRSFX80.ZIP (5K) and put it into the SUBS subdirectory of the directory in which your GEMPACK is installed (usually, C:\GP\SUBS).

2. Go to a DOS box and change into this SUBS subdirectory.

3. Issue the following commands.
del tgcprs.for
unzip32 -o cprsfx80.zip
zip tga tgcprs.for
cd ..
mkliba
mkgemsim

This will make new versions of GPA.LIB and of GEMSIM.EXE.

You need to rerun LTG (compile and link) on all relevant TABLO-generated programs after you install the fix.

Go back to
Release 8 bug fixes page