我正在为供应链中的一个项目使用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其中shiptopoint和retailers是我为我的模型创建的代理(它们都是群体代理)
我试图找到Java代码,但没有找到。
有谁有线索吗?
发布于 2020-08-10 22:40:57
set_center(...)是为代理类型Distributor中的参数center自动创建的方法。您创建的每个参数都有一个这样的方法,请参见AnyLogic help on parameters。
您的代理类型中缺少参数center,因此没有这样的方法。
https://stackoverflow.com/questions/63342145
复制相似问题