Skip to content

Commit

Permalink
fix #2949
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/behr_mi/git/sumo_synched/trunk@23652 afbd958f-9f77-42d5-a016-97a22340ccf4
  • Loading branch information
namdre committed Mar 24, 2017
1 parent c328ce5 commit 112491c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions sumo/src/microsim/MSStateHandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ MSStateHandler::myEndElement(int element) {
void
MSStateHandler::closeVehicle() {
assert(myVehicleParameter != 0);
myVehicleParameter->depart -= myOffset;
// the vehicle was already counted in MSVehicleControl::setState
MSVehicleControl& vc = MSNet::getInstance()->getVehicleControl();
// make a copy because myVehicleParameter is reset in closeVehicle()
Expand Down
4 changes: 2 additions & 2 deletions sumo/tests/sumo/extended/state/load_shifted/output.sumo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Loading net-file from 'net.net.xml'... done (1ms).
Loading net-file from 'net.net.xml'... done (0ms).
Loading state from 'input_state.xml'...
done (1ms).
Loading done.
Simulation started with time: 0.00
Simulation ended at time: 1127.00
Simulation ended at time: 127.00
Reason: All vehicles have left the simulation.
4 changes: 2 additions & 2 deletions sumo/tests/sumo/extended/state/load_shifted/tripinfos.sumo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Fri Mar 24 09:38:17 2017 by SUMO Version dev-SVN-r23633
<!-- generated on Fri Mar 24 12:41:58 2017 by SUMO Version dev-SVN-r23639
<?xml version="1.0" encoding="UTF-8"?>
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd">
Expand Down Expand Up @@ -31,7 +31,7 @@
-->

<tripinfos xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/tripinfo_file.xsd">
<tripinfo id="v1" depart="-10.00" departLane="" departPos="5.10" departSpeed="-1.00" departDelay="-1000.00" arrival="16.00" arrivalLane="end_0" arrivalPos="100.00" arrivalSpeed="13.89" duration="26.00" routeLength="301.90" waitSteps="0" timeLoss="0.00" rerouteNo="0" devices="tripinfo_v1" vType="type0" speedFactor="1.00" vaporized=""/>
<tripinfo id="v1" depart="-10.00" departLane="" departPos="5.10" departSpeed="-1.00" departDelay="0.00" arrival="16.00" arrivalLane="end_0" arrivalPos="100.00" arrivalSpeed="13.89" duration="26.00" routeLength="301.90" waitSteps="0" timeLoss="0.00" rerouteNo="0" devices="tripinfo_v1" vType="type0" speedFactor="1.00" vaporized=""/>
<tripinfo id="v0" depart="0.00" departLane="beg_0" departPos="5.10" departSpeed="0.00" departDelay="0.00" arrival="26.00" arrivalLane="end_0" arrivalPos="100.00" arrivalSpeed="13.89" duration="26.00" routeLength="301.90" waitSteps="0" timeLoss="2.77" rerouteNo="0" devices="tripinfo_v0" vType="type0" speedFactor="1.00" vaporized=""/>
<tripinfo id="v2" depart="100.00" departLane="beg_0" departPos="5.10" departSpeed="0.00" departDelay="0.00" arrival="126.00" arrivalLane="end_0" arrivalPos="100.00" arrivalSpeed="13.89" duration="26.00" routeLength="301.90" waitSteps="0" timeLoss="2.77" rerouteNo="0" devices="tripinfo_v2" vType="type0" speedFactor="1.00" vaporized=""/>
</tripinfos>

0 comments on commit 112491c

Please sign in to comment.