Commit b2c0c906 authored by Mohcine Chraibi's avatar Mohcine Chraibi

remove progressBar from tests

- Somehow, when called with ctest leads to infinite loop (or so)
parent bba5cc14
...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator --> <!-- seed used for initialising random generator -->
<seed>1254</seed> <seed>1254</seed>
<progressbar/>
<max_sim_time>200</max_sim_time> <max_sim_time>200</max_sim_time>
<!-- geometry file --> <!-- geometry file -->
<geometry>geometry1.xml</geometry> <geometry>geometry1.xml</geometry>
......
...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator --> <!-- seed used for initialising random generator -->
<seed>1254</seed> <seed>1254</seed>
<progressbar/>
<max_sim_time>200</max_sim_time> <max_sim_time>200</max_sim_time>
<!-- geometry file --> <!-- geometry file -->
<geometry>geometry2.xml</geometry> <geometry>geometry2.xml</geometry>
......
...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator --> <!-- seed used for initialising random generator -->
<seed>1254</seed> <seed>1254</seed>
<progressbar/>
<max_sim_time>200</max_sim_time> <max_sim_time>200</max_sim_time>
<!-- geometry file --> <!-- geometry file -->
<geometry>geometry3.xml</geometry> <geometry>geometry3.xml</geometry>
......
...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator --> <!-- seed used for initialising random generator -->
<seed>1254</seed> <seed>1254</seed>
<progressbar/>
<max_sim_time>200</max_sim_time> <max_sim_time>200</max_sim_time>
<!-- geometry file --> <!-- geometry file -->
<geometry>geometry4.xml</geometry> <geometry>geometry4.xml</geometry>
......
...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -6,7 +6,6 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator --> <!-- seed used for initialising random generator -->
<seed>1254</seed> <seed>1254</seed>
<progressbar/>
<max_sim_time>200</max_sim_time> <max_sim_time>200</max_sim_time>
<!-- geometry file --> <!-- geometry file -->
<geometry>geometry5.xml</geometry> <geometry>geometry5.xml</geometry>
......
...@@ -6,7 +6,7 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -6,7 +6,7 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
<!-- seed used for initialising random generator --> <!-- seed used for initialising random generator -->
<seed>1254</seed> <seed>1254</seed>
<max_sim_time>200</max_sim_time> <max_sim_time>20</max_sim_time>
<!-- geometry file --> <!-- geometry file -->
<geometry>geometry7.xml</geometry> <geometry>geometry7.xml</geometry>
<!-- trajectories file and format --> <!-- trajectories file and format -->
...@@ -20,9 +20,9 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd"> ...@@ -20,9 +20,9 @@ xsi:noNamespaceSchemaLocation="../../xsd/jps_ini_core.xsd">
</routing> </routing>
<!--persons information and distribution --> <!--persons information and distribution -->
<agents operational_model_id="4"> <agents operational_model_id="3">
<agents_distribution> <agents_distribution>
<group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="1" number="20" goal_id="-1" router_id="1" /> <group group_id="1" agent_parameter_id="1" room_id="0" subroom_id="1" number="10" goal_id="-1" router_id="1" />
</agents_distribution> </agents_distribution>
</agents> </agents>
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
* *
**/ **/
#include <chrono>
#include "Building.h" #include "Building.h"
#include "../geometry/SubRoom.h" #include "../geometry/SubRoom.h"
...@@ -369,6 +369,7 @@ bool Building::InitGeometry() ...@@ -369,6 +369,7 @@ bool Building::InitGeometry()
} }
bool Building::correct() const { bool Building::correct() const {
auto t_start = std::chrono::high_resolution_clock::now();
Log->Write("INFO:\tenter correct ..."); Log->Write("INFO:\tenter correct ...");
bool removed = false; bool removed = false;
...@@ -473,9 +474,11 @@ z std::cout << "Wall pieces size : " << WallPieces.size() << ...@@ -473,9 +474,11 @@ z std::cout << "Wall pieces size : " << WallPieces.size() <<
if(SaveGeometry(filename)) if(SaveGeometry(filename))
this->GetConfig()->SetGeometryFile(filename); this->GetConfig()->SetGeometryFile(filename);
} }
Log->Write("INFO:\tLeave geometry correct with success .. maybe");
return true; auto t_end = std::chrono::high_resolution_clock::now();
double elapsedTimeMs = std::chrono::duration<double, std::milli>(t_end-t_start).count();
Log->Write("INFO:\tLeave geometry correct with success (%.3f s)", elapsedTimeMs);
return true;
} }
bool Building::RemoveOverlappingDoors(const std::shared_ptr<SubRoom>& subroom) const bool Building::RemoveOverlappingDoors(const std::shared_ptr<SubRoom>& subroom) const
{ {
...@@ -784,18 +787,18 @@ Room* Building::GetRoom(string caption) const ...@@ -784,18 +787,18 @@ Room* Building::GetRoom(string caption) const
bool Building::AddCrossing(Crossing* line) bool Building::AddCrossing(Crossing* line)
{ {
int IDRoom = line->GetRoom1()->GetID(); int IDRoom = line->GetRoom1()->GetID();
int IDLine = line->GetID(); int IDLine = line->GetID();
int IDCrossing = 1000 * IDRoom + IDLine; int IDCrossing = 1000 * IDRoom + IDLine;
if (_crossings.count(IDCrossing) != 0) if (_crossings.count(IDCrossing) != 0)
{ {
char tmp[CLENGTH]; char tmp[CLENGTH];
sprintf(tmp, sprintf(tmp,
"ERROR: Duplicate index for crossing found [%d] in Routing::AddCrossing()", "ERROR: Duplicate index for crossing found [%d] in Routing::AddCrossing()",
IDCrossing); IDCrossing);
Log->Write(tmp); Log->Write(tmp);
exit(EXIT_FAILURE); exit(EXIT_FAILURE);
} }
_crossings[IDCrossing] = line; _crossings[IDCrossing] = line;
return true; return true;
} }
......
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