Skip to content

Commit 3cef0ea

Browse files
committed
remove warnings
1 parent a29e9ab commit 3cef0ea

File tree

11 files changed

+130
-28
lines changed

11 files changed

+130
-28
lines changed

map/128x72.map

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
height 72
2+
width 128
3+
map
4+
................................................................................................................................
5+
................................................................................................................................
6+
................................................................................................................................
7+
................................................................................................................................
8+
................................................................................................................................
9+
................................................................................................................................
10+
................................................................................................................................
11+
................................................................................................................................
12+
................................................................................................................................
13+
................................................................................................................................
14+
................................................................................................................................
15+
................................................................................................................................
16+
................................................................................................................................
17+
................................................................................................................................
18+
................................................................................................................................
19+
................................................................................................................................
20+
................................................................................................................................
21+
................................................................................................................................
22+
................................................................................................................................
23+
................................................................................................................................
24+
................................................................................................................................
25+
................................................................................................................................
26+
................................................................................................................................
27+
................................................................................................................................
28+
................................................................................................................................
29+
................................................................................................................................
30+
................................................................................................................................
31+
................................................................................................................................
32+
................................................................................................................................
33+
................................................................................................................................
34+
................................................................................................................................
35+
................................................................................................................................
36+
................................................................................................................................
37+
................................................................................................................................
38+
................................................................................................................................
39+
................................................................................................................................
40+
................................................................................................................................
41+
................................................................................................................................
42+
................................................................................................................................
43+
................................................................................................................................
44+
................................................................................................................................
45+
................................................................................................................................
46+
................................................................................................................................
47+
................................................................................................................................
48+
................................................................................................................................
49+
................................................................................................................................
50+
................................................................................................................................
51+
................................................................................................................................
52+
................................................................................................................................
53+
................................................................................................................................
54+
................................................................................................................................
55+
................................................................................................................................
56+
................................................................................................................................
57+
................................................................................................................................
58+
................................................................................................................................
59+
................................................................................................................................
60+
................................................................................................................................
61+
................................................................................................................................
62+
................................................................................................................................
63+
................................................................................................................................
64+
................................................................................................................................
65+
................................................................................................................................
66+
................................................................................................................................
67+
................................................................................................................................
68+
................................................................................................................................
69+
................................................................................................................................
70+
................................................................................................................................
71+
................................................................................................................................
72+
................................................................................................................................
73+
................................................................................................................................
74+
................................................................................................................................
75+
................................................................................................................................

mapf/include/graph.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ struct Node {
112112
};
113113

114114
// check two configurations are same or not
115+
[[maybe_unused]]
115116
static bool sameConfig(const Config& config_i, const Config& config_j)
116117
{
117118
if (config_i.size() != config_j.size()) return false;
@@ -143,7 +144,7 @@ class Graph {
143144

144145
public:
145146
Graph() {};
146-
~Graph();
147+
virtual ~Graph();
147148

148149
// in grid, id = y * width + x
149150
virtual bool existNode(int id) const { return false; };

mapf/include/ir.hpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,3 @@ class IR : public Solver {
7676
void setParams(int argc, char *argv[]);
7777
static void printHelp();
7878
};
79-
80-
81-
82-
static void setSolverOption(Solver* solver,
83-
const std::vector<std::string>& option)
84-
{
85-
if (option.empty()) return;
86-
int argc = option.size() + 1;
87-
char *argv[argc+1];
88-
for (int i = 0; i < argc; ++i) {
89-
char *tmp = const_cast<char*>(option[i].c_str());
90-
argv[i+1] = tmp;
91-
}
92-
solver->setParams(argc, argv);
93-
}

mapf/include/util.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,14 @@
1010
// for computation time
1111
using Time = std::chrono::system_clock;
1212

13-
13+
[[maybe_unused]]
1414
static void halt(const std::string& msg)
1515
{
1616
std::cout << "error: " << msg << std::endl;
1717
std::exit(1);
1818
}
1919

20+
[[maybe_unused]]
2021
static void warn(const std::string& msg)
2122
{
2223
std::cout << "warn: " << msg << std::endl;
@@ -30,18 +31,21 @@ static bool inArray(const T a, const std::vector<T> &arr) {
3031
}
3132

3233
// return true or false
34+
[[maybe_unused]]
3335
static bool getRandomBoolean(std::mt19937* MT) {
3436
std::uniform_int_distribution<int> r(0, 1);
3537
return r(*MT);
3638
}
3739

3840
// return [from, to]
41+
[[maybe_unused]]
3942
static int getRandomInt(int from, int to, std::mt19937* MT) {
4043
std::uniform_int_distribution<int> r(from, to);
4144
return r(*MT);
4245
}
4346

4447
// return [from, to)
48+
[[maybe_unused]]
4549
static float getRandomFloat(float from, float to, std::mt19937* MT) {
4650
std::uniform_real_distribution<float> r(from, to);
4751
return r(*MT);
@@ -54,6 +58,7 @@ static T randomChoose(std::vector<T> &arr, std::mt19937* MT) {
5458
}
5559

5660
// get elapsed time
61+
[[maybe_unused]]
5762
static double getElapsedTime(const std::chrono::system_clock::time_point&
5863
t_start)
5964
{

mapf/src/icbs_refine.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ void ICBS_REFINE::setInitialHighLevelNode(HighLevelNode_p n)
2222
LibCBS::Constraints constraints
2323
= LibCBS::getConstraintsByFixedPaths(old_plan, fixed_agents);
2424

25-
auto t_s = Time::now();
26-
2725
// find paths
2826
for (int i = 0; i < P->getNum(); ++i) {
2927
// check time limit

mapf/src/ir.cpp

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,21 @@ const IR::OPTIMAL_SOLVER_TYPE IR::DEFAULT_REFINE_SOLVER =
1111
const int IR::DEFAULT_MAX_ITERATION = 100;
1212

1313

14+
// used for set underlying solver options
15+
static void setSolverOption(Solver* solver,
16+
const std::vector<std::string>& option)
17+
{
18+
if (option.empty()) return;
19+
int argc = option.size() + 1;
20+
char *argv[argc+1];
21+
for (int i = 0; i < argc; ++i) {
22+
char *tmp = const_cast<char*>(option[i].c_str());
23+
argv[i+1] = tmp;
24+
}
25+
solver->setParams(argc, argv);
26+
}
27+
28+
1429
IR::IR(Problem* _P) : Solver(_P)
1530
{
1631
solver_name = IR::SOLVER_NAME;

mapf/src/pibt_complete.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,6 @@ void PIBT_COMPLETE::printHelp()
7474

7575
void PIBT_COMPLETE::makeLog(const std::string& logfile)
7676
{
77-
Grid* grid = reinterpret_cast<Grid*>(P->getG());
78-
7977
std::ofstream log;
8078
log.open(logfile, std::ios::out);
8179
makeLogBasicInfo(log);

mapf/src/problem.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,11 +112,11 @@ Problem::Problem(Problem* P,
112112
int _max_timestep)
113113
: G(P->getG()),
114114
MT(P->getMT()),
115-
num_agents(P->getNum()),
116115
config_s(_config_s),
117116
config_g(_config_g),
118-
max_comp_time(_max_comp_time),
119-
max_timestep(_max_timestep)
117+
num_agents(P->getNum()),
118+
max_timestep(_max_timestep),
119+
max_comp_time(_max_comp_time)
120120
{
121121
}
122122

readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Multi-Agent Path Finding
44
[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)
55

66
A simulator and visualizer of Multi-Agent Path Finding (MAPF), used in a paper "Iterative Refinement for Realtime MAPF".
7-
It is written in C++(17) and tested on OSX 10.15.
7+
It is written in C++(17) with [CMake](https://cmake.org/) build and tested on OSX 10.15.
88
The visualizer uses [openFrameworks](https://openframeworks.cc).
99

1010
The implementations include: HCA\* and WHCA\* [1], PIBT [2], CBS [3], ICBS [4], ECBS [5], PIBT-Complete, and IR.

visualizer/include/ofApp.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ class ofApp : public ofBaseApp {
2525
bool flg_font;
2626
bool flg_line;
2727
bool flg_focus;
28+
bool flg_logo_gen;
2829

2930
// visual
3031
ofTrueTypeFont font;

0 commit comments

Comments
 (0)