IPath

From The iroboapp Project
Jump to: navigation, search

Authors

  • Anis Koubaa, COINS Research Group (Saudi Arabia)/Prince Sultan University (Saudi Arabia), akoubaa (at) coins-lab dot org
  • Imen Chaari, COINS Research Group (Saudi Arabia)/University of Mannouba (Tunisia), imen dot chaari (at) coins-lab dot org
  • Maram Alajlan, COINS Research Group (Saudi Arabia)/Al-Imam Mohamed bin Saud University (Saudi Arabia), maram dot ajlan (at) coins-lab dot org

Get the iPath Simulator Code

The code is open source under the GNU license. It can be downloaded from iPath

API Documentation

API Documentation

Description

iPath simulator implements the following planners:

  • A*
  • Relaxed A*
  • Genetic Algorithm (GA)
  • Ant Colony Optimization (ACO)
  • Tabu Search


Directories

path_planners which contains:

  • ACO: A class that implements the ACO algorithm
  • AStar: A class that implements the A* algorithm
  • evaluatePlanners
  • generic_path_planner: A class that implements main methods for finding an initial solution; all path planners will inherit from it
  • genetic_algorithm: A class that implements the genetic algorithm
  • map_folder: contains the maps to be used and tested with the planners
  • map: A class that represents a grid environment as a two dimensional matrix
  • path: A class that represents the path as a vector structure for the sequence of cells forming the path
  • RAstar: A class that implements relaxed A* algorithm
  • tabu_search: A class that implements the tabu search

Path_planners compilation and execution

To compile and run Astar planner

1- In path_planners directory run the command

$ make

2- Open file evaluateASTAR.cpp from path_planners/evaluatePlanners/AStar directory, specify following parameters:

int numberOfScenarios = 2; // the number of the scenarios (start and goal positions)
int numberOfruns = 10; // how many times you want to repeat each scenario
// Astar parameters 
bool withBreakTies = true;

3- run this command from path_planners/evaluatePlanners/AStar directory

$ make

4- Open file "mapFile" path_planners/evaluatePlanners/AStar/bin directory Add the map(s) you want to test, separate the maps by enter. For example:

map-W30-H30/W30-H30-ObRatio0.3-ObSize5-Nbr01.pgm 
map-W50-H50/W50-H50-ObRatio0.1-ObSize1-Nbr01.pgm

5- run this command from path_planners/evaluatePlanners/AStar/bin directory

$ ./main

6- Get the results from AStarStatistics.xlsx from path_planners/evaluatePlanners/AStar/bin directory

To compile and run Relaxed Astar planner

1- In path_planners directory run the command

$ make

2- Open file evaluateRASTAR.cpp from path_planners/evaluatePlanners/RAstar directory, specify following parameters:

int numberOfScenarios = 2; // the number of the scenarios (start and goal positions)
int numberOfruns = 10; // how many times you want to repeat each scenario
// RAstar parameters
int numberOfNeighbors = 8; // 4 or 8
bool withBreakTies = true;

3- run this command from path_planners/evaluatePlanners/RAstar directory

$ make

4- Open file mapFile path_planners/evaluatePlanners/RAstar/bin directory Add the map(s) you want to test, separate the maps by enter. For example:

map-W30-H30/W30-H30-ObRatio0.3-ObSize5-Nbr01.pgm
map-W50-H50/W50-H50-ObRatio0.1-ObSize1-Nbr01.pgm

5- run this command from path_planners/evaluatePlanners/RAstar/bin directory

$ ./main

6- Get the results from RAStatistics.xlsx from path_planners/evaluatePlanners/AStar/bin directory


To compile and run Genetic Algorithm planner

1- In path_planners directory run the command

$ make

2- Open file evaluateGA.cpp from path_planners/evaluatePlanners/genetic_algorithm directory, specify following parameters:

int numberOfScenarios = 2; // the number of the scenarios (start and goal positions)
int numberOfruns = 10; // how many times you want to repeat each scenario
// GA parameters
int numberOfIterations = 15;
uint populationSize = 15;
int crossoverType = 1; // 1: one point, 2: two point, 3: modified.
float crossoverProbability = 0.9;
float mutationProbability = 0.01;
int mutationIterationNumber = 50;
float minInitialPathCost = 0;
int radius = 2;

3- run this command from path_planners/evaluatePlanners/genetic_algorithm directory

$ make

4- Open file mapFile path_planners/evaluatePlanners/genetic_algorithm/bin directory Add the map(s) you want to test, separate the maps by enter. For example:

map-W30-H30/W30-H30-ObRatio0.3-ObSize5-Nbr01.pgm
map-W50-H50/W50-H50-ObRatio0.1-ObSize1-Nbr01.pgm

5- run this command from path_planners/evaluatePlanners/genetic_algorithm/bin directory

$ ./main

6- Get the results from GAStatistics.xlsx from path_planners/evaluatePlanners/genetic_algorithm/bin directory

To compile and run Tabu Search planner

1- In path_planners directory run the command

$ make

2- Open file evaluateTABU.cpp from path_planners/evaluatePlanners/tabu_search directory, specify following parameters:

int numberOfScenarios = 2; // the number of the scenarios (start and goal positions)
int numberOfruns = 10; // how many times you want to repeat each scenario
// Tabu search parameters
int tenure=7;
int numberOfIterations = 30;

3- run this command from path_planners/evaluatePlanners/tabu_search directory

$ make

4- Open file "mapFile" path_planners/evaluatePlanners/tabu_search/bin directory Add the map(s) you want to test, separate the maps by enter. For example:

map-W30-H30/W30-H30-ObRatio0.3-ObSize5-Nbr01.pgm
map-W50-H50/W50-H50-ObRatio0.1-ObSize1-Nbr01.pgm

5- run this command from path_planners/evaluatePlanners/tabu_search/bin directory

$ ./main

6- Get the results from TabuSearchStatistics.xlsx from path_planners/evaluatePlanners/tabu_search/bin directory

To compile and run all the planners

1- Open file main.cpp from path_planners directory, specify following parameters:

int numberOfScenarios = 2; // the number of the scenarios (start and goal positions)
int numberOfruns = 10; // how many times you want to repeat each scenario

And specify each planner parameters.

2- In path_planners directory run the command

$ make

3- Open file mapFile path_planners/bin directory Add the map(s) you want to test, separate the maps by enter. For example:

map-W30-H30/W30-H30-ObRatio0.3-ObSize5-Nbr01.pgm
map-W50-H50/W50-H50-ObRatio0.1-ObSize1-Nbr01.pgm

4- run this command from path_planners/bin directory

$ ./main

5- Get the results from the xlsx files from path_planners/bin directory

Screenshots

RAstar Execution

Rastar4.png

Rastar5.png

Rastar6.png

Rastar7.png

All planners Execution

Ipath2.png

Ipath3.png

Ipath4.png