fnlogit.gms : Test correctness of logit intrinsic

Description

This test ensures the correct evaluation of logit

Contributor: Lutz Westermann, October 2021


Small Model of Type : GAMS


Category : GAMS Test library


Main file : fnlogit.gms   includes :   fnset_x.inc [htmlfntest_x.inc [html]

$title Test correctness of logit intrinsic (FNLOGIT,SEQ=880)

$ontext
This test ensures the correct evaluation of logit

Contributor: Lutz Westermann, October 2021
$offtext


* define some sets, etc.
$include fnset_x.inc

$gdxin fnlogit
$load aeps reps reps1 reps2 relToInput T data
$gdxin

loop {T,
  data(T,  'f')    = logit.value (data(T,'x'));
  data(T, 'fx')    = logit.grad  (data(T,'x'));
  data(T,'fxx')    = logit.hess  (data(T,'x'));
  data(T, 'rc')    = mathlastrc;
  data(T, 'ec')    = mathlastec;
};

* the data set should contain some singular values
abort$[execerror < 8] 'Should get execution errors evaluating logit.XXXX(x) for exceptional x';
execerror = 0;

$include fntest_x.inc