Hi, the error is in your run method: Am 18.03.2018 um 20:21 schrieb Pravin Ghorpade:
> def run():
>
> while traci.simulation.getMinExpectedNumber() > 0:
> traci.simulationStep()
> print("hello")
> print(traci.poi.getColor("1"))
> print(traci.poi.setColor("1",[0,0,255,255]))
> print(traci.poi.getColor("2"))
> print(traci.poi.setColor("2",[255,0,0,255]))
>
> print(traci.vehicle.getIDList())
>
> vehicles = traci.simulation.getDepartedIDList()
> print("ID of vehicles are:")
> for i in range(len(vehicles)):
> print(vehicles[i])
>
>
> print(traci.vehicle.getSpeed("left_0")) #error vehicle not known
All the action needs to take place inside of the while loop (because
that is when the simulation is running) not after the while loop has
finished.
Best regards,
Michael
signature.asc
Description: OpenPGP digital signature
_______________________________________________ sumo-user mailing list [email protected] To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-user
