我试图在 Veins erlangen 示例中模拟 1000 辆汽车。但模拟器总是停止大约 700 辆车并显示错误消息。我可以模拟 500 辆汽车。为什么我不能模拟 1000 辆汽车?
运行时错误。即将引发 cRuntimeError 异常,并且您请求(通过在 ini 文件中设置 debug-on-errors=true)错误中止执行并中断调试器。
您现在可能应该在 gdb 或其他调试器下运行模拟。模拟内核现在将发出一个 SIGABRT 信号,该信号将使您进入调试器。如果您没有在调试器下运行,您仍然可以使用核心转储进行事后调试。进入调试器后,查看调用堆栈(在 gdb:“bt”命令中)以查看运行时错误的上下文。
事件 #21128,t=2112.7 时模块 (Veins::TraCIScenarioManagerLaunchd) RSUExampleScenario.manager (id=6) 出错:std::bad_alloc: std::bad_alloc。
<pre>
[General]
cmdenv-express-mode = true
cmdenv-autoflush = true
cmdenv-status-frequency = 10000000s
#tkenv-default-config = debug
#tkenv-default-run = 1
ned-path = .
network = RSUExampleScenario
##########################################################
# Simulation parameters #
##########################################################
debug-on-errors = true
print-undisposed = false
#sim-time-limit = 6000s
sim-time-limit = 8000s
**.scalar-recording = true
**.vector-recording = true
**.debug = false
**.coreDebug = false
*.playgroundSizeX = 2500m
*.playgroundSizeY = 2500m
*.playgroundSizeZ = 50m
#*.playgroundSizeX = 7500m #ME ADDED
#*.playgroundSizeY = 7500m #ME ADDED
#*.playgroundSizeZ = 500m #ME ADDED
##########################################################
# Annotation parameters #
##########################################################
*.annotations.draw = false
##########################################################
# Obstacle parameters #
##########################################################
*.obstacles.debug = false
*.obstacles.obstacles = xmldoc("config.xml", "//AnalogueModel[@type='SimpleObstacleShadowing']/obstacles")
##########################################################
# WorldUtility parameters #
##########################################################
*.world.useTorus = false
*.world.use2D = false
##########################################################
# TraCIScenarioManager parameters #
##########################################################
*.manager.updateInterval = 0.1s
*.manager.host = "localhost"
*.manager.port = 9999
*.manager.moduleType = "org.car2x.veins.nodes.Car"
*.manager.moduleName = "node"
*.manager.moduleDisplayString = ""
*.manager.autoShutdown = true
*.manager.margin = 25
*.manager.launchConfig = xmldoc("erlangen.launchd.xml")
##########################################################
# RSU SETTINGS #
# #
# #
##########################################################
*.rsu[0].mobility.x = 2000
*.rsu[0].mobility.y = 2000
*.rsu[0].mobility.z = 3
*.rsu[*].applType = "TraCIDemoRSU11p"
*.rsu[*].appl.debug = false
*.rsu[*].appl.headerLength = 256 bit
*.rsu[*].appl.sendBeacons = false
*.rsu[*].appl.dataOnSch = false
*.rsu[*].appl.sendData = true
*.rsu[*].appl.beaconInterval = 1s
*.rsu[*].appl.beaconPriority = 3
*.rsu[*].appl.dataPriority = 2
*.rsu[*].appl.maxOffset = 0.005s
##########################################################
# 11p specific parameters #
#
# NIC-Settings #
##########################################################
*.connectionManager.pMax = 20mW
*.connectionManager.sat = -89dBm
*.connectionManager.alpha = 2.0
*.connectionManager.carrierFrequency = 5.890e9 Hz
*.connectionManager.sendDirect = true
*.**.nic.mac1609_4.useServiceChannel = false
*.**.nic.mac1609_4.txPower = 20mW
*.**.nic.mac1609_4.bitrate = 18Mbps
*.**.nic.phy80211p.sensitivity = -89dBm
*.**.nic.phy80211p.useThermalNoise = true
*.**.nic.phy80211p.thermalNoise = -110dBm
*.**.nic.phy80211p.decider = xmldoc("config.xml")
*.**.nic.phy80211p.analogueModels = xmldoc("config.xml")
*.**.nic.phy80211p.usePropagationDelay = true
##########################################################
# WaveAppLayer #
##########################################################
*.node[*].applType = "TraCIDemo11p"
*.node[*].appl.debug = false
*.node[*].appl.headerLength = 256 bit
*.node[*].appl.sendBeacons = false
*.node[*].appl.dataOnSch = false
*.node[*].appl.sendData = true
*.node[*].appl.beaconInterval = 1s
*.node[*].appl.beaconPriority = 3
*.node[*].appl.dataPriority = 2
*.node[*].appl.maxOffset = 0.005s
##########################################################
# Mobility #
##########################################################
*.node[*].veinsmobilityType = "org.car2x.veins.modules.mobility.traci.TraCIMobility"
*.node[*].mobilityType = "TraCIMobility"
*.node[*].mobilityType.debug = true
*.node[*].veinsmobilityType.debug = true
*.node[*].veinsmobility.x = 0
*.node[*].veinsmobility.y = 0
*.node[*].veinsmobility.z = 1.895
#*.node[*0].veinsmobility.accidentCount = 0
#*.node[*0].veinsmobility.accidentStart = 75s
#*.node[*0].veinsmobility.accidentDuration = 30s
*.node[5].veinsmobility.accidentCount = 0
*.node[5].veinsmobility.accidentStart = 15s
*.node[5].veinsmobility.accidentDuration = 35s
*.node[10].veinsmobility.accidentCount = 0
*.node[10].veinsmobility.accidentStart = 35s
*.node[10].veinsmobility.accidentDuration = 35s
[Config nodebug]
description = "default settings"
**.debug = false
**.coreDebug = false
*.annotations.draw = false
[Config debug]
description = "(very slow!) draw and print additional debug information"
**.debug = true
**.coreDebug = true
*.annotations.draw = true
</pre>