I also think this could be handled fairly easy in a pre-processing script (which should be written in python to be eligble for inclusion in our tool suite).
Something that reads your description above and concatenates route edges and route stops into a single long route with all the stops.
You may need an extra attribute for each route that specifies the expected service period for that segment in order to shift the 'until' times forward on each concatenation.
Giving your requirements to a coding assistent and doing rigorous testing may already be sufficient.
Am Mi., 1. Juli 2026 um 20:31 Uhr schrieb Mirko Barthauer via sumo-user <sumo-user@xxxxxxxxxxx>:
Hi Sven,
it would be rather similar to the repeated loop concept in the
sense that it is merely some parsing/generating code before the
simulation starts. I imagine this is similar to what you do now
externally.
define / load shorter routes first
define a new route which refers to a sequence of previously
defined routes in a special attribute "concatenate" (maybe there
is a better name)
when parsing the route, check for the attribute
"concatenate"
look up the referred routes, return an error if they cannot
be found or cannot be joined through the common last/first
edge
otherwise get the edges of the routes and join, adapting
until values
Best regards,
Mirko
Am 01.07.2026 um 19:36 schrieb Sven:
Hi Mirko,
thank you for your response.
Im afraid looping and flows are not suited for my goal of
simulating persistent vehicles operating accoarding
to multi-line schedules.
Your Idea for a "conconation" attribute however sounds
very interesting.
How would that work? Could you elaborate on that?
If there is a way for me to implement a functionality like
that myself, id be very willing to put in the time.
Best regards
Sven
-------- Original Message --------
On Wednesday, 07/01/26 at 19:26 Mirko Barthauer via sumo-user
<sumo-user@xxxxxxxxxxx> wrote:
Hi Sven,
AFAIK there is currently no such thing like creating a new
route from 2+ arbitrary route building blocks internally or
even keeping a list of routes to take one after another. As
it seems just another way of defining routes, this may be
possible to implement. I'd rather define a new attribute
"concatenate" where the building blocks can be put so there
is no confusion whether there are routes and edges of the
same name.
However if you have bus services repeatedly serving the
same line (both directions), you can make it a looped route
(see docs). That
way you can define it once and then set the repeat attribute
(which internally will make sumo copy the route edges).
Best regards,
Mirko
Am 01.07.2026 um 17:40 schrieb
Sven via sumo-user:
Dear
SUMO-Community,
my
name is Sven, ive written here before, a few weeks ago. I
have since continued to work on a project concerning the
charging behaviour of electric buses.
Many
thanks to Moritz Schweppenhäuser, i really like your work
and your scenario is very helpful to me.
However,
i seem to have hit a blockade within my own approach of
simulating.
While
SUMO provides routes, flows and some interaction via
TraCI, there seems to be no supported way of having
vehicles use what id call "modular routes".
For
my bus-simulation, it would be ideal to have vehicles
perform their service one route after another, by
providing a list of pre-defined routes, to then have a vehicle perform multiple of these, one after another:
My current plan is to generate new routes from these partial-routes beforehand, but this requieres a lot of effort, of calculating possible combinations, and "until" values, for potentially many hundred routes.
I am therefore asking, wether there are more convinient ways to achive what im planning, or if such a feature could potentially be implemented sometime.