See https://sumo.dlr.de/docs/TraCI.html#sumo_startup <https://sumo.dlr.de/docs/TraCI.html#sumo_startup> . Do you use the --start option?

Mirko

Am 19.04.2021 um 12:24 schrieb ali mirzaei:
Hi everyone,
I don't know why I am not able to run my file from python while it works normally from GUI.
Here is my simple code:

*/

 1. */if 'SUMO_HOME' in os.environ:/*
 2. */     tools = os.path.join(os.environ['SUMO_HOME'], 'tools')/*
 3. */     sys.path.append(tools)/*
 4. */else:/*
 5. */     sys.exit("please declare environment variable
    'SUMO_HOME'")from sumolib import checkBinary/*
 6. */from sumolib import checkBinary /*
 7. */sumoBinary = checkBinary('sumo-gui')/*
 8. */sumoCmd = [sumoBinary, "-c", "ali_trace.sumocfg"]/*
 9. */import traci/*
10. */traci.start(sumoCmd)/*
11. */step = 0/*
12. */while step < 100:/*
13. */ traci.simulationstep()/*
14. */step += 1/*
15. */traci.close()/*

/*
The GUI is opened but nothing is shown as expected simulation. Just these messages are added at the bottom of GUI:

****Starting server on port 6269 ****
*Loading net-file from 'D:\ali mirzaei\app\my_sumo\ali_trace.net.xml' ... done (3ms).*
*Loading *is done*.*
*Simulation started with time: 0.00*
*//*
I would be thankful if one can help me.
Regards,
Ali

_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user
_______________________________________________
sumo-user mailing list
[email protected]
To unsubscribe from this list, visit 
https://www.eclipse.org/mailman/listinfo/sumo-user

Reply via email to