mpsge13.gms : MPSGE test - model returns invalid income level

Description

There was a bug that affects models with no explicit numeraire.  For
these models, MPSGE chooses an income level and sets it as numeraire.
This was not being communicated to the solver.

Last affected system: GAMS Distribution 24.1.3

Fixed with: GAMS Distribution 24.2, 24.1.4 if there is one.

Contributor: Tom Rutherford, Sep 2013


Small Model of Type : MPSGE


Category : GAMS Test library


Main file : mpsge13.gms

$title MPSGE test - model returns invalid income level (MPSGE13,SEQ=620)

$onText
There was a bug that affects models with no explicit numeraire.  For
these models, MPSGE chooses an income level and sets it as numeraire.
This was not being communicated to the solver.

Last affected system: GAMS Distribution 24.1.3

Fixed with: GAMS Distribution 24.2, 24.1.4 if there is one.

Contributor: Tom Rutherford, Sep 2013
$offText


$if not set TESTTOL $set TESTTOL 1e-4
scalar tol  / %TESTTOL% /;

parameter tl    Tax on labor / 0.5 /;

$onText
$model:simpler

$WALCHK:.true.
$FUNLOG:.true.
$DATECH:.true.

$sectors:
    X    ! Production activity

$commodities:
    PX    ! Price of aggregate output
    PL    ! Wage rate (net of tax)
    PK    ! Capital rental rate

$consumers:
    HH    ! Household
    GOVT    ! Government

$prod:X  s:1
    o:PX    q:100
    i:PL    q:40  p:1.25    a:GOVT    t:tl
    i:PK    q:50

$demand:GOVT
    d:PX    q:5
    e:PX    q:(-5)

$demand:HH  s:1
    d:PX    q:95
    d:PL    q:20
    e:PL    q:60
    e:PK    q:50
    e:PX    q:5

$report:
    v:DX    d:PX    demand:HH
    v:DL    d:PL    demand:HH

$offText
$sysInclude mpsgeset simpler

$include SIMPLER.GEN
solve simpler using mcp;

parameter    chk;
chk("HH")  = HH.L;
chk("HH*") =  (PL.L*60+PK.L*50+PX.L*5);
chk("HH**") = PX.L*DX.L + PL.L*DL.L;
file log /''/;
putclose log ' '/
 'HH  = ', chk("HH") /
 'HH* = ', chk("HH*") /
 'HH**= ', chk("HH**") /
 ' '/;

abort$[abs(chk("HH*")-chk("HH**")) > tol] 'bad check', chk;
abort$[abs(chk("HH*")-chk("HH"  )) > tol] 'bad check', chk;