Hello, traci.start() assumes that sumo will be started by the script on the local computer (it picks a random free port for that). If the traci client is on a different computer from the sumo simulation you must take these steps - select a port number (i.e. 9000) - start the simulation on one computer (assume this is called 'computer1') by calling sumo with option --remote-port 9000 - in the traci client script call traci.init(port=9000, host="computer1")
regards, Jakob 2018-04-01 23:14 GMT+02:00 Sagaama Insaf <sagaama.in...@gmail.com>: > Dear all, > I want to make each vehicle in SUMO receives a TCP packet from an external > Server. > > I have implemented this Python Script : > *import traci* > *traci.start(sumoCmd) * > > *while traci.simulation.getMinExpectedNumber() > 0: * > * for veh_id in traci.vehicle.getIDList():* > * position = traci.vehicle.getSpeed(veh_id)* > * print(veh_id)* > * print(traci.vehicle.getRoute(veh_id))* > * traci.vehicle.setRoute("veh0", ["44468929", "189216027", "371230575", > "167920445"])* > * traci.close()* > *sys.stdout.flush()* > > This error is raising : > Could not connect to TraCI server at localhost:57613 [Errno 10061] No > connection could be made because the target machine actively refused it > Retrying in 1 seconds > What is the problem ? Can you help me please ? > > Thanks. > > > > > -- > > My Best Regards, > SAGAAMA Insaf. > > PhD student at CRISTAL Lab, RAMSIS Pole, ENSI- Tunisia. > ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ sumo-devel mailing list sumo-de...@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/sumo-devel _______________________________________________ sumo-dev mailing list sumo-dev@eclipse.org To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/sumo-dev