In sumo, each vehicle (identified by it's "id" ) has only one route. You
cannot re-use the same id before this vehicle has left the simulation.
However, you can concatenate routes into one big route.
If you need to string together a series of routes while still keeping the
output separate (i.e. a tripinfo output for each part) and you must ensure
that the next route only starts after the first route has ended then you
could define a person with a sequence of rides (
https://sumo.dlr.de/docs/Specification/Persons.html)

Alternatively, you can use sumolib to find the edges. See
https://sumo.dlr.de/docs/Tools/Sumolib.html#locate_nearby_edges_based_on_the_geo-coordinate

Am Do., 27. Aug. 2020 um 19:28 Uhr schrieb Chris Abraham <
[email protected]>:

> Thanks Jakob, it worked. However, the problem is that Duarouter creates
> *one* route from *all* the GPS coordinates. I want each subsequent pair of
> gps coordinates to generate a *new route*, but with the same vehicle. Is it
> possible?
>
> Alternatively, is there a way for me to convert GPS coordinates to sumo
> edges from within Python? That way, I can construct my routes with a python
> xml-library, rather than using duarouter.
>
> Chris
>
> On Tuesday, 25 August 2020 13:22 Jakob wrote:
> > Duarouter should create exactly one vehicle (including a route) per input
> > trip. So if you define one trip per GPS trace it should work as expected
> > (all coordinates except start and end would be in viaLonLat). Note, that
> > the current approach of building routes from coordinates is quite
> sensitive
> > to data errors (you may get better results if you do not include
> > coordinates that are very close to each other).
> >
> > Am Di., 25. Aug. 2020 um 08:52 Uhr schrieb Chris Abraham <
> > [email protected]>:
> >
> > > Hi all,
> > >
> > > I am trying to define a vehicle in SUMO using GPS trace data. I have
> GPS
> > > datapoints of a vehicle, measured at 1 minute intervals (***EDIT***,
> 27
> > > Aug: I have used a clustering algorithm to get gps-coordinates of the
> > > vehicle's orgins and destinations). I want `duarouter` to
> automatically
> > > route between each of the datapoints to create 1 long route file.
> > >
> > > I tried creating multiple `trip` definitions with `fromLonLat`,
> `toLonLat`
> > > and `viaLonLat` attributes and passing these trip definitions to
> > > `duarouter`. However, this caused multiple routes to be generated,
> rather
> > > than one single route.
> > >
> > > I hope someone knows the correct approach.
> > >
> > > Chris
> > > _______________________________________________
> > > 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

Reply via email to