Home
Help
Resources
Extensions
FAQ
NetLogo Publications
Donate

Models:
Library
Community
Modeling Commons

User Manuals:
Web
Printable
Chinese
Czech
Farsi / Persian
Japanese
Spanish

NetLogo User Community Models

WHAT IS IT?

This model was made to investigate the possible use of a NetLog model to find a
low cost path across a costed terrain as requested by Martin Atlas on 13/09/08
when he wrote:

"I am working in a project aimed at finding the optimum path between two points to build a pipeline. By "optimum path" I mean that if I build a pipeline following that path, the construction costs will be the lowest among all the other possible paths."

Whilst mostly agreeing with other comments at the time that offered the a* algorithm as preferable to the wandering ants being considered by Martin, I decided to examine other possibilities.

HOW IT WORKS

A terrain is created by labelling the patches with random single digit numbers: but
for an actual application the calculated cost numbers would be used.
Unusually, the "movement" in this model is supplied by the patches, across which a
pattern "flows" and in so doing identifies a path and collects a cost figure from each patch.
The assumption is that if enough random paths are costed the lowest cost path is very likely to show.
The printed output shows the cost of each step of a path and the total, plus the lowest total cost of all the paths run.
The lowest cost path is viewed by scrolling it and checking the cost step by step.

HOW TO USE IT

Go to TOOLS to hide the Command Center.For a slow trial set DELAY to 1, set RUNS to 5,
press CLEAR OUTPUT, press SETUP, press SETACOSTERRAIN, press MAKE RUNS.
Examine the printed output including scrolling to view the LOWEST COST RUN.

THINGS TO NOTICE

Notice that the path first turns yellow and then green as it is made and that it remains green until a new run starts.

THINGS TO TRY

Set DELAY to 0, set RUNS to 500, press CLEAR OUTPUT, press SETUP, press SETACOSTERRAIN, press MAKE RUNS. Repeat RUNS a few times by ONLY pressing CLEAR OUTPUT and MAKE RUNS while making notes of the LOWEST COST RUN. This should show one or two low cost runs repeating.

EXTENDING THE MODEL

This model was authored by Derek Rush September 2008.

NETLOGO FEATURES

This section could point out any especially interesting or unusual features of NetLogo that the model makes use of, particularly in the Procedures tab. It might also point out places where workarounds were needed because of missing features.

RELATED MODELS

This section could give the names of models in the NetLogo Models Library or elsewhere which are of related interest.

CREDITS AND REFERENCES

This section could contain a reference to the model's URL on the web if it has one, as well as any other necessary credits or references.