随机数生成需要太多的迭代

Random number generation requires too many iterations

我正在 Anylogic 中进行 运行 模拟,我正在尝试校准以下分布:

Jump = normal(coef1, coef2, -1, 1);

但是,我一开始校准(实验)就不断收到以下消息:

Random number generation requires too many iterations (> 10000)

我尝试将 -1 和 1 替换为其他值,结果仍然相同。
我还尝试更改 coef1coef2 的边界并放置 [0,1] 之类的内容,但我仍然遇到相同的错误。

我不明白。 有什么想法吗?

根据 AnyLogic's documentationnormal 没有接受 4 个参数的版本。另请注意,如果您指定平均值和标准偏差,则通过将标准偏差 放在平均值 之前,顺序是不寻常的(到 probabilists/statisticians)。

没有弃用四参数法则,它不是 "calibration where coef1 and coef2 are the coefficicents to be solved for"。你从哪里得到这样的理解?或者你是说你正在使用 AnyLogic 实验(可能是多 运行 或优化实验)来 'calibrate' 该分布,在这种情况下你需要解释你的意思 'calibrate' 这里---你想要的结果是什么?

如果您查看 API 参考(AnyLogic 类 和函数 --> API 参考 --> com.xj.anylogic.engine --> 实用程序),您你会看到这是一种使用 t运行 正态分布的方法。

public double normal(double min,
                     double max,
                     double shift,
                     double stretch) 

前2个参数是min和max(会重复采样,忽略[min,max]范围外的值);后两个实际上是均值和标准差。因此,如果 min 或 max 意味着它将采样太多次以获取范围内的值,您将得到您提到的错误。

API参考详情如下:

Generates a sample of truncated Normal distribution. Distribution normal(1, 0) is stretched by stretch coefficient, then shifted to the right by shift, after that it is truncated to fit in [min, max] interval. Truncation is performed by discarding every sample outside this interval and taking subsequent try. For more details see normal(double, double)

Parameters: min - the minimum value that this function will return. The distribution is truncated to return values above this. If the sample (stretched and shifted) is below this value it will be discarded and another sample will be drawn. Use -infinity for "No limit". max - the maximum value that this function will return. The distribution is truncated to return values below this. If the sample (stretched and shifted) is bigger than this value it will be discarded and another sample will be drawn. Use +infinity for "No limit". shift - the shift parameter that indicates how much the (stretched) distribution will shifted to the right = mean value stretch - the stretch parameter that indicates how much the distribution will be stretched = standard deviation Returns: the generated sample