ldidx04.gms : $loadIdx - checking restrictions

Description

Check basic operation of $loadIdx.
Cannot $loadIdx from just any GDX file

Contributor: Steve Dirkse, Oct 2013


Small Model of Type : GAMS


Category : GAMS Test library


Main file : ldidx04.gms

$TITLE $loadIdx - checking restrictions (ldidx04,SEQ=628)

$ontext
Check basic operation of $loadIdx.
Cannot $loadIdx from just any GDX file

Contributor: Steve Dirkse, Oct 2013
$offtext

sets
  i1 / 1 * 2 /
  i2 / 2 * 2 /
  j1, j2
  ;
parameters
  a2(i1,i2)
  b2(j1,j2)
  ;
$gdxin trnsport
$loadIdx a2=d
$gdxin
$if errorfree $abort 'Compiler should reject this: AAA'
$clearerror

$gdxin trnsport
$loadIdx b2=d
$gdxin
$if errorfree $abort 'Compiler should reject this: BBB'
$clearerror