Key Workflows
...
Optioneer's Algorithms
Least Cost Path Algorithm
2 min
the least cost path (lcp) algorithm works by modelling the map as a graph and then finding the most efficient path between two points graph construction a graph is created to represent the map where optimisation will take place penalty assignment each edge of the graph is assigned a penalty value based on user defined parameters, such as passing through a high penalty layer crossing areas of high elevation or steep slope pathfinding a graph traversal algorithm (commonly dijkstraโs algorithm ) is used to explore nodes in the graph as the algorithm progresses, it keeps track of the cheapest known path to each node termination the algorithm stops once the target node is reached, returning the least cost path between the start and endpoint path performance values are stored and returning in two ways docid\ u m3xc 1mi7ywqjjuukwq (preliminary solutions) values are recorded distinctly, before refinement by the docid\ skr80mrm8eua2s mznxx4 docid\ syz9arnkk8ipehnexea6c values are grouped and returned in ranged brackets built in penalty for distance even if there are no penalty layers set up (apart from no go zones ), the lcp algorithm always applies a built in penalty for distance each step across the map carries a small cost, which means longer routes are automatically less efficient than shorter ones in an empty map, the least cost path will be a straight line between start and end points if no go zones are present, the algorithm finds the shortest valid route that avoids them this ensures corridors donโt spread across the entire map โ they are shaped both by the no go restrictions and the inherent cost of distance
