traci.main
index
/home/delphi/gcc/sumo/tools/traci/main.py

# -*- coding: utf-8 -*-
# Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo
# Copyright (C) 2008-2020 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

 
Modules
       
traci._busstop
traci._calibrator
traci._chargingstation
traci._edge
traci._gui
traci._inductionloop
traci._junction
traci._lane
traci._lanearea
traci._meandata
traci._multientryexit
traci._overheadwire
traci._parkingarea
traci._person
traci._poi
traci._polygon
traci._rerouter
traci._route
traci._routeprobe
traci._simulation
traci._trafficlight
traci._variablespeedsign
traci._vehicle
traci._vehicletype
os
socket
subprocess
sumolib
sys
time
warnings

 
Functions
       
addStepListener(listener)
addStepListener(traci.StepListener) -> int
 
Append the step listener (its step function is called at the end of every call to traci.simulationStep())
to the current connection.
Returns the ID assigned to the listener if it was added successfully, None otherwise.
close(wait=True)
connect(port=8813, numRetries=10, host='localhost', proc=None, waitBetweenRetries=1)
Establish a connection to a TraCI-Server and return the
connection object. The connection is not saved in the pool and not
accessible via traci.switch. It should be safe to use different
connections established by this method in different threads.
getConnection(label='default')
getLabel()
getVersion()
hasGUI()
init(port=8813, numRetries=10, host='localhost', label='default', proc=None)
Establish a connection to a TraCI-Server and store it under the given
label. This method is not thread-safe. It accesses the connection
pool concurrently.
isLibsumo()
isLoaded()
load(args)
load([optionOrParam, ...])
Let sumo load a simulation using the given command line like options
Example:
  load(['-c', 'run.sumocfg'])
  load(['-n', 'net.net.xml', '-r', 'routes.rou.xml'])
removeStepListener(listenerID)
removeStepListener(traci.StepListener) -> bool
 
Remove the step listener from the current connection's step listener container.
Returns True if the listener was removed successfully, False if it wasn't registered.
setConnectHook(hookFunc)
setLegacyGetLeader(enabled)
setOrder(order)
simulationStep(step=0)
Make a simulation step and simulate up to the given second in sim time.
If the given value is 0 or absent, exactly one step is performed.
Values smaller than or equal to the current sim time result in no action.
start(cmd, port=None, numRetries=10, label='default', verbose=False, traceFile=None, traceGetters=True, stdout=None)
Start a sumo server using cmd, establish a connection to it and
store it under the given label. This method is not thread-safe.
switch(label)

 
Data
        absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)
busstop = <traci._busstop.BusStopDomain instance>
calibrator = <traci._calibrator.CalibratorDomain instance>
chargingstation = <traci._chargingstation.ChargingStationDomain instance>
edge = <traci._edge.EdgeDomain instance>
gui = <traci._gui.GuiDomain instance>
inductionloop = <traci._inductionloop.InductionLoopDomain instance>
junction = <traci._junction.JunctionDomain instance>
lane = <traci._lane.LaneDomain instance>
lanearea = <traci._lanearea.LaneAreaDomain instance>
meandata = <traci._meandata.MeanDataDomain instance>
multientryexit = <traci._multientryexit.MultiEntryExitDomain instance>
overheadwire = <traci._overheadwire.OverheadWireDomain instance>
parkingarea = <traci._parkingarea.ParkingAreaDomain instance>
person = <traci._person.PersonDomain instance>
poi = <traci._poi.PoiDomain instance>
polygon = <traci._polygon.PolygonDomain instance>
print_function = _Feature((2, 6, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 65536)
rerouter = <traci._rerouter.RerouterDomain instance>
route = <traci._route.RouteDomain instance>
routeprobe = <traci._routeprobe.RouteProbeDomain instance>
simulation = <traci._simulation.SimulationDomain instance>
trafficlight = <traci._trafficlight.TrafficLightDomain instance>
variablespeedsign = <traci._variablespeedsign.VariableSpeedSignDomain instance>
vehicle = <traci._vehicle.VehicleDomain instance>
vehicletype = <traci._vehicletype.VehicleTypeDomain instance>