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
