scensol9.gms : Test option savepoint in GUSS

Description

This test checks support of option savepoint for GUSS scenarios

Contributor: Renke Kuhlmann, June 2021


Small Model of Type : GAMS


Category : GAMS Test library


Main file : scensol9.gms

$title 'Test option savepoint in GUSS' (SCENSOL9,SEQ=870)

$ontext
This test checks support of option savepoint for GUSS scenarios

Contributor: Renke Kuhlmann, June 2021
$offText
$call.checkErrorLevel gamslib -q gussex1

$call.checkErrorLevel gams gussex1 lo=2 savepoint=1
$call.checkErrorLevel '=test -e transport_base_p.gdx';
$call.checkErrorLevel '=test -e transport_run1_p.gdx';
$call.checkErrorLevel '=test -e transport_run2_p.gdx';
$call.checkErrorLevel 'gdxdump transport_base_p.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.55 /"';
$call.checkErrorLevel 'gdxdump transport_run1_p.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.1 /"';
$call.checkErrorLevel 'gdxdump transport_run2_p.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 110.286 /"';

$call.checkErrorLevel gams gussex1 lo=2 savepoint=2
$call.checkErrorLevel '=test -e transport_base_p0.gdx';
$call.checkErrorLevel '=test -e transport_run1_p0.gdx';
$call.checkErrorLevel '=test -e transport_run2_p0.gdx';
$call.checkErrorLevel 'gdxdump transport_base_p0.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.55 /"';
$call.checkErrorLevel 'gdxdump transport_run1_p0.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.1 /"';
$call.checkErrorLevel 'gdxdump transport_run2_p0.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 110.286 /"';

$call mkdir workdir

$call.checkErrorLevel gams gussex1 lo=2 savepoint=3 scrdir=workdir
$call.checkErrorLevel '=test -e workdir/transport_base_p.gdx';
$call.checkErrorLevel '=test -e workdir/transport_run1_p.gdx';
$call.checkErrorLevel '=test -e workdir/transport_run2_p.gdx';
$call.checkErrorLevel 'gdxdump workdir/transport_base_p.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.55 /"';
$call.checkErrorLevel 'gdxdump workdir/transport_run1_p.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.1 /"';
$call.checkErrorLevel 'gdxdump workdir/transport_run2_p.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 110.286 /"';

$call.checkErrorLevel gams gussex1 lo=2 savepoint=4 scrdir=workdir
$call.checkErrorLevel '=test -e workdir/transport_base_p0.gdx';
$call.checkErrorLevel '=test -e workdir/transport_run1_p0.gdx';
$call.checkErrorLevel '=test -e workdir/transport_run2_p0.gdx';
$call.checkErrorLevel 'gdxdump workdir/transport_base_p0.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.55 /"';
$call.checkErrorLevel 'gdxdump workdir/transport_run1_p0.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 107.1 /"';
$call.checkErrorLevel 'gdxdump workdir/transport_run2_p0.gdx | grep -q "Variable z total transportation costs in thousands of dollars /L 110.286 /"';

$call rm -rf workdir