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-2019 German Aerospace Center (DLR) and others.
# This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v2.0
# which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v20.html
# SPDX-License-Identifier: EPL-2.0

 
Modules
       
traci._edge
traci._gui
traci._inductionloop
traci._junction
traci._lane
traci._lanearea
traci._multientryexit
traci._person
traci._poi
traci._polygon
traci._route
traci._simulation
traci._trafficlight
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)
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()
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)
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')
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)
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>
multientryexit = <traci._multientryexit.MultiEntryExitDomain 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)
route = <traci._route.RouteDomain instance>
simulation = <traci._simulation.SimulationDomain instance>
trafficlight = <traci._trafficlight.TrafficLightDomain instance>
vehicle = <traci._vehicle.VehicleDomain instance>
vehicletype = <traci._vehicletype.VehicleTypeDomain instance>