-
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.
Merge branch 'main' of github.com:eclipse-sumo/sumo into Netedit_dev
- Loading branch information
Showing
12 changed files
with
196 additions
and
14 deletions.
There are no files selected for viewing
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
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
2 changes: 2 additions & 0 deletions
2
tests/complex/traci/trafficlight/setLogic_duration0/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,2 @@ | ||
Warning: Missing yellow phase in tlLogic 'C', program 'custom' for tl-index 0 when switching to phase 1. | ||
Warning: Missing green phase in tlLogic 'C', program 'custom' for tl-index 5. |
3 changes: 3 additions & 0 deletions
3
tests/complex/traci/trafficlight/setLogic_duration0/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,3 @@ | ||
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd"> | ||
<timedEvent type="SaveTLSProgram" source="C" dest="tls_state.xml"/> | ||
</additional> |
5 changes: 5 additions & 0 deletions
5
tests/complex/traci/trafficlight/setLogic_duration0/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"> | ||
<route id="vertical" edges="NC CS"/> | ||
<vehicle id="0" route="vertical" depart="0"/> | ||
<vehicle id="1" route="vertical" depart="30"/> | ||
</routes> |
1 change: 1 addition & 0 deletions
1
tests/complex/traci/trafficlight/setLogic_duration0/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/trafficlight/setLogic_duration0/runner.py |
Empty file.
42 changes: 42 additions & 0 deletions
42
tests/complex/traci/trafficlight/setLogic_duration0/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,42 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo | ||
# Copyright (C) 2023-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 | ||
# @date 2023-01-12 | ||
|
||
|
||
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 | ||
|
||
traci.start([sumolib.checkBinary('sumo'), "-c", "sumo.sumocfg"] + sys.argv[1:]) | ||
tlsID = "C" | ||
phases = [] | ||
phases.append(traci.trafficlight.Phase(5, "GGGggrrrrrGGGggrrrrr", 0, 0)) | ||
phases.append(traci.trafficlight.Phase(0, "rrrrrrrrrrrrrrrrrrrr", 0, 60)) | ||
logic = traci.trafficlight.Logic("custom", 0, 0, phases) | ||
step = 0 | ||
while traci.simulation.getMinExpectedNumber() > 0 or step < 180: | ||
if step == 10: | ||
traci.trafficlight.setProgramLogic(tlsID, logic) | ||
traci.trafficlight.setPhase(tlsID, 0) | ||
traci.simulationStep() | ||
step += 1 | ||
traci.close() |
44 changes: 44 additions & 0 deletions
44
tests/complex/traci/trafficlight/setLogic_duration0/statistics.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,44 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2023-06-06 07:37:12 by Eclipse SUMO sumo Version v1_17_0+0729-0f1b512 | ||
<configuration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> | ||
<input> | ||
<net-file value="input_net2.net.xml"/> | ||
<route-files value="input_routes.rou.xml"/> | ||
</input> | ||
<output> | ||
<statistic-output value="statistics.xml"/> | ||
</output> | ||
<processing> | ||
<time-to-teleport value="-1"/> | ||
<default.speeddev value="0"/> | ||
</processing> | ||
<report> | ||
<duration-log.disable value="true"/> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="55830"/> | ||
</traci_server> | ||
<gui_only> | ||
<window-size value="500,500"/> | ||
<window-pos value="50,50"/> | ||
</gui_only> | ||
</configuration> | ||
--> | ||
|
||
<statistics xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/statistic_file.xsd"> | ||
<performance clockBegin="1686029832.54" clockEnd="1686029832.58" clockDuration="0.03" traciDuration="0.00" realTimeFactor="2322.58" vehicleUpdatesPerSecond="0.00" personUpdatesPerSecond="0.00" begin="0.00" end="72.00" duration="72.00"/> | ||
<vehicles loaded="2" inserted="2" running="0" waiting="0"/> | ||
<teleports total="0" jam="0" yield="0" wrongLane="0"/> | ||
<safety collisions="0" emergencyStops="0" emergencyBraking="0"/> | ||
<persons loaded="0" running="0" jammed="0"/> | ||
<personTeleports total="0" abortWait="0" wrongDest="0"/> | ||
</statistics> |
33 changes: 33 additions & 0 deletions
33
tests/complex/traci/trafficlight/setLogic_duration0/sumo.sumocfg
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,33 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2024-06-12 18:31:59 by Eclipse SUMO sumo Version v1_20_0+0443-233e48e5c88 | ||
--> | ||
|
||
<sumoConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> | ||
|
||
<input> | ||
<net-file value="input_net2.net.xml"/> | ||
<route-files value="input_routes.rou.xml"/> | ||
<additional-files value="input_additional.add.xml"/> | ||
</input> | ||
|
||
<output> | ||
<statistic-output value="statistics.xml"/> | ||
</output> | ||
|
||
<processing> | ||
<time-to-teleport value="-1"/> | ||
<default.speeddev value="0"/> | ||
</processing> | ||
|
||
<report> | ||
<duration-log.disable value="true"/> | ||
<no-step-log value="true"/> | ||
</report> | ||
|
||
<gui_only> | ||
<window-size value="500,500"/> | ||
<window-pos value="50,50"/> | ||
</gui_only> | ||
|
||
</sumoConfiguration> |
45 changes: 45 additions & 0 deletions
45
tests/complex/traci/trafficlight/setLogic_duration0/tls_state.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,45 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<!-- generated on 2024-08-02 12:53:06 by Eclipse SUMO sumo Version v1_20_0+1519-a635611cf51 | ||
<sumoConfiguration xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/sumoConfiguration.xsd"> | ||
<input> | ||
<net-file value="input_net2.net.xml"/> | ||
<route-files value="input_routes.rou.xml"/> | ||
<additional-files value="input_additional.add.xml"/> | ||
</input> | ||
<output> | ||
<statistic-output value="statistics.xml"/> | ||
</output> | ||
<processing> | ||
<time-to-teleport value="-1"/> | ||
<default.speeddev value="0"/> | ||
</processing> | ||
<report> | ||
<duration-log.disable value="true"/> | ||
<no-step-log value="true"/> | ||
</report> | ||
<traci_server> | ||
<remote-port value="35435"/> | ||
</traci_server> | ||
<gui_only> | ||
<window-size value="500,500"/> | ||
<window-pos value="50,50"/> | ||
</gui_only> | ||
</sumoConfiguration> | ||
--> | ||
|
||
<additional xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://sumo.dlr.de/xsd/additional_file.xsd"> | ||
<tlLogic id="C" type="static" programID="0"> | ||
<phase duration="10.00" state="GGGggrrrrrGGGggrrrrr"/> | ||
</tlLogic> | ||
<tlLogic id="C" type="static" programID="custom"> | ||
<phase duration="170.00" state="GGGggrrrrrGGGggrrrrr"/> | ||
</tlLogic> | ||
</additional> |
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