Page 1 of 1

1/0 notation

Posted: Wed May 01, 2019 6:12 pm
by Sarah_Chamberland
Hi all,
I was wondering if someone had come across the 1/0 notation and what it meant. Here is an example:

Code: Select all

PARAMETER
 SAMGAPCUTOFF  max acceptable abs gap bt model SAM row and col totals
 ERRSAMBAL(AC) if UNDF -- the absolute imbalance for AC exceeds cutoff
 ;

 SAMGAPCUTOFF = 1.0e-5;

 ERRSAMBAL(AC)$(ABS(SAMBALCHK(AC)) GT SAMGAPCUTOFF) = 1/0;
The result of this is that an error occurs if the left side is greater than SAMGAPCUTOFF.
Thank you!

Re: 1/0 notation

Posted: Thu May 02, 2019 7:04 am
by bussieck
Hmmm, this looks like on old way to trigger an execution error if the data is too bad (the SAM is too imbalanced) to run the model. Nowadays, we would do things like this:

Code: Select all

Parameter
 SAMGAPCUTOFF  'max acceptable abs gap bt model SAM row and col totals'
 ERRSAMBAL(AC) 'the absolute imbalance for AC exceeds cutoff - we abort is this is none empty'
 ;

 SAMGAPCUTOFF = 1.0e-5;

 ERRSAMBAL(AC)$(ABS(SAMBALCHK(AC)) GT SAMGAPCUTOFF) = SAMBALCHK(AC);
 abort$card(ERRSAMBAL) ERRSAMBAL;
 
-Michael

Re: 1/0 notation

Posted: Thu May 02, 2019 3:38 pm
by Sarah_Chamberland
Thank you Michael!