离散事件期间的任何logic错误; quot“执行类都无法施放。
我试图使用Anylogic到我们自己的提示进行配电中心模型进行模拟,因为它们以类似的方式工作,但产品和仓库不同,而且我只是从该程序开始的,所以我试图在运行时解决所有可提出的错误我知道它的工作原理与Java编程略有不同,因此当我最终解决此错误时,我不知道它在最后一个修改的存档中的根源是什么。如果我必须提供更多代码,请让我知道,请
首先说:
Exception during discrete event execution:
class com.anylogic.engine.Agent cannot be cast to class cocacola3.Muelle (com.anylogic.engine.Agent and cocacola3.Muelle are in unnamed module of loader 'app')
at cocacola3.Main._OcuparMuelleDescarga_onSeizeUnit_xjal(Main.java:4908)
错误的代码是:
agent.muelle = (Muelle) unit;
agent.muelle.Ocupado = true;
DescargaEspera.add(agent);
verificarDescarga();
;
}
private void _hold_onEnter_xjal( final com.anylogic.libraries.processmodeling.Hold<DescargaCamione> self, DescargaCamione agent ) {
self.block();
DescargaEspera.remove(agent);
;
映像上下文:
https://drive.google.com/file/d/1me5fptevvlwczkmsssedhsaq9zav3ncxh/view?usp = sharing?usp = sharing
? mdgl2.png“ rel =” nofollow noreferrer“>
I was trying to do a simulation of distribution center model using the tips from anylogic to our own, cause they work in similar ways but diferent products and warehouses, plus i just started with this program so i tried to fix every posible error during runtime cause i know it works slightly different from java programming so when i finally fix it this error happend and i dont know whats the root of it in the last modified archive. If i have to provide more codes let me know please
First one says:
Exception during discrete event execution:
class com.anylogic.engine.Agent cannot be cast to class cocacola3.Muelle (com.anylogic.engine.Agent and cocacola3.Muelle are in unnamed module of loader 'app')
at cocacola3.Main._OcuparMuelleDescarga_onSeizeUnit_xjal(Main.java:4908)
And the code with error is:
agent.muelle = (Muelle) unit;
agent.muelle.Ocupado = true;
DescargaEspera.add(agent);
verificarDescarga();
;
}
private void _hold_onEnter_xjal( final com.anylogic.libraries.processmodeling.Hold<DescargaCamione> self, DescargaCamione agent ) {
self.block();
DescargaEspera.remove(agent);
;
Images for context:
https://drive.google.com/file/d/1Me5fpTevvlWcZKMssEDhSaq9zaV3ncxH/view?usp=sharing
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的
单位
不是类型muelle
的代理。那样简单。要么确保它是类型muelle
的类型,要么将字段的类型更改为agent.muelle
到更通用的表单,例如agent
或对象
。您可能想做前者。如果在
Resourcepool
中发生这种情况,请确保您告诉它资源是类型muelle
Your
unit
is not an agent of typeMuelle
. It is as simple as that. Either make sure it is of typeMuelle
or change the type of the fieldagent.muelle
to a more generic form such asAgent
orObject
.You will probably want to do the former. If this happens in a
ResourcePool
, then make sure you tell it that the resources are of typeMuelle