1

Please tell me how i can use the cdfpoisson function in GAMS? I wrote the code as below but i get the Unknown symbol error for M which is a variable that has been calculated from some other things. Thanks

*Re(t,d)=Reliability of accepting emergency patients arriving at time period t on day d

$funclibin stolib stodclib
function cdfpoisson  /stolib.CDFPoisson/;
Re(t,d)=cdfpoisson(M(t,d),Ltotal);
Sepideh Gh
  • 97
  • 6

1 Answers1

1

The code seems to be functional when adding the adequate set and parameter definitions as below. So your issue does not seem to be with the function but rather the definitions of set, parameters and/or variables. Please provide more detail if in need of a better answer.

set t "time" /
0
/;

set d "day" /
1
/;

parameter
Re(t,d) "Reliability of accepting emergency patients arriving at time period t on day d"
M(t,d)
Ltotal
;

M(t,d) = 1;
Ltotal = 5;

$funclibin stolib stodclib
function cdfpoisson  /stolib.CDFPoisson/;
Re(t,d)=cdfpoisson(M(t,d),Ltotal);

execute_unload "test.gdx";
Jon
  • 351
  • 2
  • 10