在 GAMS 中定义泊松分布

Defining poisson distribution in GAMS

我在 GAMS 中有这个 OR 模型,我需要定义一个具有泊松分布的参数,我的代码是:

Scalar Landa 'mean for poisson distribution' /3/;
Parameter L;
L=Poisson;

我收到错误 $140,这意味着未知符号 有人知道如何解决这个问题吗?

您可以在 emp.info 文件中定义这些变量。

将以下内容添加到您的 GAMS 代码中:

Scalar Landa 'mean for poisson distribution' /3/;
file emp / '%emp.info%' /; put emp '* problem %gams.i%'/;
$onput
randvar L poisson Landa
$offput

试试这个:

Scalar Landa 'mean for poisson distribution' /3/;
Parameter L;
L=E=Poisson;

希望对您有所帮助!