libmove3d-planners
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Friends Macros Groups Pages
Statistics.hpp
1 /*
2  * Statistics.hpp
3  *
4  * Created on: Sep 14, 2009
5  * Author: jmainpri
6  */
7 
8 #ifndef STATISTICS_HPP_
9 #define STATISTICS_HPP_
10 
16 class Statistics
17 {
18 
19 public:
20  Statistics();
21 
22  ~Statistics();
29  void enableStats(void);
30 
37  void disableStats(void);
38 
46  int getStatStatus(void);
47 
54  p3d_stat * createStat(void);
55 
62  void destroyStat(p3d_stat ** s);
63 
69  void initStats(p3d_stat * s);
70 
76  void setTotalCountVar(p3d_graph * graph);
77 
83  void mergeStat(p3d_stat * src, p3d_stat * dest);
84 
90  void getPathStat(p3d_stat * s, p3d_traj * path, int beforePost);
91 
98  void printStatsGraph(p3d_stat * s, int Print);
99 
107  void printStatsEnv(p3d_stat * s, int Print);
108 
115  void addStatToFile(p3d_stat * s, FILE* Stat_output);
116 
120  FILE* openStatFile(FILE* Stat_output, char* s);
121 
125  void closeStatFile(FILE* Stat_output);
126 
130  void saveInStatFile();
131 
132 public:
133 
134  int loopNum; // Number of loops
135  double preTime; // Pre-planning time
136  double planTime; // Planning Time
137  int planConfTot; // Total Number of Configurations
138  int planConfCol; // Number of conf in collision
139  int planConfFree; // Number of conf free
140  int planConfAdd; // Number of conf added
141  int planConfGuard; // Number of guardian
142  int planConfConn; // Number of connectors
143  int planEdge; // Number of edges in the graph
144  int planCycle; // Number of cycles in the graph
145  double cyclingTime; // Time spent to construct cycles
146  int planNeigCall; // Number of call to neigh function
147  int planLpNum; // Number of computed local paths
148  double planLpLenght; // Local path length
149  int planLpColNum; // Number of local path collision test
150  double planLpStepSize; // Local path step size
151  double postTime; // Post planning time
152  int colNum; // Number of collisions
153  int lenLpNumBeforePost; // Number of local path before post processing
154  int lenLpNumAfterPost; // Number of local path after post processing
155  double lenPathBeforePost; // Path length before postProcessing
156  double lenPathAfterPost; // Path length after postProcessing
157  unsigned long memory; // Memory usage
158 #ifdef MULTIGRAPH
159  double mgTime;
160  int mgNodes;
161  int mgEdges;
162 
163 };
164 
165 #endif /* STATISTICS_HPP_ */