繁体   English   中英

Java Error: The constructor is undefined Anylogic仿真软件

[英]Java Error: The constructor is undefined Anylogic Simulation Software

我无法解决此错误:说明:构造函数 Request(int, Suppliers) 未定义。 位置:测试/供应商/requestSupplier - 事件

这是代码:

Request request = new Request(uniform_discr(10,20), this);
Vehicle truck = getNearestAgentByRoute(filter(main.vehicles,
                v -> v.inState(Vehicle.AtFactory)));
if (truck != null)
send (request, truck);

截图错误

您不应该以这种方式实例化代理(如 Java 类)。 始终使用add_MyRequestPopulation(...)将它们添加到代理群体中,其中 args 是您的代理参数

因此,创建大量Requests并使用上面的代码。 请注意,您需要指定Request代理类型的所有 4 个参数

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM