I understand Michael, that's fine. Danke
François -----Message d'origine----- De : Michael Behrisch [mailto:[email protected]] Envoyé : 12 juin 2015 02:07 À : François Vaudrin Cc : [email protected] Objet : Re: [sumo-user] RE : How to import result tools in Traci script runner.py ? Hi François, if you just want to have total emissions and / or travel times, TraCI is not the way to go, you should rather use meandata outputs such as described here: http://sumo.dlr.de/wiki/Simulation/Output#values_for_edges_or_lanes Those create XML files with values already aggregated over time and for a whole edge. There are no functions / outputs to get the values for the whole net though (neither in XML nor in TraCI). You need to add them by yourself :-) Regards, Michael Am 11.06.2015 um 16:18 schrieb François Vaudrin: > Danke Michael, > > It seems to work well (it recognizes sumolib). So when I want to use this > tool, I only have to call the function directly (as in the traci module). Do > I understand well ? > > For example if I want to calculate the CO2 emission during simulation is > there a function like getCO2Emission(edgeID) for all edges and for the > duration of the whole simulation? I guess it exists a function like > getTravelTimeMean for all edges and for for the duration of the whole > simulation but I have not found. > > Regards > > François > ________________________________________ > De : Michael Behrisch [[email protected]] Date d'envoi : > 11 juin 2015 01:53 À : François Vaudrin Cc : > [email protected] Objet : Re: [sumo-user] How to import > result tools in Traci script runner.py ? > > Hi Francois, > the script you mention is not meant to be imported but to be called > separately. In any case the error means your python path is not set > correctly, see http://sumo.dlr.de/wiki/Tools/Sumolib > > Regards, > Michael > > Am 11.06.2015 um 02:44 schrieb François Vaudrin: >> Hello, >> >> Probably a trivial question but how does one incorporate the results in a >> Traci script. For example, if I want to put >> generateITetrisIntersectionMetrics.py in runner.py where do I call it and >> how? >> >> If I write import generateITetrisNetworkMetrics in runner.py I get this >> error message: >> ImportError: No Module named sumolib.net .... (line 24 in >> generateITetrisNetworkMetrics.py) >> >> Thank you >> >> François >> >> ----------------------------------------- >> >> import generateITetrisNetworkMetrics >> >> def run(): >> >> ??? generateITetrisNetworkMetrics ??? >> >> """execute TraCI "" >> traci.init(PORT) >> step = 0 >> while step < 2000: >> traci.simulationStep() >> >> >> …. MY_CODE ….. >> >> step =step+ 1 >> >> --------------------------------------------------------------------- >> --------- _______________________________________________ >> sumo-user mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/sumo-user >> > > > ---------------------------------------------------------------------- > -------- _______________________________________________ > sumo-user mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/sumo-user > ------------------------------------------------------------------------------ _______________________________________________ sumo-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/sumo-user
