-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
6 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
5 changes: 5 additions & 0 deletions
5
tests/complex/traci/vehicle/setLcContRight/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,5 @@ | ||
<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"/> | ||
<route id="r1" edges="1fi 1si"/> | ||
<vehicle id="v0" type="car" depart="0" route="r1" departSpeed="max" speedFactor="1"/> | ||
</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/setLcContRight/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,3 @@ | ||
Retrying in 1 seconds | ||
1.0 1fi_0 | ||
23.0 1si_0 |
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-2025 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 Matthias Schwamborn | ||
# @date 2022-03-01 | ||
|
||
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 | ||
|
||
sumoBinary = sumolib.checkBinary('sumo') | ||
traci.start([sumoBinary, | ||
"-n", "input_net.net.xml", | ||
"-r", "input_routes.rou.xml", | ||
"--no-step-log", | ||
] + sys.argv[1:]) | ||
|
||
vehID = "v0" | ||
traci.vehicle.setParameter(vehID, "laneChangeModel.lcContRight", "0") | ||
laneID = "" | ||
while traci.simulation.getMinExpectedNumber() > 0: | ||
if traci.vehicle.getLaneID(vehID) != laneID: | ||
laneID = traci.vehicle.getLaneID(vehID) | ||
print(traci.simulation.getTime(), laneID) | ||
traci.simulationStep() | ||
|
||
traci.close() |
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