-
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
7 changed files
with
126 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
1 change: 1 addition & 0 deletions
1
tests/complex/traci/vehicle/insertStop/first_init_setSpeed/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/first_init_setSpeed/runner.py |
1 change: 1 addition & 0 deletions
1
tests/complex/traci/vehicle/insertStop/first_init_setSpeed/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 |
49 changes: 49 additions & 0 deletions
49
tests/complex/traci/vehicle/insertStop/first_init_setSpeed/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,49 @@ | ||
#!/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", | ||
"--no-step-log", | ||
"--stop-output", "stops.xml", | ||
] + sys.argv[1:]) | ||
|
||
vehID = "ego" | ||
|
||
traci.route.add("r0", ["A1B1", "C1D1"]) | ||
traci.vehicle.add(vehID, "r0") | ||
traci.vehicle.insertStop(vehID, 0, "busStop_B1C1", flags=tc.STOP_BUS_STOP, duration=30) | ||
traci.vehicle.setSpeed(vehID, 30) | ||
while traci.simulation.getMinExpectedNumber() > 0: | ||
traci.simulationStep() | ||
traci.close() |
28 changes: 28 additions & 0 deletions
28
tests/complex/traci/vehicle/insertStop/first_init_setSpeed/stops.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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2024-03-04 19:58:22 by Eclipse SUMO sumo Version v1_19_0+1148-0264d8f2cbd | ||
<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"/> | ||
<additional-files value="input_additional4.add.xml"/> | ||
</input> | ||
<output> | ||
<stop-output value="stops.xml"/> | ||
</output> | ||
<report> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="55683"/> | ||
</traci_server> | ||
</configuration> | ||
--> | ||
|
||
<stops xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/stopinfo_file.xsd"> | ||
<stopinfo id="ego" type="DEFAULT_VEHTYPE" lane="B1C1_0" pos="90.60" parking="0" started="17.00" ended="47.00" initialPersons="0" loadedPersons="0" unloadedPersons="0" initialContainers="0" loadedContainers="0" unloadedContainers="0" busStop="busStop_B1C1"/> | ||
</stops> |
44 changes: 44 additions & 0 deletions
44
tests/complex/traci/vehicle/insertStop/first_init_setSpeed/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,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2023-06-28 08:44:38 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> | ||
<report> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="32879"/> | ||
</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="272.00"> | ||
<routeDistribution> | ||
<route replacedOnEdge="" reason="device.rerouting" replacedAtTime="0.00" probability="0" edges="A0A1 A1A2 A2B2 B2A2 A2A1 A1B1 B1C1 C1D1 D2D3"/> | ||
<route edges="A0A1 A1A2 A2B2 B2A2 A2A1 A1B1 B1C1 C1D1 D1D2 D2D3"/> | ||
</routeDistribution> | ||
<stop busStop="busStop_A2B2" duration="30.00"/> | ||
<stop busStop="busStop_A1B1" duration="60.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