-
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
329 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
14 changes: 14 additions & 0 deletions
14
tests/tools/sumolib/net_and_additional/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,14 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<additional> | ||
|
||
<tlLogic id="C" type="static" programID="extra" offset="0"> | ||
<phase duration="31" state="GGGggrrrrGGGggrrrr"/> | ||
<phase duration="4" state="yyyyyrrrryyyyyrrrr"/> | ||
<phase duration="31" state="rrrrrGGggrrrrrGGgg"/> | ||
<phase duration="4" state="rrrrryyyyrrrrryyyy"/> | ||
<param key="tk3" value="tv3"/> | ||
</tlLogic> | ||
|
||
|
||
</additional> |
268 changes: 268 additions & 0 deletions
268
tests/tools/sumolib/net_and_additional/input_net.net.xml
Large diffs are not rendered by default.
Oops, something went wrong.
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 @@ | ||
input_net.net.xml input_additional.add.xml tests/tools/sumolib/net_and_additional/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,2 @@ | ||
tlsParams tk1:tv1 tk2:tv2 | ||
tlsExtraParams tk3:tv3 |
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,41 @@ | ||
#!/usr/bin/env python | ||
# 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 | ||
|
||
from __future__ import absolute_import | ||
from __future__ import print_function | ||
|
||
|
||
import os | ||
import sys | ||
if 'SUMO_HOME' in os.environ: | ||
tools = os.path.join(os.environ['SUMO_HOME'], 'tools') | ||
sys.path.append(tools) | ||
else: | ||
sys.exit("please declare environment variable 'SUMO_HOME'") | ||
import sumolib.net # noqa | ||
|
||
|
||
def printSorted(d): | ||
return ' '.join(["%s:%s" % (k, d[k]) for k in sorted(d.keys())]) | ||
|
||
|
||
net = sumolib.net.readNet(sys.argv[1], withInternal=True, withLatestPrograms=True) | ||
net = sumolib.net.readNet(sys.argv[2], withPrograms=True, net=net) | ||
|
||
print("tlsParams", printSorted(net.getTLS("C").getPrograms()["0"].getParams())) | ||
print("tlsExtraParams", printSorted(net.getTLS("C").getPrograms()["extra"].getParams())) | ||
|
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 |
---|---|---|
|
@@ -41,3 +41,6 @@ statistics | |
|
||
# read polygons | ||
shapes | ||
|
||
# parsing a network and an additional file with tls | ||
net_and_additional |