1

I would appreciate it if anyone could help me with this problem of mine, I have a random variable N which is following Poisson distribution and another Variable named M which is calculated based on other things and I know it is being calculated correctly cause i solved the example by hand. The problem is the part where GAMS wants to calculate the probability of N

*Number of emergency patients arriving at time period t on day d
Table N(t,d)
    1   2
1   1   1
2   1   1
3   1   1;

file emp / '%emp.info%' /;put emp '* problem %gams.i%'/;
$onput
randvar N(1,1) poisson Ltotal
randvar N(2,1) poisson Ltotal
randvar N(3,1) poisson Ltotal
randvar N(1,2) poisson Ltotal
randvar N(2,2) poisson Ltotal
randvar N(3,2) poisson Ltotal
$offput

put "randvar N(1,1) poisson Ltotal", N('1','1')/;
put "randvar N(2,1) poisson Ltotal", N('2','1')/;
put "randvar N(3,1) poisson Ltotal", N('3','1')/;
put "randvar N(1,2) poisson Ltotal", N('1','2')/;
put "randvar N(2,2) poisson Ltotal", N('2','2')/;
put "randvar N(3,2) poisson Ltotal", N('3','2')/;


file emp1 / '%emp.info%' /;put emp '* problem %gams.i%'/;
$onput
chance (N(t,d)<=M(t,d)) Re(t,d)
$offput
Sepideh Gh
  • 97
  • 6
  • I even decided to write the Poisson cumulative distribution in an equation instead of all these codes above, but that doesn't work too – Sepideh Gh Oct 26 '15 at 06:28

0 Answers0