Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Edge-List is expanding unnecessarily when I reroute via traci.
  • From: <Maria.Armellini@xxxxxx>
  • Date: Fri, 6 Nov 2020 09:29:04 +0000
  • Accept-language: de-DE, en-US
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • Ironport-phdr: 9a23:8TBlSBDyJ6VqmiM1gqzkUyQJP3N1i/DPJgcQr6AfoPdwSPT9pcbcNUDSrc9gkEXOFd2Cra4d1KyP6/GrATBIyK3CmUhKSIZLWR4BhJdetC0bK+nBN3fGKuX3ZTcxBsVIWQwt1Xi6NU9IBJS2PAWK8TW94jEIBxrwKxd+KPjrFY7OlcS30P2594HObwlSizexfLF/IA+roQnNssQajpduJ6kswRbVv3VEfPhby3l1LlyJhRb84cmw/J9n8ytOvv8q6tBNX6bncakmVLJUFDspPXw7683trhnDUBCA5mAAXWUMkxpHGBbK4RfnVZrsqCT6t+592C6HPc3qSL0/RDqv47t3RBLulSwKMSMy/mPKhcxqlK9VoAyvqQFjw4DaY4+VOvhxfqLBctwVXmdORNpdVy5bD4+gc4cCDewMNvtYoYnnoFsOqAOzCA6rCuz10D9Ih2X50bcm3uQ7FAHJwgggH9YPsHTSrdX4L7odUeSvzKXS0DrMcepb1DHg44fHbh4vu+uDXa5sccXP00kvERvIg1SOpIH7Iz+Y2esDvnWb4eRvVu+ilm8qpgVvrzWu2MohlJTFip8Wx13H6Cl0wJo4KMOlRUN/Y9OqEIZcui+bOoZwX8gsTWZouCMgxb0Hv562ZDUFyJA9xxLFdvOIbY6F6Q/gWuaJOTp0mW5pdKiiixux/kWs0PDwW8e33VpQsCZIncHAum0P2hDN8MSLVOZx8l281TuN1g3f8PxILEYpnqTBMZEh2KQ/lp8LvETGGS/5hVv5gbeNdkUh5uio8+PnYqj6ppOEN497lAX+MqM2l8KxB+o2PAcAUWib9+q717Pt+lf3TKtFg/M5k6bUrorWJcUdpq6lGQ9ayJwv5Au7Dze8ytgXgGcIIEpEeBKBkYfpJ0nDLO3kAfulnlihkzhmy+rbMrDvAZjBNGbPnbj5cbZ48UFcyQ4zzd5F55JTD7EMOPX9VVXrtNzZFBA1KRC5w/ziCNpj0oMeXWOPAqmYMK7JrFCI4vgvL/ORa4ALoDr9MeQq5+byjX8lnl8QZbKp3YYSaHC/B/hmPl6ZbmT2gtoaD2gFog4+TO3yiF2ZTzFffXGyX7gz5mJzNIXzWZzeQ4fonaeMxg+2FZlXfntLTFeWHiG7WZ+DXqJYTSuII8YnuyYBWLylSokg/R2qrkn2xuw0faLv5iQEuMe7h5BO7OrJmERq+A==
  • Ironport-sdr: jSKHqKAJ9nA6by6/q9U9A4q6qcWGNUaXf6jL8VXFC+RlFoLb59S2oxbFyZ8srGMbmyODDzoQ4W 5AkEaqgj0LSg==
  • List-archive: <https://www.eclipse.org/mailman/private/sumo-user>
  • List-help: <mailto:sumo-user-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/sumo-user>, <mailto:sumo-user-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHWtBuDFMoLKStJ2UOUtQ2eIcpjRam61GOA
  • Thread-topic: [sumo-user] Edge-List is expanding unnecessarily when I reroute via traci.

Hi Valentin,

 

maybe you can try with setRouteID. First you will need to search the edges of the new route, which you can do with findRoute. See https://sumo.dlr.de/docs/TraCI/Change_Vehicle_State.html and https://sumo.dlr.de/docs/TraCI/Simulation_Value_Retrieval.html

 

Regards,

Giuliana

 

 

Von: sumo-user-bounces@xxxxxxxxxxx <sumo-user-bounces@xxxxxxxxxxx> Im Auftrag von Valentin Klamka
Gesendet: Donnerstag, 5. November 2020 15:44
An: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Betreff: [sumo-user] Edge-List is expanding unnecessarily when I reroute via traci.

 

Hi,

I use Sumo Version 1.3.1

So basically I want to drive back and forth:

            if (traci.vehicle.getRoadID(vehicle) =='gneE28'):
                traci.vehicle.changeTarget(vehicle,'gneE11')
            if (traci.vehicle.getRoadID(vehicle) =='gneE11'):
                traci.vehicle.changeTarget(vehicle,'gneE28')
               

when I print (traci.vehicle.getRoute(vehicle)) I see that the Edges-List gets longer, the longer the simulation runs. But to save space I only want to save the edges which I need to reach the destination. I tried traci.vehicle.setRoute(vehicle,traci.vehicle.getRoadID(vehicle)) to reset the route, but it only appends the new edge to the previously traveled route. Is there a way to reset the route? If not, what is the reason behind it?

Best,

Valentin


Back to the top