Skip to content

Commit

Permalink
fix #3014
Browse files Browse the repository at this point in the history
git-svn-id: file:///home/behr_mi/git/sumo_synched/trunk@23959 afbd958f-9f77-42d5-a016-97a22340ccf4
  • Loading branch information
namdre committed Apr 18, 2017
1 parent f23e1db commit 5fc016b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
6 changes: 5 additions & 1 deletion sumo/src/microsim/MSTransportableControl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,11 @@ MSTransportableControl::erase(MSTransportable* transportable) {
void
MSTransportableControl::setWaitEnd(const SUMOTime time, MSTransportable* transportable) {
const SUMOTime step = time % DELTA_T == 0 ? time : (time / DELTA_T + 1) * DELTA_T;
myWaitingUntil[step].push_back(transportable);
// avoid double registration
const TransportableVector& transportables = myWaiting4Departure[step];
if (std::find(transportables.begin(), transportables.end(), transportable) == transportables.end()) {
myWaitingUntil[step].push_back(transportable);
}
}


Expand Down
1 change: 1 addition & 0 deletions sumo/src/traci_testclient/TraCITestClient.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -812,6 +812,7 @@ TraCITestClient::testAPI() {
person.removeStages("p1");
answerLog << " getRemainingStages: " << person.getRemainingStages("p1") << "\n";
answerLog << " getStage: " << person.getStage("p1") << "\n";
simulationStep();
answerLog << " trafficlights:\n";
answerLog << " getIDList: " << joinToString(trafficlights.getIDList(), " ") << "\n";
answerLog << " state: " << trafficlights.getRedYellowGreenState("n_m4") << "\n";
Expand Down
5 changes: 3 additions & 2 deletions sumo/tests/traci/testAPI/detector.traci
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- generated on Thu Jan 26 15:54:48 2017 by SUMO Version dev-SVN-r22713
<!-- generated on Tue Apr 18 11:33:30 2017 by SUMO Version dev-SVN-r23949
<?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 All @@ -23,7 +23,7 @@
</report>
<traci_server>
<remote-port value="50053"/>
<remote-port value="54684"/>
</traci_server>
</configuration>
Expand All @@ -40,4 +40,5 @@
<interval begin="7.00" end="8.00" id="det1" nVehContrib="0" flow="0.00" occupancy="0.00" speed="-1.00" length="-1.00" nVehEntered="0"/>
<interval begin="8.00" end="9.00" id="det1" nVehContrib="0" flow="0.00" occupancy="0.00" speed="-1.00" length="-1.00" nVehEntered="0"/>
<interval begin="9.00" end="10.00" id="det1" nVehContrib="0" flow="0.00" occupancy="0.00" speed="-1.00" length="-1.00" nVehEntered="0"/>
<interval begin="10.00" end="11.00" id="det1" nVehContrib="0" flow="0.00" occupancy="0.00" speed="-1.00" length="-1.00" nVehEntered="0"/>
</detector>
6 changes: 3 additions & 3 deletions sumo/tests/traci/testAPI/testclient_out.traci
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
TraCITestClient output file. Date: Thu Apr 6 11:07:46 2017
TraCITestClient output file. Date: Tue Apr 18 11:33:30 2017


-> Command sent: <SimulationStep2>:
Expand Down Expand Up @@ -92,11 +92,11 @@ testAPI:
.. Command acknowledged (2), [description: ]
CommandID=228 ObjectID=1 #variables=2
VariableID=80 ok=1 valueDataType=12 string value: e_u1
VariableID=86 ok=1 valueDataType=11 Double value: 16.19
VariableID=86 ok=1 valueDataType=11 Double value: 23.46
CommandID=154 ObjectID=e_u1 Domain=164 #variables=1
#objects=1
ObjectID=1
VariableID=86 ok=1 valueDataType=11 Double value: 16.19
VariableID=86 ok=1 valueDataType=11 Double value: 23.46

-> Command sent: <Close>:
.. Command acknowledged (127), [description: ]

0 comments on commit 5fc016b

Please sign in to comment.