Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[config-dev] Question about TraCI usage for Taxi Simulation in SUMO

I want to ask some questions about the usage of TraCI in sumo 1.13.

  1. What should be included in "def run():"? Should I restate about the things that I already state in route files (ex: the action where person are reserve a taxi then taxi will pick them up)? Or I could just do this code for my "def run():"

[---beginning of the code---]
def run():
"""execute the TraCI control loop"""
step = 0
while step < 87000:
traci.simulationStep()
#if traci.inductionloop.getLastStepVehicleNumber("0") > 0:
# traci.trafficlight.setRedYellowGreenState("0", "GrGr")
step += 1
traci.addStepListener(traci.StepListener)
traci.close()
sys.stdout.flush()
[---end of code---]

  1. Then if I want to do "def dist_to_edge", "def rebalance", and "def_strategy" to assign the movement of taxis where taxis should go to any free parking area when they have finished to drop off the passenger and haven't been assigned to another passenger (idling)? or is there any code examples that I could learn about the usage of TraCI for this case?

I am currently using the sumo 1.13 version in windows

thank you in advance


Back to the top