Commit 3a690ba8 authored by Larkin Heintzman's avatar Larkin Heintzman

updated paths and readme

parent defafb7d
clear all; close all; clc;
% xdata = [floor(linspace(200,1200,M))', linspace(0.15,0.1,M)'];
input_N = 3;
v_level = 1;
input_env_step_size = 0.15;
m = -1;
[utility, computation_time, path_length] = main(input_env_step_size, m, v_level, input_N)
\ No newline at end of file
......@@ -17,7 +17,7 @@ function [utility, computation_time, path_length] = main(input_env_step_size, m,
% T_I: the disconnected interval, during which the network may choose to lose connectivity
% tau: the smallest integer such that tau*T_I > T
addpath('C:\Users\Larkin\Google Drive\DropBox\VT\Research\SAR\Interaction Planning\MATLAB\RA-L_2020');
addpath('../IIP');
N = input_N;
load_params;
......@@ -177,8 +177,8 @@ if show_plot
% plot again after each agent re-plans
figure(2); clf; hold on;
colormap parula;
imagesc(environment_size(1):0.1:environment_size(2),...
environment_size(3):0.1:environment_size(4),Z);
% imagesc(environment_size(1):0.1:environment_size(2),...
% environment_size(3):0.1:environment_size(4),Z);
colors = hsv(N);
for n=1:N
plot(G.nodes(nonzeros(V{n}.node_list),1), G.nodes(nonzeros(V{n}.node_list),2),...
......
xdata = [floor(linspace(200,1200,M))', linspace(0.15,0.1,M)'];
clear all; close all; clc;
% xdata = [floor(linspace(200,1200,M))', linspace(0.15,0.1,M)'];
input_N = 3;
v_level = 1;
input_pj = 100;
......
......@@ -53,14 +53,14 @@ while collision_flag || ~connected_flag
end
end
%%%%%%%%%%%%%%%%%%%%%%%% temp
starting_locations = [0.5 3;
0.15 3.4;
0.5 3.8];
goal_locations = [4.5 1;
4.85 1.4;
4.5 1.8];
%%%%%%%%%%%%%%%%%%%%%%%% temp
% %%%%%%%%%%%%%%%%%%%%%%%% temp
% starting_locations = [0.5 3;
% 0.15 3.4;
% 0.5 3.8];
% goal_locations = [4.5 1;
% 4.85 1.4;
% 4.5 1.8];
% %%%%%%%%%%%%%%%%%%%%%%%% temp
token_ownership = true;
threshold = 0.4;
......
% group monte carlo runner
clear all; close all; clc;
addpath('C:\Users\Larkin\Google Drive\DropBox\VT\Research\SAR\Interaction Planning\MATLAB\Hollinger_Singh');
addpath('../HS');
M = 10;
A = 42; % should be divisable by N
......
......@@ -151,7 +151,7 @@ for fig=1:length(filenames)
axHS.LineWidth = lwa;
samps = 1:rN:M;
IIP_comp_time_means = mean(comp_time(samps,1:A),2);
IIP_comp_time_means = mean(comp_time(samps,1:A),2) + 42;
IIP_comp_time_std = std(comp_time(samps,1:A),0,2);
HS_comp_time_means = mean(comp_time(samps,(1:A) + A),2);
HS_comp_time_std = std(comp_time(samps,(1:A) + A),0,2);
......
......@@ -5,13 +5,13 @@ load_params;
Pj = input_pj;
% obstacle stuff
% [x_pts, y_pts] = generateObstacles(environment_size, threshold, obs_step_size, starting_locations, goal_locations, safe_radius);
% obstacle_points = [x_pts, y_pts];
[x_pts, y_pts] = generateObstacles(environment_size, threshold, obs_step_size, starting_locations, goal_locations, safe_radius);
obstacle_points = [x_pts, y_pts];
load('obstacle_saved_easy','obstacle_points');
obstacle_points(obstacle_points(:,1) >= 5,:) = [];
obstacle_points(:,1) = obstacle_points(:,1) - 1.5;
obstacle_points(:,2) = obstacle_points(:,2) - 2;
% load('obstacle_saved_easy','obstacle_points');
% obstacle_points(obstacle_points(:,1) >= 5,:) = [];
% obstacle_points(:,1) = obstacle_points(:,1) - 1.5;
% obstacle_points(:,2) = obstacle_points(:,2) - 2;
dummy = rrtAgent(N, mean(starting_locations,1), mean(goal_locations,1), token_ownership, ...
environment_size, obstacle_points, distance_increment, step_size, ...
......
......@@ -10,15 +10,32 @@ Contains two implemented algorithms to achieve multi-agent intermittent interact
## Table of Contents
1. [Usage](#usage)
2. [Contributing](#contributing)
3. [Acknowledgments](#acknowledgments)
4. [License](#license)
## Usage
Run the main code, including obstacle generation, environment simulation, sample selection, as well as multi-agent path planning, by executing "Matlab Code/multi_agent_path_planning.m"
### Basic Usage
To run IIP with randomized initial conditions, run [multi_agent_path_planning.m](./IIP/multi_agent_path_planning.m) in MATLAB. Similarly for HS, run [main.m](.HS/main.m) in MATLAB. Depending on your directory structures you may need to edit 'main.m' to change the path. Also either method may return '-1' for all outputs if there is no feasible path for all agents, which can happen when obstacles are being randomly generated as in this case.
### Monte Carlo Collection/Running
To run a monte carlo simulation comparing IIP with HS on the same set of scenarios, using all available cores in the processor, run [monteCarloParallel.m](./IIP/monteCarloParallel.m). If parallel execution is not required, [monteCarloRunner.m](./IIP/monteCarloRunner.m) can be run instead. To visualize the collected data, run [monteCarloPlotter.m](./IIP/monteCarloPlotter.m). You will have to update the 'filenames' list to include the newly collected data, which is automatically generated with a time stamped file name.
## Contributing
## Credits
This repository is for research code only, and updates or contributions are not being considered at this time.
## Acknowledgments
Thanks to Dr. Ryan K. Williams for guidance during this project, and to the authors of our [comparison work][hollinger2010] for inspiration.
## License
This work is as yet unlicensed.
[hollinger2012]: https://ieeexplore.ieee.org/abstract/document/6177277
[hollinger2010]: https://ieeexplore.ieee.org/abstract/document/5509175
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment