GAMS [ Home | Support | Sales | Solvers | Documentation | Model Library | Search | Contact Us ]

badpt1.gms : Test rejection of models with generation errors


In this model we attempt to solve a number of models that have
generation errors of various types.  By default, CMEX should
reject these models - i.e. the solver is not called.

Contributor: Steve Dirkse, Nov 2004

  get the model definitions

Small Model of Type: GAMS    Includes:  badpt.inc
$title 'Test rejection of models with generation errors' (BADPT1,SEQ=178) $ontext In this model we attempt to solve a number of models that have generation errors of various types. By default, CMEX should reject these models - i.e. the solver is not called. Contributor: Steve Dirkse, Nov 2004 $offtext * get the model definitions $include badpt.inc maxexecerror = 10; * assume sys12 switch for accepting bad models is at its default of 0 * option sys12 = 0; solve logzero using nlp min z; abort$(execerror=0) 'previous solve should have given exec errors'; abort$(logzero.solvestat <> 12 or logzero.modelstat <> 14) 'bad return codes'; execerror = 0; solve divzero using nlp min z; abort$(execerror=0) 'previous solve should have given exec errors'; abort$(logzero.solvestat <> 12 or logzero.modelstat <> 14) 'bad return codes'; execerror = 0;