Rank: 34 based on 1234 downloads (last 30 days) and 34 files submitted
photo

Joseph Kirk

E-mail

Personal Profile:

 

Watch this Author's files

 

Files Posted by Joseph Kirk View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
17 Oct 2014 Screenshot tixclock displays the time in a format similar to tix clocks Author: Joseph Kirk clock, time, fun, leds, utilities, r2014b graphics ready 12 2
  • 5.0
5.0 | 2 ratings
06 May 2014 Screenshot Open Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a "open" variation of the TSP using a GA Author: Joseph Kirk optimization, traveling salesman pr..., open variation, genetic algorithm 46 4
  • 4.25
4.2 | 4 ratings
06 May 2014 Screenshot Fixed Endpoints Open Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a "open" variation of the TSP with fixed endpoints using a GA Author: Joseph Kirk optimization, traveling salesman pr..., tsp, open variation, fixed endpoints 19 0
06 May 2014 Screenshot Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a TSP using a GA Author: Joseph Kirk optimization, traveling salesman pr..., tsp, genetic algorithm, ga, potw 299 77
  • 4.5
4.5 | 50 ratings
06 May 2014 Screenshot Multiple Traveling Salesmen Problem - Genetic Algorithm Finds a near-optimal solution to a M-TSP using a GA Author: Joseph Kirk multiple traveling sa..., mtsp, tsp, genetic algorithm, ga, optimization 71 19
  • 4.38462
4.4 | 14 ratings
Comments and Ratings by Joseph Kirk View all
Updated File Comments Rating
06 Nov 2014 Advanced Dijkstra's Minimum Path Algorithm calculates the shortest (least cost) path along edges of a graph using Dijkstra's Algorithm Author: Joseph Kirk

Remove the edge connections in the adjacency matrix for any nodes that are inside the "keep out" area prior to running the shortest path algorithm:

A(in,:) = 0;
A(:,in) = 0;

08 Oct 2014 Advanced Dijkstra's Minimum Path Algorithm calculates the shortest (least cost) path along edges of a graph using Dijkstra's Algorithm Author: Joseph Kirk

Vishal, in your case, you could provide the inputs as follows:

C = zeros(4);
C(1,2) = 10;
C(1,3) = 20;
C(2,4) = 30;
C(3,4) = 40;
A = logical(C);
[cost,path] = dijkstra(A,C,1,4)

And the output you would get is:

cost =
40
path =
1 2 4

26 May 2014 Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a TSP using a GA Author: Joseph Kirk

@Binayak, look in the help notes for examples and input/output options.

30 Apr 2014 Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a TSP using a GA Author: Joseph Kirk

@Sven, thanks for the suggestions. I'll look into overhauling the interface.

27 Apr 2014 Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a TSP using a GA Author: Joseph Kirk

@Larry, the XY coordinates are only randomly created if no inputs are provided to the function. If you pass a set of XY points, the function will use them.

You can also pass in a distance matrix of point-to-point distances. If you do not provide one, my function computes the pairwise Euclidean distances. However, for latitude and longitude points, this is probably not desirable. You should create a distance matrix in the units you desire and pass that in as the second input.

Comments and Ratings on Joseph Kirk's Files View all
Updated File Comment by Comments Rating
02 Dec 2014 Open Traveling Salesman Problem - Genetic Algorithm Finds a near-optimal solution to a "open" variation of the TSP using a GA Author: Joseph Kirk Are LosnegÄrd

06 Nov 2014 Advanced Dijkstra's Minimum Path Algorithm calculates the shortest (least cost) path along edges of a graph using Dijkstra's Algorithm Author: Joseph Kirk Joseph Kirk

Remove the edge connections in the adjacency matrix for any nodes that are inside the "keep out" area prior to running the shortest path algorithm:

A(in,:) = 0;
A(:,in) = 0;

06 Nov 2014 Advanced Dijkstra's Minimum Path Algorithm calculates the shortest (least cost) path along edges of a graph using Dijkstra's Algorithm Author: Joseph Kirk Mohsen

Hi Joseph,
I am using the code below to define a grid and find the shortest point between two points. I am also defining a polygon as a keep out area. How can I change the cost of the paths inside the polygon so that the connection line goes around the keep out are?
I have Identified the points that are inside the polygon.
Please advice.
Thanks
Mohsen

clear all;close all;
[xgrid ygrid]= meshgrid (-5:0.5:5,-5:0.5:5);
ygrid(:,2:2:end)=ygrid(:,2:2:end)+0.25;
xx=xgrid(1:end);
yy=ygrid(1:end);

xy=[xx;yy]';

L = linspace(0,2.*pi,11); xv = 3*sin(L);yv = 3*cos(L);
plot(xv,yv,'g')
hold on
in = inpolygon(xx,yy,xv,yv);
plot(xy(find(in==1),1),xy(find(in==1),2),'om')

% xy(find(in==1),:)=-5;
n = size(xy,1); 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,437) ;
gplot(A,xy,'k.:'); 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

21 Oct 2014 Advanced Dijkstra's Minimum Path Algorithm calculates the shortest (least cost) path along edges of a graph using Dijkstra's Algorithm Author: Joseph Kirk Pouria

08 Oct 2014 Advanced Dijkstra's Minimum Path Algorithm calculates the shortest (least cost) path along edges of a graph using Dijkstra's Algorithm Author: Joseph Kirk Joseph Kirk

Vishal, in your case, you could provide the inputs as follows:

C = zeros(4);
C(1,2) = 10;
C(1,3) = 20;
C(2,4) = 30;
C(3,4) = 40;
A = logical(C);
[cost,path] = dijkstra(A,C,1,4)

And the output you would get is:

cost =
40
path =
1 2 4

Contact us