mpsge14.gms : MPSGE sync test: .GEN/integer1/nsolves

Description

Each solve with MPSGE should get its own include of the GEN file.  If
this is not done correctly, MPSGE should abort with a warning about
the issue.

This worked properly in 20.1 (2001).
It did not work with 20.7 (2005) through 24.7.4 (2016).
It is fixed in 24.8.0 with r59712.

Contributor: Steve Dirkse, Dec 2016


Small Model of Type : MPSGE


Category : GAMS Test library


Main file : mpsge14.gms

$title 'MPSGE sync test: .GEN/integer1/nsolves' (MPSGE14,SEQ=713)

$ontext
Each solve with MPSGE should get its own include of the GEN file.  If
this is not done correctly, MPSGE should abort with a warning about
the issue.

This worked properly in 20.1 (2001).
It did not work with 20.7 (2005) through 24.7.4 (2016).
It is fixed in 24.8.0 with r59712.

Contributor: Steve Dirkse, Dec 2016
$offtext

SETS
i       / i1 * i2 /,
j       / j1 * j2 /,
h       / h1 * h2 /;

parameter       d0(i,h)         Reference demands,
                e0(i,h)         Reference endowments;

d0(i,h) = uniform(0,1);
e0(i,h) = uniform(0,1);

$ontext

$model:exchange

$commodities:
        price(i,j)

$consumers:
        ra(h)


$demand:ra(h) s:1
        d:price(i,j)    q:d0(i,h)
        e:price(i,j)    q:e0(i,h)

$offtext

$sysinclude mpsgeset exchange

* if we include the GEN file things work
$include EXCHANGE.GEN
solve exchange using mcp;
abort$[exchange.solvestat <> %solvestat.NormalCompletion%] 'wrong solvestat';
abort$[exchange.modelstat <> %modelstat.Optimal%]          'wrong modelstat';

* if we fail to include the GEN file MPSGE will reject the model
* $include EXCHANGE.GEN
solve exchange using mcp;
abort$[exchange.solvestat <> %solvestat.SetupFailure%]     'wrong solvestat';
abort$[exchange.modelstat <> %modelstat.ErrorNoSolution%]  'wrong modelstat';