Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Way to execute code at each junction?

Dear Sir,
Following is the code in Traci :

for i in range(3000):    #  or whatever nulmber of steps you want to simulate
        traci.simulationStep()
        -----------------Here : 1
    traci.close()
    sys.stdout.flush()


-----------------Here : 1 Can we write a function here so that it will execute at each Junction?

Means 
If (VehicleX is at JunctionX)
{
    Call a Function To Find_Next_Edge() which vehicle can take
}
Else
{
    Move on the same edge.
}


--
:)
Bijal Varia

Back to the top