Path: blob/main/tests/netedit/basic/quit/no_saving/meandatas/test.py
169715 views
#!/usr/bin/env python1# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2# Copyright (C) 2009-2025 German Aerospace Center (DLR) and others.3# This program and the accompanying materials are made available under the4# terms of the Eclipse Public License 2.0 which is available at5# https://www.eclipse.org/legal/epl-2.0/6# This Source Code may also be made available under the following Secondary7# Licenses when the conditions for such availability set forth in the Eclipse8# Public License 2.0 are satisfied: GNU General Public License, version 29# or later which is available at10# https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later1213# @file test.py14# @author Pablo Alvarez Lopez15# @date 2016-11-251617# import common functions for netedit tests18import os19import sys2021sys.path.append(os.path.join(os.environ.get("SUMO_HOME", "."), "tools"))22import neteditTestFunctions as netedit # noqa2324# Open netedit25neteditProcess, referencePosition = netedit.setupAndStart()2627# Change to create mode28netedit.changeMode("createEdge")2930# Create two nodes31netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left)32netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right)33netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.right)34netedit.leftClick(referencePosition, netedit.positions.network.junction.cross.left)3536# go to additional mode37netedit.changeMode("additional")3839# select busStop40netedit.changeElement("additionalFrame", "busStop")4142# create busStop in mode "reference left"43netedit.leftClickOffset(referencePosition, netedit.positions.network.junction.cross.center, 0, 20)4445# go to demand mode46netedit.changeSupermode("demand")4748# go to route mode49netedit.changeMode("route")5051# create route using three edges52netedit.leftClickOffset(referencePosition, netedit.positions.network.junction.cross.center, 0, 20)5354# press enter to create route55netedit.typeKey("enter")5657# Go to data supermode58netedit.changeSupermode("data")5960# change to edgeData61netedit.changeMode("edgeData")6263# create dataSet64netedit.createDataSet()6566# create data interval67netedit.createDataInterval()6869# create edgeData70netedit.leftClickOffset(referencePosition, netedit.positions.network.junction.cross.center, 0, 20)7172# change to edgeData73netedit.changeMode("meanData")7475# create mean data76netedit.createMeanData()7778# quit netedit without saving demand79netedit.quit(neteditProcess, True, True, True, True, True, True, True, True, True, False)808182