Behavior is no running for desire duration
Problems:
-
Each behavior is expected to run for 4 seconds but the vehicle is destroyed earlier than 4 seconds. How to ensure the behavior runs for exact 4 seconds. Note: Arrival position is calculated by speed * 4
-
Attribute arrival is not working i.e. sumo is not considering the value provided with attribute arrival.
Example:
<!-- "Behaviour 1: initial_position">
<vehicle id="type1_0" type="type1" depart="0.00" arrival="4.00" departLane="0" arrivalLane="0" departSpeed="8.8889" arrivalSpeed="8.8889" departPos="0.0000" arrivalPos="35.445">
</vehicle>
<!-- "Behaviour 2: Accelrate">
<vehicle id="type1_0" type="type1" depart="4.00" arrival="8.00" departLane="0" arrivalLane="0" departSpeed="8.8889" arrivalSpeed="8.8889" departPos="35.445" arrivalPos="71.112">
</vehicle>
Sumo Version: 1.13.0
Operating System: Windows
You do not define the arrival in SUMO as input. It is an emergent property. A vehicle arrives when it has finished its route. So maybe your route is just too short.
Thanks Behrisch for your quick reply. I tried by eliminating the attribute arrival (refer the following example) but still no luck. The route is defined by arrivalPos (value is 35.556) by which the behavior should continue for 4 seconds but unfortunately the vehicle is destroying earlier than provided arrival position.
Any suggestion or direction will be very helpful.
Then there may be some other problem when the vehicle disappears before finishing the route. The route has to be defined explicitely by naming the edges (see docs). Your code snippet doesn't show how you actually set the route.
maybe attach a minimal example scenario that shows your problem.
Thanks for the quick response. Please refer scanario.txt the attached scenario
<!-- "Behaviour 1: initial_position">
<vehicle id="type1_0" type="type1" depart="0.00" departLane="0" arrivalLane="0" departSpeed="8.8889" arrivalSpeed="8.8889" departPos="0.0000" arrivalPos="35.556">
<routeDistribution>
<route probability="1.00000000" edges="14" />
</routeDistribution>
</vehicle>
<vehicle id="type2_0" type="type2" depart="0.00" departLane="0" arrivalLane="0" departSpeed="8.8889" arrivalSpeed="8.8889" departPos="0.0000" arrivalPos="35.556">
<routeDistribution>
<route probability="1.00000000" edges="14" />
</routeDistribution>
</vehicle>
<!-- "Behaviour 2: Accelrate">
<vehicle id="type1_0" type="type1" depart="4.00" departLane="0" arrivalLane="0" departSpeed="8.8889" arrivalSpeed="8.8889" departPos="35.556" arrivalPos="71.112">
<routeDistribution>
<route probability="1.00000000" edges="14" />
</routeDistribution>
</vehicle>
<vehicle id="type2_0" type="type2" depart="4.00" departLane="0" arrivalLane="0" departSpeed="8.8889" arrivalSpeed="17.7778" departPos="35.556" arrivalPos="106.6672">
<routeDistribution>
<route probability="1.00000000" edges="14" />
</routeDistribution>
</vehicle>
The vehicle disappears slightly before (~31m) the given arrival position because it would exceed it within the next simulation step. You chose to use the default time step value of 1s. If you lower the time step using the parameter --step-length 0.5 to the half (just to name a lower value, you can also set it to 0.1), it will also come closer to the arrival position. Other than that, I cannot see anything wrong here.