AequilibraE / aequilibrae

aequilibrae - Python package for transportation modeling
https://www.aequilibrae.com
Other
165 stars 38 forks source link

Network simplifier #263

Open Art-Ev opened 3 years ago

Art-Ev commented 3 years ago

Have done a prototype of automatic network simplifier (create a new "optimized network" from the actual) on QGIS via QGIS functions but performance is really really awefull... but maybe a function could be created directly in AequilibraE package for a future update.

How it could work :

  1. Identify nodes connecting only 2 links

Then, for each identified node :

  1. check that the 2 connected links (could have been changed by a previous optimisation) have identical modes, capacity, directions and type (to exclude connectors) + other necessary field (for generalized cost time, VD parameters, etc)

  2. If ok, merge the two links and go to next node

pedrocamargo commented 3 years ago

@Art-Ev , this can definitely be done better directly into AequilibraE. But what's the objective? AequilibraE will not be made substantially faster with this (the network is simplified in memory for assignment). Also, if you are looking for nodes connecting exactly two links, working from the query below would be the way to go:

select sum(tot) tot , node from ( select count(*) tot, a_node node from Links group by a_node union all select count(*) tot, b_node node from Links group by b_node) group by node

Art-Ev commented 3 years ago

@pedrocamargo, the objective is to simplify the network for the user : for different local adjustments it will be easier to work with a simpler network. I think that smaller outputs after affectation and less links to manage in general is also a way to make the work around a model more comfortable

pedrocamargo commented 3 years ago

Fair enough, @Art-Ev . This "merging" of links would have to be done with somewhat detailed parameters, however.

These are configurations that could be put in the model parameters file (and used also for splitting links), so I would say we need to design the parameters file as well as the API for doing so.