performance - How to speed up least-cost path model at large spatial extents -


From then on, I try to find a way to speed up my least costly route model which is large Runs on the scale. In my scenario, there is a limit of 100 kms (1 patch = 1 pixel with 1000 patch x 1000 patch)

At the moment, my code works but it runs very slowly: my code It takes several hours to attract the lowest cost route. The problem is that my model develops during 100 days of discrete time stages of 100 days and in my scenario I have 1000 wolves for each wolf and every step, my model is made of polygon (made of several patches) At least the route will be constructed between the 3 km around the wolf. There is a wolf and all the polygons located within the scope of

I used a new version of NW-Extension and I tried to customize my model by saving all the costs, which by already attracting the least cost Has been calculated to avoid. Unfortunately, my code is still slow and I do not know how it will speed up.

  Route to Cost-Multi-Polygon [ID-Polygon-1 ID-Polygon-2] Path-Cost-1;; Define polygonal edges [id-polygon! = Id-polygon-1] [Ask neighbors from [id-polygon = id-polygon-1] [ask nodes - here [red color]]] [id-polygon! = Id-polygon-2] [Ask neighbors [id-polygon = id-polygon-2] [ask nodes - here [color red] set]] ;; Calculate the cost of the path prefix type (with id-polygon = id-polygon-1 nodes-patch) with [color = red] [node-on-polygon-1] forecore sort ((nodes- [ Patch with id-polygon = id-polygon-2] [with color = red] [node-on-polygon-2] Ask node-on-polygon-1 [cost nw: weighted-distance-node- On-polygon-2 "link-cost" if path-cost = -1 or cost & lt; Path-cost [set-path-cost-cost]]] ;; Save the cost of the path between the polygon set list-id-polygon lput (list id-polygon-1 id-polygon-2) list-id-polygon set list-path-cost-between-polygons lput path-cost list-path -cost-ask-between-polygons nodes [color = red] [set white] End of report path-cost   

Thank you very much for your help.

I am currently working on a new version of the NW-Extension which will be very fast Unfortunately, for weighted paths, it will not be available until NetLogo 5.0.6 will come out.

Until then, you can code your own low-cost path code, it will be definitely difficult for you to implement, but it is possible. If I have time, then I'll give him a shot and post it here.

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -