java - 有人在 AnyLogic 中使用过 set_center 方法吗?

标签 java anylogic

我正在将 AnyLogic 用于供应链中的一个项目。我很想问那些在AnyLogic中看到预定义模型的人。

它的路径是:欢迎 > 示例模型 > 供应链和物流 > 产品交付。在模型中,他们使用了一个名为 set_center 的函数(您可以在 Main 中找到它)。 你可以在下面找到 AnyLogic 中的代码

for (Distributor distributor : distributors) 
    distributor.set_center(
        distributor.getNearestAgentByRoute(manufacturingCenters));

对于我的项目,我根据上述预定义模型创建了一个模型,但函数 set_center 不起作用。它在控制台中告诉我

The method set_center(shiptopoint.getNearestAgentByRoute(retailers)) is undefined for the type Shiptopoint

shiptopointretailers 是我为我的模型创建的代理(它们都是人口代理)

我试图找到 Java 代码,但没有找到。
请问有人知道吗?

最佳答案

set_center(...) 是在代理类型 Distributor 中为参数 center 自动创建的方法。您创建的每个参数都有这样一个方法,请参阅 AnyLogic help on parameters .

您的代理类型中缺少参数center,因此没有这样的方法。

关于java - 有人在 AnyLogic 中使用过 set_center 方法吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63342145/

相关文章:

java - 在 postgresql 和 java 中使用字符串数组

java - android.support.v7.widget.GridLayout 实例化失败

Anylogic 叉车碰撞记录

throughput - 问 : [Anylogic] Measuring production throughput rate

java - ELKI 专家光学

java - 动态类加载: Exception in thread "main" java. lang.ClassFormatError

Java web启动权限问题?

anylogic - 参数变化 : Fixed, 但运行的种子不同

java - 当代理处于流程图中的特定点时如何更新状态图概率?

anylogic - 当模型暂停时,如何让图表自行重绘?