Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Output (files) values from TraCI

Great! Thank you, Harald.

I had no idea xml2csv is able to read streams!

Cheers,
Lara


On Mon, Sep 30, 2019 at 3:38 PM Harald Schaefer <fechsaer@xxxxxxxxx> wrote:
>
> Hello Lara,
>
> xml2csv.py is an example of a python script, which can read sockets
>
> Regards, Harald
>
> Am 30.09.19 um 11:18 schrieb Lara Codeca:
> > Thank you, Jakob.
> >
> > I'm going to try to use the sockets option. Are there examples? I
> > cannot find any. Is the format exactly like the XML file?
> >
> > Thank you again,
> > Lara
> >
> > On Fri, Sep 27, 2019 at 8:03 PM Jakob Erdmann <namdre.sumo@xxxxxxxxx> wrote:
> >> Hello Lara,
> >> It wouldn't be too difficult to retrieve data from the tripinfo- and vehroute-device by extending the vehicle.getParameter API (https://sumo.dlr.de/docs/TraCI/Vehicle_Value_Retrieval.html#supported_device_parameters)
> >> However, your requirement to get these values when the vehicle exits the simulation is hard to achieve because this also triggers cleanup of the devices.
> >> I think the easiest way to get these values at runtime is supply a socket address instead of an output file for each of these output options and then have your script read from these sockets. (https://sumo.dlr.de/docs/Basics/Using_the_Command_Line_Applications.html#writing_files)
> >>
> >> regards,
> >> Jakob
> >>
> >>
> >> Am Fr., 27. Sept. 2019 um 19:39 Uhr schrieb Lara Codeca <lara.codeca@xxxxxxxxx>:
> >>> Dear All,
> >>>
> >>> I need to retrieve the same info that can be dumped in the following files:
> >>> * https://sumo.dlr.de/docs/Simulation/Output/TripInfo.html
> >>> * https://sumo.dlr.de/docs/Simulation/Output/VehRoutes.html
> >>> * https://sumo.dlr.de/docs/Simulation/Output/StopOutput.html
> >>>
> >>> but I need it to be done during the simulation when the vehicle/person
> >>> exits the simulation.
> >>> Is there a way to do it using TraCI without having to subscribe to all
> >>> the vehicles+people and compute them all by myself? This solution
> >>> would not scale, and I need like to keep consistency with sumo for all
> >>> the retrievable stats. For example, the timeLoss must be the same in
> >>> the sumo output and in my results.
> >>>
> >>> Any Ideas? I cannot find any API that would help me in doing this, but
> >>> I'm willing to try to implement new ones if it's feasible.
> >>>
> >>> All the Best,
> >>> Lara
> >>> _______________________________________________
> >>> sumo-user mailing list
> >>> sumo-user@xxxxxxxxxxx
> >>> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> >>> https://www.eclipse.org/mailman/listinfo/sumo-user
> >> _______________________________________________
> >> sumo-user mailing list
> >> sumo-user@xxxxxxxxxxx
> >> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> >> https://www.eclipse.org/mailman/listinfo/sumo-user
> > _______________________________________________
> > sumo-user mailing list
> > sumo-user@xxxxxxxxxxx
> > To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> > https://www.eclipse.org/mailman/listinfo/sumo-user
> >
>
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user


Back to the top