使用双概率数组在 AnyLogic 中以编程方式创建随机分布并绘制它

Create a random distribution programmatically in AnyLogic with a double array of probabilites and plot it

是否可以在 AnyLogic 中创建一个双数组 interval_start 和双数组概率小一个单位的 CustomDistribution?它看起来像这样: CustomDistribution c = new CustomDistribution(interval_start, 概率);

我找不到这种情况的任何构造函数 - 更具体地说是概率。我能找到的唯一类似的构造函数是: CustomDistribution (double[] intervalStarts, double[] numberOfObservations)

我的第二个问题是如何在 AnyLogic 中绘制此分布?

自定义分布仅使用观察的相对数量 作为 概率(即,它们之间的比率决定概率)。您实际上可以 使用 概率(0-1 值)作为“观察值的数量”; “观察值”正是 AnyLogic 选择的命名方式。