Home > By category > Scripts >Development Tools > Advanced Dijkstra's Minimum Path Algorithm



Advanced Dijkstra's Minimum Path Algorithm

  • Downloads: 
  • Views: 
  • Rating:

DIJKSTRA Calculate Minimum Costs and Paths using Dijkstra's Algorithm

Inputs:
[AorV] Either A or V where
A is a NxN adjacency matrix, where A(I,J) is nonzero if and only if an edge connects point I to point J
NOTE: Works for both symmetric and asymmetric A
V is a Nx2 (or Nx3) matrix of x,y,(z) coordinates
[xyCorE] Either xy or C or E (or E3) where
xy is a Nx2 (or Nx3) matrix of x,y,(z) coordinates (equivalent to V)
NOTE: only valid with A as the first input
C is a NxN cost (perhaps distance) matrix, where C(I,J) contains the value of the cost to move from point I to point J
NOTE: only valid with A as the first input
E is a Px2 matrix containing a list of edge connections
NOTE: only valid with V as the first input
E3 is a Px3 matrix containing a list of edge connections in the first two columns and edge weights in the third column
NOTE: only valid with V as the first input
[SID] (optional) 1xL vector of starting points. If unspecified, the algorithm will calculate the minimal path from all N points to the finish point(s) (automatically sets SID = 1:N)
[FID] (optional) 1xM vector of finish points. If unspecified, the algorithm will calculate the minimal path from the starting point(s) to all N points (automatically sets FID = 1:N)

Outputs:
[costs] is an LxM matrix of minimum cost values for the minimal paths
[paths] is an LxM cell containing the shortest path arrays

Note:
If the inputs are [A,xy] or [V,E], the cost is assumed to be (and is calculated as) the point to point Euclidean distance
If the inputs are [A,C] or [V,E3], the cost is obtained from either the C matrix or from the edge weights in the 3rd column of E3

Example:
% Calculate the (all pairs) shortest distances and paths using [A,C] inputs
n = 7; A = zeros(n); xy = 10*rand(n,2)
tri = delaunay(xy(:,1),xy(:,2));
I = tri(:); J = tri(:,[2 3 1]); J = J(:);
IJ = I + n*(J-1); A(IJ) = 1
a = (1:n); b = a(ones(n,1),:);
C = round(reshape(sqrt(sum((xy(b,:) - xy(b',:)).^2,2)),n,n))
[costs,paths] = dijkstra(A,C)

Example:
% Calculate the shortest distance and path from point 3 to 5
n = 15; A = zeros(n); xy = 10*rand(n,2)
tri = delaunay(xy(:,1),xy(:,2));
I = tri(:); J = tri(:,[2 3 1]); J = J(:);
IJ = I + n*(J-1); A(IJ) = 1
[cost,path] = dijkstra(A,xy,3,5)
gplot(A,xy,'b.:'); hold on;
plot(xy(path,1),xy(path,2),'ro-','LineWidth',2)
for k = 1:n, text(xy(k,1),xy(k,2),[' ' num2str(k)],'Color','k'); end

Example:
% Calculate the shortest distances and paths from the 3rd point to all the rest
n = 7; V = 10*rand(n,2)
I = delaunay(V(:,1),V(:,2));
J = I(:,[2 3 1]); E = [I(:) J(:)]
[costs,paths] = dijkstra(V,E,3)

Example:
% Calculate the shortest distance and path from points [1 3 4] to [2 3 5 7]
n = 7; V = 10*rand(n,2)
I = delaunay(V(:,1),V(:,2));
J = I(:,[2 3 1]); E = [I(:) J(:)]
[costs,paths] = dijkstra(V,E,[1 3 4],[2 3 5 7])

Revision Notes:
(4/29/09) Previously, this code ignored edges that have a cost of zero, potentially producing an incorrect result when such a condition exists. I have solved this issue by using NaNs in the table rather than a sparse matrix of zeros. However, storing all of the NaNs requires more memory than a sparse matrix. This may be an issue for massive data sets, but only if there are one or more 0-cost edges, because a sparse matrix is still used if all of the costs are positive.

Free download from Shareware Connection - DIJKSTRA Calculate Minimum Costs and Paths using Dijkstra's Algorithm

Publisher: Joseph Kirk | License: Shareware
Version: 1.0 | Size: 10 KB | Platform: Matlab, Scripts
Released Date: 11-06-2013 | Rating: 0 | Title: Advanced Dijkstra's Minimum Path Algorithm

Author Url: http://www.mathworks.com/
Program Info Url: http://www.mathworks.com/
Download Url: http://www.mathworks.com/matlabcentral/fx_files/20025/2/dijkstra.zip

More downloads from Advanced Dijkstra's Minimum Path Algorithm publisher Joseph Kirk:

Traveling Salesman Problem - Nearest Neighbor Script - This MATLAB script finds a near-optimal solution to a TSP using Nearest Neighbor algorithm

Multiple Variable Traveling Salesmen Problem - Genetic Algorithm Script - This MATLAB script finds a near-optimal solution to a variation of the Multiple Traveling Salesman with variable number of salesmen using a genetic algorithm

Dijkstra's Shortest Path Algorithm - Find the shortest path and distance from a starting node to an ending node on a map

Dragon Curve (aka Jurassic Park Fractal) - The Dragon Curve is a fractal that was made famous in Jurassic Park, a novel by Michael Crichton.

Binary Puzzle - To solve the puzzle: You must get all of the buttons to light up (turn white) Click the (gray/white) buttons to try turning them on/off ...

Advanced Dijkstra's Minimum Path Algorithm keywords:
Advanced Dijkstra's Minimum Path Algorithm related downloads:

K-Shortest Path - This function is based on Yen's k-Shortest Path algorithm (1971)

Dijkstra's Shortest Path Algorithm - Find the shortest path and distance from a starting node to an ending node on a map

Oxford Advanced Learner's 8 - Improve your English language skills with the Oxford Advanced Learner’s Dictionary. Understand what words mean. Learn how to say them. Know how to use them.---------------For more information please visit our Oxford Learner’s ...

Oxford Advanced Learner's A-Z+ - Improve your English language skills with the Oxford Advanced Learner’s Dictionary. Understand what words mean. Learn how to say them. Know how to use them. This version of the Oxford Advanced Learner's Dictionary (OALD) lets you buy ...

Cambridge ADVANCED Learner's - The Cambridge Advanced Learner's Dictionary provides definitions for about 170,000 words, phrases and examples and is compiled to offer what learners need most in a dictionary. The Third Edition offers new, up-to-date vocabulary (e.g. sex up, ...

Shareware Connection periodically updates pricing and software information of 'Advanced Dijkstra's Minimum Path Algorithm' from company source 'Joseph Kirk' , so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft,  Using 'Advanced Dijkstra's Minimum Path Algorithm' crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Advanced Dijkstra's Minimum Path Algorithm.

New Reviews

Edius Pro - In the last few years, NLE video editor segment has become somewhat populated than earlier, with big names like Sony vying for attention with established behemoths like Adobe. However, Adobe’s move to subscription only model has deterred ...

LogmeOnce Password Manager Ultimate - Irrespective of your computer and web usage needs it is quite imperative that you will deal with passwords, in fact plenty of them. Both home and corporate network users need to log in to several web services and sites and for each of them, user ...

Autodesk Smoke - Autodesk is the company well known for making some of the most feature rich and versatile tools for 3D modeling, animation and engineering design related work. Its Smoke is a Mac OS specific app that is aimed at professionals involved in ...

CCleaner Network Edition - Keeping computers clean of redundant and junk data is a prerequisite and these are various methods to do that. Apart from integrated utilities that come with Windows, you can also use third party utilities to keep PC clean of junk files and ...

MAGIX Video easy - Editing videos was a complicated task even a few years back and it was restricted to studios and post production areas in general. However, advancements in computer technology and advent of numerous portable video capture devices have made things ...

CyberGhost VPN - There are so many ways available to browse the web nowadays. You can use a plethora of devices and pick from various service providers to get online. However, tech savvy users resort to additional measures to access the internet without being ...

Soft4Boost Slideshow Studio - Nowadays you can record video using a number of devices including smart phones and tablets. However, some people still prefer using still images and music to create slideshows. Slideshows can be created for preserving fond memories digitally with ...

Protector Plus 2014 (32-bit) - Without using suitable security software in PC, you cannot have peace of mind nowadays. Increasing instances of malware attacks and attacking exploits have prompted average PC users to resort to using antivirus and security suites for both home ...

Norton Zone - With a lot of your data being stored in some cloud service or other, it becomes necessary after a point to zero in on any one service rather than using many at the same time. As it is, major software companies are resorting to cloud based service ...

Adobe Media Encoder - Almost every PC user faces a situation where he or she needs to convert an audio or video file fast into a format of choice. There are several free and commercial apps, but the abundance of options can actually make selection difficult. If you ...




New Downloads

Shared Asset Booking System

The Shared Asset Booking
System developed by PHPJabbers
allows co-owners to manage
better and coordinate the use
of ...

Cloudable - File Hosting
Script

Cloudable enables freelancers,
small businesses (such as
media agencies) and webmasters
to easily share their files
...

Booking Management System

Our booking management system
is entirely customisable and
scales to grow with your
business. It is the most
flexible ...

Project Management System

Project management saves a lot
of time and work effort and
above all ensure plan
coherence and increase quality
of ...

Save and load data as
multi-frame TIFF format

You can easily save and load a
variety types of data as
multi-frame TIFF format by
using this.

ChebyshevTools

This toolbox contains a
collection of m-files which
may be used to numerically
solve discretized ODE/PDEs on
a Chebyshev grid

0-1 Knapsack

Please let others rate your
work

Accelerated Particle Swarm
Optimization

This is an accelerated PSO
(APSO), developed by Xin-She
Yang in 2008

Car

This is inspired from BMW's
roadster Z4

TabGarb

By using TabGarb you can
easily convert your simple
post/page contents into
javascript tab contents .

WP-PostRatings

WP-PostRatings adds an AJAX
rate system to your WordPress
blog

cofactors

When a user enters an n x n
matrix eg