diff --git a/tests/complex/traci/vehicle/setLcContRight/errors.complex b/tests/complex/traci/vehicle/setLcContRight/errors.complex new file mode 100644 index 00000000000..e69de29bb2d diff --git a/tests/complex/traci/vehicle/setLcContRight/input_routes.rou.xml b/tests/complex/traci/vehicle/setLcContRight/input_routes.rou.xml new file mode 100644 index 00000000000..152ac570638 --- /dev/null +++ b/tests/complex/traci/vehicle/setLcContRight/input_routes.rou.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/tests/complex/traci/vehicle/setLcContRight/options.complex b/tests/complex/traci/vehicle/setLcContRight/options.complex new file mode 100644 index 00000000000..81ec592182d --- /dev/null +++ b/tests/complex/traci/vehicle/setLcContRight/options.complex @@ -0,0 +1 @@ +tests/complex/traci/vehicle/setLcContRight/runner.py diff --git a/tests/complex/traci/vehicle/setLcContRight/output.complex b/tests/complex/traci/vehicle/setLcContRight/output.complex new file mode 100644 index 00000000000..f9cd08578b1 --- /dev/null +++ b/tests/complex/traci/vehicle/setLcContRight/output.complex @@ -0,0 +1,3 @@ + Retrying in 1 seconds +1.0 1fi_0 +23.0 1si_0 diff --git a/tests/complex/traci/vehicle/setLcContRight/runner.py b/tests/complex/traci/vehicle/setLcContRight/runner.py new file mode 100755 index 00000000000..a81fe79eef6 --- /dev/null +++ b/tests/complex/traci/vehicle/setLcContRight/runner.py @@ -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() diff --git a/tests/complex/traci/vehicle/testsuite.complex b/tests/complex/traci/vehicle/testsuite.complex index 1197d019834..f9d1790002c 100644 --- a/tests/complex/traci/vehicle/testsuite.complex +++ b/tests/complex/traci/vehicle/testsuite.complex @@ -109,6 +109,7 @@ setEmissionClass # test speed response curve on setting speedFactor setSpeedFactor_IDM +setLcContRight getFollower getLeader