How to use the libsumo.simulation.getMinExpectedNumber function in libsumo

To help you get started, we’ve selected a few libsumo examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github eclipse / sumo / tests / complex / traci / pythonApi / rerouting / person / stop_walk_stop_walk / runner.py View on Github external
"--default.speeddev", "0",
    "--no-step-log"]
traci.start(cmd)


def step():
    s = traci.simulation.getTime()
    traci.simulationStep()
    return s


p = "p0"
s = step()
s = step()

while traci.simulation.getMinExpectedNumber() > 0:
    if s == 10:
        traci.person.rerouteTraveltime("p0")
    s = step()


traci.close()

libsumo

The python version of the libsumo API to communicate with the traffic simulation Eclipse SUMO

EPL-2.0
Latest version published 2 months ago

Package Health Score

87 / 100
Full package analysis

Similar packages