Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Modifying the SUMO network at runtime
  • From: Michael Behrisch <oss@xxxxxxxxxxx>
  • Date: Fri, 19 Apr 2019 20:46:49 +0200
  • Autocrypt: addr=oss@xxxxxxxxxxx; prefer-encrypt=mutual; keydata= mQGiBFLSvucRBACGsasS4GeIWs1CFNTOYmp3ScQ2ZTJLJWQxhPliwtHTzLsErYu9Y7e8qDov iHFviYyaNuceUNoACm1e4MT4eu0DmM2Wk3y/jjD6hfm7L0EZNPxQhj+CJf2oZAm2ezCe7/si xZ2d7TCO8yWavOGbF0EVi/ZDIJqVgupu6WBpv/NCewCg65HQiS1wm+1w1MdFYxKCmXzbv08D /iWXX3tzabbCrLlUum8hBgBpJEHRtlic2uaGsKm8Fize4tfLZkTBbTYLYXfcx2Oq9+lINPTW h9jnbCjAjErRWLTjNTQjel0JnDryCnqabub/R3wScR/EHRDBeS9L6YRj0xdVd2qIaArtSYRR auKPNc4M2qZNEFSM37cXC7avhpdeA/99oJf4qyVly4RxHmekAmj9UJjRx17x9xX8t9uzUuSt AeTh+kQ3o5jK7veU6/F/+pPyi96EOzym9BJA8pgXC8hLWNjOajI10filkdQ26QsfHOpUdPSZ 4Duyw9Ayj8loagEnnAONmU/xE0QlyVBANIut0W+SNqPScYXfnBbVOaG3HbQiTWljaGFlbCBC ZWhyaXNjaCA8b3NzQGJlaHJpc2NoLmRlPohjBBMRAgAjBQJS0sHSAhsjBwsJCAcDAgEGFQgC CQoLBBYCAwECHgECF4AACgkQPBD+ltFwpimlmQCdGgnYuHxoye4vFntyHRcE0Ij0318AoN3s szGyKcKdUmPpgXLhFcNfRGe4uQENBFLSvucQBACRAt3OW7eL8N3OJp2bZz/rRldtxjcViEcd +wpQcL9Ag0b6W7e4cbSc9oSU9MAdOvxR0UxualeRGz37W/VEC8cFZb3kFtRdl66gGygKb7gl 2S27495XEYqE7BBF1HfQDjL9sh5GfuIzORkqhCHSUTdkRuzRPxNQcEYFSrASEi9jQwADBQP9 FeuTC1SJHrX9tP3p4xrEa07XkCq+UzwNhDdezoQfT1CUbOv+LT66yLTXAaiHXelgaPMQO1Oo 76U2z0C1LudkAcDdwJbMuZ0RfDoRjsgfhfvM6kqiP4m0s2NR3Y3O+HKXjwtPbXuDwaYIAIvp aj8b59n7fQyfL6BZsO0QZc0i/t+ISQQYEQIACQUCUtK+5wIbDAAKCRA8EP6W0XCmKY1lAKCc 3miJueOXuvZJWV7qGBQxxyR83gCgxhGPL9OrP22rxNJSo1w5OOUxHsM=
  • Delivered-to: sumo-user@xxxxxxxxxxx
  • 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>
  • Openpgp: preference=signencrypt
  • User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1

Hi Linwood,
there is one drawback, which is the usage of the binary output format
but since we do want to deprecate this one anyway, I think you could go
forward.

Best regards,
Michael

Am 18.04.19 um 18:24 schrieb Linwood Hudson:
> Hi Jakob,
> 
> I have implemented your suggestion to use SUMO's save and reload process
> to account for network modifications at runtime. It mostly works, but
> I'm seeing issues when I add new edges and lanes into the network in
> between the save and reload. In that case, my vehicles don't restart on
> the lanes I expect them to.
> 
> (For a little background, I have built a process to create new edges and
> lanes inside water polygons, so I can simulate boats moving around in a
> lake or ocean without relying on waterways from OSM. So I import an OSM
> map to create an initial network, launch SUMO on it, then kick off my
> water-network builder which process XML node and edge files, which I
> merge into the original network using netconvert. This process adds new
> edges and lanes based on the water mesh it built. I hope to use the save
> and reload to pickup these new water edges without completely restarting
> my simulation).
> 
> When I look in the save-state XML file, SUMO is saving out actual lane
> IDs, but when I look at the reload code (MSStateHandler.cpp, method
> myStartElement, case SUMO_TAG_LANE), it seems to rely on the index of
> the edges and lanes being the same as they were when the file was
> written. If any edges or lanes get added to the network after save,
> things get out of order.
> 
> Would it be possible to use the edge and lane IDs directly to look up
> those items instead of relying on indexes? Then the reload process would
> be more resilient and could better handle added/reordered/deleted edges
> and lanes. I'm about to experiment with that change but wanted to see if
> there were any gotchas.
> 
> Thanks
> Linwood
> 
> 
> Date: Tue, 5 Mar 2019 23:02:09 +0100
> From: Jakob Erdmann <namdre.sumo@xxxxxxxxx <mailto:namdre.sumo@xxxxxxxxx>>
> To: Sumo project User discussions <sumo-user@xxxxxxxxxxx
> <mailto:sumo-user@xxxxxxxxxxx>>
> Subject: Re: [sumo-user] Modifying the SUMO network at runtime
> Message-ID:
>        
> <CAMbUcbxp63qy9pFnBYvmxY2b+qE55XwtdJsx_FqUznYZsM94Hw@xxxxxxxxxxxxxx
> <mailto:CAMbUcbxp63qy9pFnBYvmxY2b%2BqE55XwtdJsx_FqUznYZsM94Hw@xxxxxxxxxxxxxx>>
> Content-Type: text/plain; charset="utf-8"
> 
> Hello,
> there is currently no support for modifying the network except for changing
> lane permissions.
> Adding nodes and edges at runtime would be quite difficult since you would
> have to replicate all the procesing steps of netconvert (e.g. to compute
> intersection rules) as wells as all the steps that are done by the
> simulation when loading a network (some of them interdependent and to be
> done in the right order).
> Modifying elevation at runtime would probable be doable since this part of
> the network data has no interdependencies with other structures and you
> could borrow code from traci.polygon.setShape.
> 
> An alternative might be to save the simulation state (--save-state) and
> then restart the simulation with a modified but compatible network and the
> saved state.
> 
> regards,
> Jakob
> 
> 
> 
> Am Di., 5. M?rz 2019 um 17:07 Uhr schrieb Linwood Hudson
> <vtkougrr@xxxxxxxxx <mailto:vtkougrr@xxxxxxxxx>
>>:
> 
>> Hello all,
>>
>> My project performs several pre-processing steps to OSM files prior to
>> running them through netconvert and launching SUMO. The most
> time-consuming
>> is using Osmosis to apply elevation data to each node, as is required for
>> my simulation purposes. I'm looking into ways to speed up the
>> initialization of my SUMO simulation and potentially deferring expensive
>> operations. All of these expensive operations involved modifying the
>> network structure in some way (e.g. applying elevation data to nodes,
>> adding additional nodes/edges in places that don't have good coverage in
>> OSM, etc.).
>>
>> I would like to load a base OSM immediately to get my simulation running,
>> then layer in elevation data and more refined nodes/edges later when the
>> longer-running processes complete. There doesn't appear to be any support
>> for modifying the network at runtime using TRACI. At a minimum just
> editing
>> the elevation values of nodes, but potentially adding new nodes and lanes.
>> Are there major technical challenges to editing the network at runtime?
>> Even just changing the elevation values?
>>
>> If there are any options I could consider please let me know.
>>
>> Thanks!
>> _______________________________________________
>> sumo-user mailing list
>> sumo-user@xxxxxxxxxxx <mailto:sumo-user@xxxxxxxxxxx>
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://www.eclipse.org/mailman/listinfo/sumo-user
>>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL:
> <https://www.eclipse.org/mailman/private/sumo-user/attachments/20190305/65249473/attachment.html>  
> 
> _______________________________________________
> sumo-user mailing list
> sumo-user@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe from this list, visit
> https://www.eclipse.org/mailman/listinfo/sumo-user
> 


Attachment: signature.asc
Description: OpenPGP digital signature


Back to the top