0
votes

I would like to set the departSpeed of each car (mobility node) in veins/omnet++ to be the max allowed speed of the lane. I've already configured it in the SUMO route as follow: <vehicle id="myflow.0" type="normal car" depart="0.79" departLane="free" departSpeed="max"> However, in the simulation, the vehicle still departs from speed 0. Do I have to set the departSpeed in the omnetpp.ini file?

Now I modified the route file, but only the first car can depart at the max speed, while for the rest cars, they don't even accelerate. The following is my route file:

<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd">
<vType id="normal car" maxSpeed="40.00" speedFactor="1.0" vClass="passenger" carFollowModel="Krauss" accel="2.6" decel="4.5" sigma="0.5" />
<route id="route0" edges="0 1 2 3 4 5 6 7 8 9 10 11 12"/>
<vehicle id="myflow.0" type="normal car" depart="0.79" route="route0" departLane="free" departSpeed="max"/>
<vehicle id="myflow.1" type="normal car" depart="1.83" route="route0" departLane="free" departSpeed="max"/>
<vehicle id="myflow.2" type="normal car" depart="2.36" route="route0" departLane="free" departSpeed="max"/>
<vehicle id="myflow.3" type="normal car" depart="2.75" route="route0" departLane="free" departSpeed="max"/>

1

1 Answers

0
votes

The problem is solved. It is because I set the vechileNumber in the omnetpp.ini, as follow: #*.manager.numVehicles = 1000. Once I remove this, the simulation works as expected. I guess the reason is when I set the vehicleNumber in the omnetpp.ini, then this number of vehicles (nodes) will be created by TraCI in addition to the number of vehicles created in SUMO. Also, the initial settings, e.g., the speed, are not controlled by SUMO, but depend on the TraCI module settings.