You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

AnyLogic流程建模空指针异常求助:Source-Service-Sink模型运行报错

AnyLogic模型运行时空指针异常问题

我在AnyLogic中创建了包含Source、Service、Sink和ResourcePool模块的简单模型,模块连接关系为Source→Service→Sink:

  • Source生成Type 1类型Agent
  • ResourcePool使用Type 2类型Agent

两种Agent均为无属性的独立Agent类型(非种群)。运行模型时触发以下运行时错误:

java.lang.NullPointerException
at com.anylogic.engine.Port.connect(Unknown Source)
at com.anylogic.libraries.processmodeling.Seize.doCreate(Unknown Source)
at com.anylogic.engine.Agent.createAsEmbedded(Unknown Source)
at com.anylogic.libraries.processmodeling.Service.doCreate(Unknown Source)
at com.anylogic.engine.Agent.createAsEmbedded(Unknown Source)
at model.Main.doCreate(Main.java.619)
at com.anylogic.engine.Agent.createAsEmbedded(Unknown Source)
at com.anylogic.engine.Agent.create(Unknown Source)
at com.anylogic.engine.Engine.start(Unknown Source)

我已尝试调试但未解决问题,且已验证所有模块初始化均非空。附模型及各模块属性截图说明:

  • 模型整体布局截图:展示各模块的位置与连接关系
  • Source属性截图:Source模块的参数配置详情
  • Service属性截图:Service模块的参数配置详情
  • ResourcePool属性截图:ResourcePool模块的参数配置详情

内容的提问来源于stack exchange,提问作者user20406142

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.13 01:20:35