-
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
83 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
6 changes: 6 additions & 0 deletions
6
tests/complex/traci/vehicle/changeTarget/input_routes.rou.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,6 @@ | ||
<routes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/routes_file.xsd"> | ||
<vType id="car" sigma="0"/> | ||
<trip id="v" type="car" depart="0" departSpeed="avg" from="A1B1" to="C1D1"> | ||
<stop edge="B2C2" duration="5"/> | ||
</trip> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tests/complex/traci/vehicle/changeTarget/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 @@ | ||
Retrying in 1 seconds |
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,45 @@ | ||
#!/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 Mirko Barthauer (Technische Universitaet Braunschweig) | ||
# @date 2018-09-27 | ||
|
||
from __future__ import print_function | ||
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", | ||
"-r", "input_routes.rou.xml", | ||
"--stop-output", "stopinfos.xml", | ||
"--no-step-log", | ||
] + sys.argv[1:]) | ||
|
||
|
||
vehID = "v" | ||
traci.simulationStep() | ||
traci.vehicle.changeTarget(vehID, "D1D0") | ||
while traci.simulation.getMinExpectedNumber() > 0: | ||
traci.simulationStep() | ||
|
||
traci.close() |
27 changes: 27 additions & 0 deletions
27
tests/complex/traci/vehicle/changeTarget/stopinfos.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,27 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2024-04-29 09:27:38 by Eclipse SUMO sumo Version v1_19_0+1962-7cdf26f2482 | ||
<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"/> | ||
</input> | ||
<output> | ||
<stop-output value="stopinfos.xml"/> | ||
</output> | ||
<report> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="49753"/> | ||
</traci_server> | ||
</configuration> | ||
--> | ||
|
||
<stops xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/stopinfo_file.xsd"> | ||
</stops> |
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