Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Finding the Size of Individual Platoons

If you mean platoons using simpla, then yes. Iterate trough platoons using simpla.getPlatoonIDList and simpla.getPlatoonInfo like this:

 

platoonIDs = simpla.getPlatoonIDList()

for platoonID in platoonIDs:

    platoonInfo = simpla.getPlatoonInfo(platoonID)

    platoonSize = len(platoonInfo["members"])

 

 

 

-----Original-Nachricht-----

Betreff: [sumo-user] Finding the Size of Individual Platoons

Datum: 2023-03-14T07:29:39+0100

Von: "Zedric Banger II (zbanger)" <zbanger@xxxxxxxxxxx>

An: "sumo-user@xxxxxxxxxxx" <sumo-user@xxxxxxxxxxx>

 

 

 

Is there a way to keep track of the size of platoons in a simulation? For example, there are three platoons, the first is 3 cars, seconds is 5, and the last one is 7. I want to display the size of each one separately. 


Back to the top