title: How to simulate 1000 vehicles in veins/omnet?
body: <p>I tried to simulate 1000 vehicles on the Veins erlangen example. But the   simulator always stop around 700 vehicles and displays error messages. I can simulate 500 vehicles. Why I can't simulate 1000 vehicles? </p>
  
  <blockquote>
    <p>RUNTIME ERROR. A cRuntimeError exception is about to be thrown, and
    you requested (by setting debug-on-errors=true in the ini file) that
    errors abort execution and break into the debugger.</p>
    
    <p>You should now probably be running the simulation under gdb or another
    debugger. The simulation kernel will now raise a SIGABRT signal which
    will get you into the debugger. If you are not running under a
    debugger, you can still use the core dump for post-mortem debugging.
    Once in the debugger, view the call stack (in gdb: "bt" command) to
    see the context of the runtime error.</p>
    
    <p> Error in module (Veins::TraCIScenarioManagerLaunchd)
    RSUExampleScenario.manager (id=6) at event #21128, t=2112.7:
    std::bad_alloc: std::bad_alloc.</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/tMVvU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/tMVvU.png" alt="enter image description here"></a></p>
  
  <pre><code>&lt;pre&gt;
  [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
  
  &lt;/pre&gt;
  </code></pre>