ah, that's why it doesn't work when the scenario is too small. Thanks for the explanation, a very big help to understand my problem. I will look into flush() function in Python.
Thanks, Sasan On Mon, Jun 29, 2020 at 12:19 PM Michael Behrisch <[email protected]> wrote: > Hi Sasan, > those buffers are usually not time triggered but are flushed to the > output when they reached a certain amount of data. > You may try to add some calls to flush() in the xml2csv script and also > on the sumo side. > > Best regards, > Michael > > Am 2020-06-29 10:50, schrieb Sasan Amini: > > Hi Michael, > > > > It is actually buffering because the csv file is written when I close > > the > > simulation. However, the buffer time is infinite! even the column names > > are > > not written before the simulation (the connection with traci) is > > closed. > > The surprising fact is that the buffer time for a much larger scenario > > with > > many more links is about 0.07 seconds. Could it be anything else? > > > > Thanks, > > Sasan > > > > On Sat, Jun 27, 2020 at 10:33 PM Michael Behrisch <[email protected]> > > wrote: > > > >> Hi Sasan, > >> is it still empty after the simulation finished / got closed? If not, > >> it > >> might be simply buffering. > >> > >> Best regards, > >> Michael > >> > >> Am 24.06.20 um 11:19 schrieb Sasan Amini: > >> > Hi, > >> > I am using xml2csv.py to read the laneData during the simulation. It > >> > works totally fine for a big scenario, but when I use the same > >> > configuration on a very small scenario, the CSV file remains empty > >> > until the traci connection is closed. Is there some hidden feature > that > >> > I am not seeing when using socket and xml2csv.py? > >> > > >> > Thanks, > >> > Sasan > >> > > >> > _______________________________________________ > >> > 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 > >> > > > > _______________________________________________ > > 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
