parlib01.gms : Test extrinsic functions in parcclib

Description

This test makes sure that the extrinsic function library parcclib works as
expected. In this library we read the GAMS parameter file and as an example
ask it if the setting of the GAMS LogOption.

Contributor: L. Westermann, August 2014


Small Model of Type : GAMS


Category : GAMS Test library


Main file : parlib01.gms   includes :   compilec.inc [htmlprecomp.inc [html]

$Title Test extrinsic functions in parcclib (PARLIB01,SEQ=667)

$ontext
This test makes sure that the extrinsic function library parcclib works as
expected. In this library we read the GAMS parameter file and as an example
ask it if the setting of the GAMS LogOption.

Contributor: L. Westermann, August 2014
$offtext


$ifThen set nocomp
*  Use precompiled library provided by testlib
$  batinclude precomp.inc parcclib
$else
*  Compile library from source code
$  batinclude compilec.inc par optcc.c
$endIf

function myLO   / myLib.LogOption /;

variable x;
equation e;

e.. x =e= myLO;

model m /all/;
solve m use lp min x;

abort$(%GAMS.lo%<>x.l) 'Function returns wrong value for LO';