gpt4 book ai didi

java - RinSim sim.start() 中的 NullpointerException GraphSpatialRegistry 不一致

转载 作者:太空宇宙 更新时间:2023-11-04 10:25:18 25 4
gpt4 key购买 nike

我们目前在 RinSim 上运行时遇到仓库 AGV 问题。有时在执行过程中我们会遇到以下错误:

Exception in thread "main" java.lang.NullPointerException
at com.github.rinde.rinsim.core.model.road.GraphSpatialRegistry.getConnection(GraphSpatialRegistry.java:133)
at com.github.rinde.rinsim.core.model.road.GraphRoadModelImpl.getConnection(GraphRoadModelImpl.java:478)
at com.github.rinde.rinsim.ui.renderers.AGVRenderer$VehicleUI.update(AGVRenderer.java:294)
at com.github.rinde.rinsim.ui.renderers.AGVRenderer.renderDynamic(AGVRenderer.java:98)
at com.github.rinde.rinsim.ui.SimulationViewer.paintControl(SimulationViewer.java:492)
at org.eclipse.swt.widgets.TypedListener.handleEvent(Unknown Source)
at org.eclipse.swt.widgets.EventTable.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Display.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Widget.sendEvent(Unknown Source)
at org.eclipse.swt.widgets.Composite.WM_PAINT(Unknown Source)
at org.eclipse.swt.widgets.Control.windowProc(Unknown Source)
at org.eclipse.swt.widgets.Canvas.windowProc(Unknown Source)
at org.eclipse.swt.widgets.Display.windowProc(Unknown Source)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(Unknown Source)
at org.eclipse.swt.widgets.Display.readAndDispatch(Unknown Source)
at com.github.rinde.rinsim.ui.View.show(View.java:153)
at com.github.rinde.rinsim.core.Simulator.start(Simulator.java:186)
at Environment.run(Environment.java:136)
at Environment.main(Environment.java:61)

这个错误不会在每次执行时发生,更不用说在同一点发生了(我们认为这是正常错误的情况,因为我们为每个“随机”使用了 RandomGenerator)。来 self 们的Viewbuilder的代码:

 View.Builder viewBuilder = View.builder()
.with(WarehouseRenderer.builder()
.withMargin(VEHICLE_LENGTH))
.with(AGVRenderer.builder()
.withDifferentColorsForVehicles())
.with(PDPModelRenderer.builder().withDestinationLines());

最佳答案

此 NPE 自 RinSim v4.4.6 起已修复.

关于java - RinSim sim.start() 中的 NullpointerException GraphSpatialRegistry 不一致,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50609720/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com