-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
165 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/errors.complex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Error: Answered with error to command 0xc4: Stop insertion failed for vehicle 'ego' (Disallowed stop lane 'B2C2_0'). | ||
Traceback (most recent call last): | ||
File "/scr1/sumo/tests/../tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/runner.py", line 48, in <module> | ||
traci.vehicle.insertStop(vehID, 1, "busStop_B2C2", | ||
File "/scr1/sumo/tools/traci/_vehicle.py", line 1096, in insertStop | ||
self._setCmd(tc.CMD_INSERT_STOP, vehID, "tsdbdiddib", 9, edgeID, pos, | ||
File "/scr1/sumo/tools/traci/domain.py", line 164, in _setCmd | ||
self._connection._sendCmd(self._cmdSetID, varID, objectID, format, *values) | ||
File "/scr1/sumo/tools/traci/connection.py", line 231, in _sendCmd | ||
return self._sendExact() | ||
File "/scr1/sumo/tools/traci/connection.py", line 144, in _sendExact | ||
raise TraCIException(err, prefix[1], _RESULTS[prefix[2]]) | ||
traci.exceptions.TraCIException: Stop insertion failed for vehicle 'ego' (Disallowed stop lane 'B2C2_0'). | ||
sys:1: ResourceWarning: unclosed <socket.socket fd=3, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('127.0.0.1', 59728), raddr=('127.0.0.1', 33355)> | ||
/usr/lib/python3.10/subprocess.py:1072: ResourceWarning: subprocess 1105305 is still running | ||
Error: tcpip::Socket::recvAndCheck @ recv: peer shutdown | ||
Quitting (on error). |
1 change: 1 addition & 0 deletions
1
.../complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/errors.complex.meso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Warning: Network contains internal links which are ignored. Vehicles will 'jump' across junctions and thus underestimate route lengths and travel times. |
7 changes: 7 additions & 0 deletions
7
...lex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/input_additional.add.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<add> | ||
<rerouter id="rr0" edges="B2C2"> | ||
<interval begin="0" end="300"> | ||
<closingReroute id="B2C2" allow="authority"/> | ||
</interval> | ||
</rerouter> | ||
</add> |
1 change: 1 addition & 0 deletions
1
tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/options.complex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/runner.py |
1 change: 1 addition & 0 deletions
1
tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/output.complex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Retrying in 1 seconds |
51 changes: 51 additions & 0 deletions
51
tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/runner.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo | ||
# Copyright (C) 2008-2024 German Aerospace Center (DLR) and others. | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Eclipse Public License 2.0 which is available at | ||
# https://www.eclipse.org/legal/epl-2.0/ | ||
# This Source Code may also be made available under the following Secondary | ||
# Licenses when the conditions for such availability set forth in the Eclipse | ||
# Public License 2.0 are satisfied: GNU General Public License, version 2 | ||
# or later which is available at | ||
# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html | ||
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later | ||
|
||
# @file runner.py | ||
# @author Jakob Erdmann | ||
# @date 2017-01-23 | ||
|
||
|
||
from __future__ import print_function | ||
from __future__ import absolute_import | ||
import os | ||
import sys | ||
|
||
if "SUMO_HOME" in os.environ: | ||
sys.path.append(os.path.join(os.environ["SUMO_HOME"], "tools")) | ||
|
||
import traci # noqa | ||
import sumolib # noqa | ||
import traci.constants as tc # noqa | ||
|
||
|
||
sumoBinary = sumolib.checkBinary('sumo') | ||
traci.start([sumoBinary, | ||
"-n", "input_net4.net.xml", | ||
"-a", "input_additional4.add.xml,input_additional.add.xml", | ||
"-r", "input_routes.rou.xml", | ||
"--no-step-log", | ||
"--vehroute-output", "vehroutes.xml", | ||
"--time-to-teleport", "0", | ||
"--device.rerouting.mode", "8", | ||
] + sys.argv[1:]) | ||
|
||
vehID = "ego" | ||
|
||
while traci.simulation.getMinExpectedNumber() > 0: | ||
if traci.simulation.getTime() == 5: | ||
traci.vehicle.insertStop(vehID, 1, "busStop_B2C2", | ||
flags=tc.STOP_BUS_STOP, duration=30) | ||
traci.simulationStep() | ||
traci.close() |
36 changes: 36 additions & 0 deletions
36
tests/complex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/vehroutes.complex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2024-05-02 14:13:39 by Eclipse SUMO sumo Version v1_19_0+2039-4ad79ae706e | ||
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> | ||
<input> | ||
<net-file value="input_net4.net.xml"/> | ||
<route-files value="input_routes.rou.xml"/> | ||
<additional-files value="input_additional4.add.xml,input_additional.add.xml"/> | ||
</input> | ||
<output> | ||
<vehroute-output value="vehroutes.xml"/> | ||
</output> | ||
<processing> | ||
<time-to-teleport value="0"/> | ||
</processing> | ||
<routing> | ||
<device.rerouting.mode value="8"/> | ||
</routing> | ||
<report> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="33355"/> | ||
</traci_server> | ||
</configuration> | ||
--> | ||
|
||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd"> | ||
</routes> |
48 changes: 48 additions & 0 deletions
48
...mplex/traci/vehicle/insertStop/stop_forbidden_ignore_rerouter_copy/vehroutes.complex.meso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2023-06-28 08:44:40 by Eclipse SUMO sumo Version v1_17_0+1317-06f42fb | ||
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> | ||
<input> | ||
<net-file value="input_net4.net.xml"/> | ||
<route-files value="input_routes.rou.xml"/> | ||
<additional-files value="input_additional4.add.xml"/> | ||
</input> | ||
<output> | ||
<vehroute-output value="vehroutes.xml"/> | ||
</output> | ||
<processing> | ||
<time-to-teleport.disconnected value="1"/> | ||
</processing> | ||
<report> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="44915"/> | ||
</traci_server> | ||
<mesoscopic> | ||
<mesosim value="true"/> | ||
<meso-junction-control value="true"/> | ||
</mesoscopic> | ||
</configuration> | ||
--> | ||
|
||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd"> | ||
<vehicle id="ego" depart="0.00" arrival="263.00"> | ||
<routeDistribution> | ||
<route replacedOnEdge="A0A1" reason="traci:insertStop" replacedAtTime="5.00" probability="0" edges="A0A1 A1B1 B1C1 C1D1 D1D2 D2D3"/> | ||
<route edges="A0A1 A1B1 B2C2 C2B2 B2B1 B1C1 C1D1 D1D2 D2D3"/> | ||
</routeDistribution> | ||
<stop busStop="busStop_A1B1" duration="60.00"/> | ||
<stop busStop="busStop_B2C2" duration="30.00"/> | ||
<stop busStop="busStop_B1C1" duration="60.00"/> | ||
<stop busStop="busStop_C1D1" duration="60.00"/> | ||
</vehicle> | ||
|
||
</routes> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters