Commit 3b388897 authored by tobias schroedter's avatar tobias schroedter

Merging 302 and 307

parents d6611b95 ac39c9af
Pipeline #18651 passed with stages
in 19 minutes and 2 seconds
......@@ -584,20 +584,20 @@ routing/ai_router/perception/sign.cpp
routing/ai_router/Cortex.cpp
#AI router trips
routing/ai_router_trips/AIRouterTrips.cpp
routing/ai_router_trips/BrainStorage.cpp
routing/ai_router_trips/cognitiveMap/associations.cpp
routing/ai_router_trips/cognitiveMap/connection.cpp
routing/ai_router_trips/cognitiveMap/cognitivemap.cpp
routing/ai_router_trips/cognitiveMap/landmark.cpp
routing/ai_router_trips/cognitiveMap/region.cpp
routing/ai_router_trips/cognitiveMap/landmarknetwork.cpp
routing/ai_router_trips/cognitiveMap/internnavigationnetwork.cpp
routing/ai_router_trips/perception/visualsystem.cpp
routing/ai_router_trips/perception/visibleenvironment.cpp
routing/ai_router_trips/perception/cgalgeometry.cpp
routing/ai_router_trips/perception/sign.cpp
routing/ai_router_trips/Cortex.cpp
#routing/ai_router_trips/AIRouterTrips.cpp
#routing/ai_router_trips/BrainStorage.cpp
#routing/ai_router_trips/cognitiveMap/associations.cpp
#routing/ai_router_trips/cognitiveMap/connection.cpp
#routing/ai_router_trips/cognitiveMap/cognitivemap.cpp
#routing/ai_router_trips/cognitiveMap/landmark.cpp
#routing/ai_router_trips/cognitiveMap/region.cpp
#routing/ai_router_trips/cognitiveMap/landmarknetwork.cpp
#routing/ai_router_trips/cognitiveMap/internnavigationnetwork.cpp
#routing/ai_router_trips/perception/visualsystem.cpp
#routing/ai_router_trips/perception/visibleenvironment.cpp
#routing/ai_router_trips/perception/cgalgeometry.cpp
#routing/ai_router_trips/perception/sign.cpp
#routing/ai_router_trips/Cortex.cpp
)
SET(AIROUTER_HDR
......
This diff is collapsed.
......@@ -26,6 +26,7 @@
#include "../geometry/Building.h"
#include "../geometry/GeometryReader.h"
#include "../geometry/Trips.h"
#include "../tinyxml/tinyxml.h"
//TODO: the class name GeoFileParser is misleading as the ``geometry'' file contains among others also relations (transitions)
//TODO: between geometries/rooms. Probably, EnvironmentFileParser would be better, still parts of the environment are
......@@ -39,6 +40,10 @@ public:
virtual void LoadBuilding(Building* building) override;
virtual bool LoadTrafficInfo(Building* building) override;
bool parseDoorNode(TiXmlElement * xDoor, int id, Building* building);
Goal* parseGoalNode(TiXmlElement * e);
Transition* parseTransitionNode(TiXmlElement * xTrans, Building * building);
Goal* parseWaitingAreaNode(TiXmlElement * e);
private:
Configuration* _configuration;
......
......@@ -61,11 +61,11 @@ const vector<Trajectories*>& IODispatcher::GetIOHandlers()
return _outputHandlers;
}
void IODispatcher::WriteHeader(long nPeds, double fps, Building* building, int seed)
void IODispatcher::WriteHeader(long nPeds, double fps, Building* building, int seed, int count)
{
for (auto const & it : _outputHandlers)
{
it->WriteHeader(nPeds, fps, building, seed);
it->WriteHeader(nPeds, fps, building, seed, count);
}
}
void IODispatcher::WriteGeometry(Building* building)
......@@ -118,7 +118,7 @@ string TrajectoriesJPSV04::WritePed(Pedestrian* ped)
return string(tmp);
}
void TrajectoriesJPSV04::WriteHeader(long nPeds, double fps, Building* building, int seed)
void TrajectoriesJPSV04::WriteHeader(long nPeds, double fps, Building* building, int seed, int count)
{
building->GetCaption();
string tmp;
......@@ -329,11 +329,14 @@ TrajectoriesFLAT::TrajectoriesFLAT() : Trajectories()
{
}
void TrajectoriesFLAT::WriteHeader(long nPeds, double fps, Building* building, int seed)
void TrajectoriesFLAT::WriteHeader(long nPeds, double fps, Building* building, int seed, int count)
{
(void) seed; (void) nPeds;
char tmp[CLENGTH] = "";
Write("#description: my super simulation");
char tmp[100] = "";
sprintf(tmp, "#description: jpscore (%s)", JPSCORE_VERSION);
Write(tmp);
sprintf(tmp, "#count: %d", count);
Write(tmp);
sprintf(tmp, "#framerate: %0.2f",fps);
Write(tmp);
sprintf(tmp,"#geometry: %s",building->GetGeometryFilename().c_str());
......@@ -353,7 +356,6 @@ void TrajectoriesFLAT::WriteGeometry(Building* building)
void TrajectoriesFLAT::WriteFrame(int frameNr, Building* building)
{
char tmp[CLENGTH] = "";
const vector< Pedestrian* >& allPeds = building->GetAllPedestrians();
for(unsigned int p=0;p<allPeds.size();p++){
Pedestrian* ped = allPeds[p];
......@@ -363,7 +365,6 @@ void TrajectoriesFLAT::WriteFrame(int frameNr, Building* building)
sprintf(tmp, "%d\t%d\t%0.2f\t%0.2f\t%0.2f", ped->GetID(), frameNr, x, y,z);
Write(tmp);
}
}
void TrajectoriesFLAT::WriteFooter()
......@@ -396,10 +397,11 @@ TrajectoriesVTK::TrajectoriesVTK()
{
}
void TrajectoriesVTK::WriteHeader(long nPeds, double fps, Building* building, int seed)
void TrajectoriesVTK::WriteHeader(long nPeds, double fps, Building* building, int seed, int count)
{
//suppress unused warnings
(void) nPeds; (void) fps ; (void) seed;
(void) nPeds; (void) fps ; (void) seed; (void) count;
Write("# vtk DataFile Version 4.0");
Write(building->GetCaption());
Write("ASCII");
......@@ -465,7 +467,7 @@ void TrajectoriesVTK::WriteFooter()
}
void TrajectoriesJPSV06::WriteHeader(long nPeds, double fps, Building* building, int seed)
void TrajectoriesJPSV06::WriteHeader(long nPeds, double fps, Building* building, int seed, int count)
{
building->GetCaption();
string tmp;
......@@ -621,7 +623,7 @@ void TrajectoriesXML_MESH::WriteGeometry(Building* building)
}
void TrajectoriesJPSV05::WriteHeader(long nPeds, double fps, Building* building, int seed)
void TrajectoriesJPSV05::WriteHeader(long nPeds, double fps, Building* building, int seed, int count)
{
building->GetCaption();
string tmp;
......
......@@ -51,7 +51,7 @@ public:
void AddIO(Trajectories* ioh);
const std::vector<Trajectories*>& GetIOHandlers();
void WriteHeader(long nPeds, double fps, Building* building, int seed);
void WriteHeader(long nPeds, double fps, Building* building, int seed, int count);
void WriteGeometry(Building* building);
void WriteFrame(int frameNr, Building* building);
void WriteFooter();
......@@ -67,7 +67,7 @@ public:
_outputHandler = nullptr;
};
virtual ~Trajectories(){delete _outputHandler;};
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed)=0;
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed, int count)=0;
virtual void WriteGeometry(Building* building)=0;
virtual void WriteFrame(int frameNr, Building* building)=0;
virtual void WriteFooter()=0;
......@@ -108,7 +108,7 @@ public:
TrajectoriesJPSV04(){};
virtual ~TrajectoriesJPSV04(){};
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed, int count);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -121,7 +121,7 @@ public:
TrajectoriesJPSV05(){};
virtual ~TrajectoriesJPSV05(){};
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed, int count);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -139,7 +139,7 @@ public:
}
;
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed, int count);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -157,7 +157,7 @@ public:
}
;
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed, int count);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -192,7 +192,7 @@ public:
TrajectoriesJPSV06(){};
virtual ~TrajectoriesJPSV06(){ };
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed, int count);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......
This diff is collapsed.
......@@ -23,6 +23,7 @@
#define JPSCORE_PEDDISTRIBUTIONPARSER_H
#include "../pedestrian/PedDistributionLoader.h"
#include "../tinyxml/tinyxml.h"
class PedDistributionParser : public PedDistributionLoader {
......@@ -32,6 +33,8 @@ public:
virtual bool LoadPedDistribution(std::vector<std::shared_ptr<StartDistribution> >& startDis,
std::vector<std::shared_ptr<StartDistribution> >& startDisSub,
std::vector<std::shared_ptr<AgentsSource> >& startDisSources) override;
std::shared_ptr<AgentsSource> parseSourceNode(TiXmlElement* e);
private:
const Configuration* _configuration;
......
......@@ -37,6 +37,8 @@
#include "pedestrian/AgentsQueue.h"
#include "pedestrian/AgentsSourcesManager.h"
#include "geometry/WaitingArea.h"
#include <filesystem>
namespace fs = std::filesystem;
#ifdef _OPENMP
......@@ -48,10 +50,13 @@
using namespace std;
OutputHandler* Log;
Trajectories* outputTXT;
Simulation::Simulation(Configuration* args)
:_config(args)
{
_countTraj = 0;
_maxFileSize = 10; // MB
_nPeds = 0;
_seed = 8091983;
_deltaT = 0;
......@@ -156,9 +161,9 @@ bool Simulation::InitArgs()
case FORMAT_PLAIN: {
OutputHandler* file = new FileHandler(
_config->GetTrajectoriesFile().c_str());
Trajectories* output = new TrajectoriesFLAT();
output->SetOutputHandler(file);
_iod->AddIO(output);
outputTXT = new TrajectoriesFLAT();
outputTXT->SetOutputHandler(file);
_iod->AddIO(outputTXT);
break;
}
case FORMAT_VTK: {
......@@ -391,9 +396,9 @@ void Simulation::UpdateRoutesAndLocations()
// }
}
void Simulation::PrintStatistics()
void Simulation::PrintStatistics(double simTime)
{
Log->Write("\nRooms Egress Time:");
Log->Write("\nRooms Egress. Simulation Time: %.2f", simTime);
Log->Write("==================");
Log->Write("id\tcaption\tegress time (s)");
......@@ -422,6 +427,7 @@ void Simulation::PrintStatistics()
}
Log->Write("More Information in the file: %s", statsfile.c_str());
auto output = new FileHandler(statsfile.c_str());
output->Write("#Simulation time: %.2f", simTime);
output->Write("#Flow at exit "+goal->GetCaption()+"( ID "+to_string(goal->GetID())+" )");
output->Write("#Time (s) cummulative number of agents \n");
output->Write(goal->GetFlowCurve());
......@@ -442,6 +448,7 @@ void Simulation::PrintStatistics()
+ to_string(itr.first/1000) + "_" + to_string(itr.first % 1000) +".dat";
Log->Write("More Information in the file: %s", statsfile.c_str());
auto output = new FileHandler(statsfile.c_str());
output->Write("#Simulation time: %.2f", simTime);
output->Write("#Flow at crossing " + goal->GetCaption() + "( ID " + to_string(goal->GetID())
+ " ) in Room ( ID "+ to_string(itr.first / 1000) + " )");
output->Write("#Time (s) cummulative number of agents \n");
......@@ -456,7 +463,8 @@ void Simulation::RunHeader(long nPed)
{
// writing the header
if (nPed==-1) nPed = _nPeds;
_iod->WriteHeader(nPed, _fps, _building.get(), _seed);
_iod->WriteHeader(nPed, _fps, _building.get(), _seed, 0);// first trajectory
// count = 0
_iod->WriteGeometry(_building.get());
if( _gotSources)
_iod->WriteSources( GetAgentSrcManager().GetSources());
......@@ -466,7 +474,6 @@ void Simulation::RunHeader(long nPed)
int firstframe = (Pedestrian::GetGlobalTime()/_deltaT)/writeInterval;
_iod->WriteFrame(firstframe, _building.get());
//first initialisation needed by the linked-cells
UpdateRoutesAndLocations();
ProcessAgentsQueue();
......@@ -481,7 +488,10 @@ double Simulation::RunBody(double maxSimTime)
//take the current time from the pedestrian
double t = Pedestrian::GetGlobalTime();
fs::path TrajectoryName(_config->GetTrajectoriesFile());// in case we
// may need to
// generate
// several small files
//frame number. This function can be called many times,
static int frameNr = (int) (1+t/_deltaT); // Frame Number
......@@ -508,6 +518,7 @@ double Simulation::RunBody(double maxSimTime)
bar->SetStyle("\u2588", "-"); //for linux
#endif
int initialnPeds = _nPeds;
// main program loop
while ((_nPeds || (!_agentSrcManager.IsCompleted()&& _gotSources) ) && t<maxSimTime) {
t = 0+(frameNr-1)*_deltaT;
......@@ -549,6 +560,24 @@ double Simulation::RunBody(double maxSimTime)
// write the trajectories
if (0==frameNr%writeInterval) {
_iod->WriteFrame(frameNr/writeInterval, _building.get());
fs::path p = _config->GetTrajectoriesFile();
int sf = fs::file_size(p);
if(sf>_maxFileSize*1024*1024)
{
std::string extention = p.extension().string();
_countTraj++;
char tmp_traj_name[100];
sprintf(tmp_traj_name,"%s_%.4d_%s", TrajectoryName.stem().string().c_str(), _countTraj, extention.c_str());
_config->SetTrajectoriesFile(tmp_traj_name);
Log->Write("INFO:\tNew trajectory file <%s>", tmp_traj_name);
OutputHandler* file = new FileHandler(_config->GetTrajectoriesFile().c_str());
outputTXT->SetOutputHandler(file);
//_config->GetProjectRootDir()+"_1_"+_config->GetTrajectoriesFile());
// _config->SetTrajectoriesFile(name);
_iod->WriteHeader(_nPeds, _fps, _building.get(), _seed, _countTraj);
// _iod->WriteGeometry(_building.get());
}
}
if(!_gotSources && !_periodic && _config->print_prog_bar())
......@@ -596,6 +625,13 @@ double Simulation::RunBody(double maxSimTime)
}
}
}
if(frameNr % 1000 == 0)
{
Log->Write("INFO:\tUpdate door statistics at t=%.2f", t);
PrintStatistics(t);
}
}// while time
return t;
}
......
......@@ -156,7 +156,7 @@ public:
/**
* print some statistics about the simulation
*/
void PrintStatistics();
void PrintStatistics(double time);
/**
* @return the agents source manager
......@@ -186,7 +186,8 @@ public:
void UpdateDoorticks() const;
int GetMaxSimTime() const;
int _countTraj=0; // count number of TXT trajectories to produce
double _maxFileSize; // in MB
};
#endif /*SIMULATION_H_*/
......@@ -74,42 +74,42 @@ FIND_PROGRAM( GENHTML_PATH genhtml )
FIND_PROGRAM( GCOVR_PATH gcovr PATHS ${CMAKE_SOURCE_DIR}/tests)
IF(NOT GCOV_PATH)
MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
MESSAGE(FATAL_ERROR "gcov not found! Aborting...")
ENDIF() # NOT GCOV_PATH
IF(NOT CMAKE_COMPILER_IS_GNUCXX)
# Clang version 3.0.0 and greater now supports gcov as well.
MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
# Clang version 3.0.0 and greater now supports gcov as well.
MESSAGE(WARNING "Compiler is not GNU gcc! Clang Version 3.0.0 and greater supports gcov as well, but older versions don't.")
IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
ENDIF()
IF(NOT "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
MESSAGE(FATAL_ERROR "Compiler is not GNU gcc! Aborting...")
ENDIF()
ENDIF() # NOT CMAKE_COMPILER_IS_GNUCXX
SET(CMAKE_CXX_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C++ compiler during coverage builds."
FORCE )
SET(CMAKE_C_FLAGS_COVERAGE
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
"-g -O0 --coverage -fprofile-arcs -ftest-coverage"
CACHE STRING "Flags used by the C compiler during coverage builds."
FORCE )
SET(CMAKE_EXE_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
""
CACHE STRING "Flags used for linking binaries during coverage builds."
FORCE )
SET(CMAKE_SHARED_LINKER_FLAGS_COVERAGE
""
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
""
CACHE STRING "Flags used by the shared libraries linker during coverage builds."
FORCE )
MARK_AS_ADVANCED(
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
CMAKE_CXX_FLAGS_COVERAGE
CMAKE_C_FLAGS_COVERAGE
CMAKE_EXE_LINKER_FLAGS_COVERAGE
CMAKE_SHARED_LINKER_FLAGS_COVERAGE )
IF ( NOT (CMAKE_BUILD_TYPE STREQUAL "Debug" OR CMAKE_BUILD_TYPE STREQUAL "Coverage"))
MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
MESSAGE( WARNING "Code coverage results with an optimized (non-Debug) build may be misleading" )
ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
......@@ -123,38 +123,38 @@ ENDIF() # NOT CMAKE_BUILD_TYPE STREQUAL "Debug"
# Pass them in list form, e.g.: "-j;2" for -j 2
FUNCTION(SETUP_TARGET_FOR_COVERAGE _targetname _testrunner _outputname)
IF(NOT LCOV_PATH)
MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
ENDIF() # NOT LCOV_PATH
IF(NOT LCOV_PATH)
MESSAGE(FATAL_ERROR "lcov not found! Aborting...")
ENDIF() # NOT LCOV_PATH
IF(NOT GENHTML_PATH)
MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
ENDIF() # NOT GENHTML_PATH
IF(NOT GENHTML_PATH)
MESSAGE(FATAL_ERROR "genhtml not found! Aborting...")
ENDIF() # NOT GENHTML_PATH
# Setup target
ADD_CUSTOM_TARGET(${_targetname}
# Setup target
ADD_CUSTOM_TARGET(${_targetname}
# Cleanup lcov
${LCOV_PATH} --directory . --zerocounters
# Cleanup lcov
${LCOV_PATH} --directory . --zerocounters
# Run tests
COMMAND ${_testrunner} -R Boost ${ARGV3}
# Run tests
COMMAND ${_testrunner} -R Boost ${ARGV3}
# Capturing lcov counters and generating report
COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
# Capturing lcov counters and generating report
COMMAND ${LCOV_PATH} --directory . --capture --output-file ${_outputname}.info
COMMAND ${LCOV_PATH} --remove ${_outputname}.info 'tests/*' '/usr/*' --output-file ${_outputname}.info.cleaned
COMMAND ${GENHTML_PATH} -o ${_outputname} ${_outputname}.info.cleaned
COMMAND ${CMAKE_COMMAND} -E remove ${_outputname}.info ${_outputname}.info.cleaned
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
)
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Resetting code coverage counters to zero.\nProcessing code coverage counters and generating report."
)
# Show info where to find the report
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
COMMAND ;
COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
)
# Show info where to find the report
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
COMMAND ;
COMMENT "Open ./${_outputname}/index.html in your browser to view the coverage report."
)
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
......@@ -165,30 +165,30 @@ ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE
# Pass them in list form, e.g.: "-j;2" for -j 2
FUNCTION(SETUP_TARGET_FOR_COVERAGE_COBERTURA _targetname _testrunner _outputname)
IF(NOT PYTHON_EXECUTABLE)
MESSAGE(FATAL_ERROR "Python 3 not found! Aborting...")
ENDIF() # NOT PYTHON_EXECUTABLE
IF(NOT PYTHON_EXECUTABLE)
MESSAGE(FATAL_ERROR "Python 3 not found! Aborting...")
ENDIF() # NOT PYTHON_EXECUTABLE
IF(NOT GCOVR_PATH)
MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
ENDIF() # NOT GCOVR_PATH
IF(NOT GCOVR_PATH)
MESSAGE(FATAL_ERROR "gcovr not found! Aborting...")
ENDIF() # NOT GCOVR_PATH
ADD_CUSTOM_TARGET(${_targetname}
ADD_CUSTOM_TARGET(${_targetname}
# Run tests
MESSAGE(WARNING "running: " ${_testrunner} -R Boost ${ARGV3})
${_testrunner} -R Boost ${ARGV3}
# Run tests
MESSAGE(WARNING "running: " ${_testrunner} -R Boost ${ARGV3})
${_testrunner} -R Boost ${ARGV3}
# Running gcovr
COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
# Running gcovr
COMMAND ${GCOVR_PATH} -x -r ${CMAKE_SOURCE_DIR} -e '${CMAKE_SOURCE_DIR}/tests/' -o ${_outputname}.xml
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
COMMENT "Running gcovr to produce Cobertura code coverage report."
)
# Show info where to find the report
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
COMMAND ;
COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
)
# Show info where to find the report
ADD_CUSTOM_COMMAND(TARGET ${_targetname} POST_BUILD
COMMAND ;
COMMENT "Cobertura code coverage report saved in ${_outputname}.xml."
)
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
\ No newline at end of file
ENDFUNCTION() # SETUP_TARGET_FOR_COVERAGE_COBERTURA
......@@ -75,4 +75,4 @@ function(PROTOBUF_GENERATE_GRPC_CPP SRCS HDRS)
set_source_files_properties(${${SRCS}} ${${HDRS}} PROPERTIES GENERATED TRUE)
set(${SRCS} ${${SRCS}} PARENT_SCOPE)
set(${HDRS} ${${HDRS}} PARENT_SCOPE)
endfunction()
\ No newline at end of file
endfunction()
......@@ -106,7 +106,7 @@ int main(int argc, char** argv)
// some statistics output
if (configuration->ShowStatistics()) {
sim.PrintStatistics();
sim.PrintStatistics(evacTime);// negative means end of simulation
}
if (sim.GetPedsNumber()) {
......
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