Commit 0fa81773 authored by Mohcine Chraibi's avatar Mohcine Chraibi

Merge branch '98-PersID' into 'develop'

Resolve "Method D | IndividualFD file use wrong PersID"

Closes #98

See merge request !15
parents 5fd5e462 19030045
Pipeline #17830 passed with stages
in 32 seconds
......@@ -25,8 +25,7 @@ configure-linux:
script:
- mkdir -p build
- cd build
- which git
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-8 ..
- cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-8 ..
- echo "configure | ${CI_PROJECT_DIR}"
stage: configure
tags:
......
......@@ -37,6 +37,7 @@
#include "methods/Method_B.h"
#include "methods/Method_C.h"
#include "methods/Method_D.h"
#include "methods/Method_I.h"
#include "methods/PedData.h"
#include <iostream>
......@@ -58,7 +59,7 @@
#endif
using boost::geometry::dsv;
using namespace std;
OutputHandler* Log = new STDIOHandler();
......@@ -139,7 +140,7 @@ void Analysis::InitArgs(ArgumentParser* args)
}
}
if(args ->GetIsMethodC()) {
if(args->GetIsMethodC()) {
_DoesUseMethodC = true;
vector<int> Measurement_Area_IDs = args->GetAreaIDforMethodC();
for(unsigned int i=0; i<Measurement_Area_IDs.size(); i++)
......@@ -149,7 +150,7 @@ void Analysis::InitArgs(ArgumentParser* args)
_plotTimeseriesC=args->GetIsPlotTimeSeriesC();
}
if(args ->GetIsMethodD()) {
if(args->GetIsMethodD()) {
_DoesUseMethodD = true;
vector<int> Measurement_Area_IDs = args->GetAreaIDforMethodD();
for(unsigned int i=0; i<Measurement_Area_IDs.size(); i++)
......@@ -160,6 +161,20 @@ void Analysis::InitArgs(ArgumentParser* args)
_StopFramesMethodD = args->GetStopFramesMethodD();
_IndividualFDFlags = args->GetIndividualFDFlags();
_plotTimeseriesD=args->GetIsPlotTimeSeriesD();
_geoPoly = ReadGeometry(args->GetGeometryFilename(), _areaForMethod_D);
}
if(args->GetIsMethodI()) {
_DoesUseMethodI = true;
vector<int> Measurement_Area_IDs = args->GetAreaIDforMethodI();
for(unsigned int i=0; i<Measurement_Area_IDs.size(); i++)
{
_areaForMethod_I.push_back(dynamic_cast<MeasurementArea_B*>( args->GetMeasurementArea(Measurement_Area_IDs[i])));
}
_StartFramesMethodI = args->GetStartFramesMethodI();
_StopFramesMethodI = args->GetStopFramesMethodI();
_IndividualFDFlags = args->GetIndividualFDFlags();
_plotTimeseriesI=args->GetIsPlotTimeSeriesI();
_geoPoly = ReadGeometry(args->GetGeometryFilename(), _areaForMethod_I);
}
_deltaF = args->GetDelatT_Vins();
......@@ -173,7 +188,6 @@ void Analysis::InitArgs(ArgumentParser* args)
_IgnoreBackwardMovement =args->GetIgnoreBackwardMovement();
_grid_size_X = int(args->GetGridSizeX());
_grid_size_Y = int(args->GetGridSizeY());
_geoPoly = ReadGeometry(args->GetGeometryFilename(), _areaForMethod_D);
_geometryFileName=args->GetGeometryFilename();
_projectRootDir=args->GetProjectRootDir();
_trajFormat=args->GetFileFormat();
......@@ -186,11 +200,11 @@ void Analysis::InitArgs(ArgumentParser* args)
std::map<int, polygon_2d> Analysis::ReadGeometry(const fs::path& geometryFile, const std::vector<MeasurementArea_B*>& areas)
{
_building = new Building();
_building->LoadGeometry(geometryFile.string());
// create the polygons
_building->InitGeometry();
// _building->AddSurroundingRoom();
double geo_minX = FLT_MAX;
double geo_minY = FLT_MAX;
......@@ -208,10 +222,8 @@ std::map<int, polygon_2d> Analysis::ReadGeometry(const fs::path& geometryFile, c
for (auto&& it_sub : it_room.second->GetAllSubRooms())
{
SubRoom* subroom = it_sub.second.get();
point_2d point(0,0);
boost::geometry::centroid(area->_poly,point);
//check if the area is contained in the obstacle
if(subroom->IsInSubRoom(Point(point.x()/M2CM,point.y()/M2CM)))
{
......@@ -232,7 +244,6 @@ std::map<int, polygon_2d> Analysis::ReadGeometry(const fs::path& geometryFile, c
geoPoly[area->_id].inners().resize(k++);
geoPoly[area->_id].inners().back();
model::ring<point_2d>& inner = geoPoly[area->_id].inners().back();
for(auto&& tmp_point:obst->GetPolygon())
{
append(inner, make<point_2d>(tmp_point._x*M2CM, tmp_point._y*M2CM));
......@@ -241,12 +252,12 @@ std::map<int, polygon_2d> Analysis::ReadGeometry(const fs::path& geometryFile, c
}
}
}
}
}//room
if(geoPoly.count(area->_id)==0)
{
Log->Write("ERROR: \t No polygon containing the measurement id [%d]", area->_id);
exit(1);
geoPoly[area->_id] = area->_poly;
}
}
......@@ -254,9 +265,6 @@ std::map<int, polygon_2d> Analysis::ReadGeometry(const fs::path& geometryFile, c
_highVertexY = geo_maxY;
_lowVertexX = geo_minX;
_lowVertexY = geo_minY;
// using boost::geometry::dsv;
// cout<<"INFO: \tGeometry polygon is:\t" << dsv(geoPoly[1])<<endl;
return geoPoly;
}
......@@ -275,7 +283,7 @@ int Analysis::RunAnalysis(const fs::path& filename, const fs::path& path)
for(int frameNr = 0; frameNr < data.GetNumFrames(); frameNr++ )
{
vector<int> ids=_peds_t[frameNr];
vector<int> IdInFrame = data.GetIdInFrame(ids);
vector<int> IdInFrame = data.GetIdInFrame(frameNr, ids);
vector<double> XInFrame = data.GetXInFrame(frameNr, ids);
vector<double> YInFrame = data.GetYInFrame(frameNr, ids);
for( unsigned int i=0;i<IdInFrame.size();i++)
......@@ -441,6 +449,61 @@ int Analysis::RunAnalysis(const fs::path& filename, const fs::path& path)
}
}
}
if(_DoesUseMethodI) //method_I
{
if(_areaForMethod_I.empty())
{
Log->Write("ERROR: Method I selected with no measurement area!");
exit(EXIT_FAILURE);
}
#pragma omp parallel for
for(long unsigned int i=0; i<_areaForMethod_I.size(); i++)
{
Method_I method_I;
method_I.SetStartFrame(_StartFramesMethodI[i]);
method_I.SetStopFrame(_StopFramesMethodI[i]);
method_I.SetCalculateIndividualFD(_IndividualFDFlags[i]);
method_I.SetGeometryPolygon(_geoPoly[_areaForMethod_I[i]->_id]);
method_I.SetGeometryFileName(_geometryFileName);
method_I.SetGeometryBoundaries(_lowVertexX, _lowVertexY, _highVertexX, _highVertexY);
method_I.SetGridSize(_grid_size_X, _grid_size_Y);
method_I.SetOutputVoronoiCellData(_outputGraph);
method_I.SetPlotVoronoiGraph(_plotGraph);
method_I.SetPlotVoronoiIndex(_plotIndex);
method_I.SetDimensional(_isOneDimensional);
method_I.SetCalculateProfiles(_getProfile);
method_I.SetTrajectoriesLocation(path);
if(_cutByCircle)
{
method_I.Setcutbycircle(_cutRadius, _circleEdges);
}
method_I.SetMeasurementArea(_areaForMethod_I[i]);
bool result_I = method_I.Process(data,_scriptsLocation, _areaForMethod_I[i]->_zPos);
if(result_I)
{
Log->Write("INFO:\tSuccess with Method I using measurement area id %d!\n",_areaForMethod_I[i]->_id);
std::cout << "INFO:\tSuccess with Method I using measurement area id "<< _areaForMethod_I[i]->_id << "\n";
if(_plotTimeseriesI[i])
{
string parameters_Timeseries= " " +_scriptsLocation.string()+"/_Plot_timeseries_rho_v.py -p "+ _projectRootDir.string()+VORO_LOCATION + " -n "+filename.string()+
" -f "+boost::lexical_cast<std::string>(data.GetFps());
parameters_Timeseries = PYTHON + parameters_Timeseries;
std::cout << parameters_Timeseries << "\n;";
int res=system(parameters_Timeseries.c_str());
Log->Write("INFO:\t time series result: %d ",res);
}
}
else
{
Log->Write("INFO:\tFailed with Method I using measurement area id %d!\n",_areaForMethod_I[i]->_id);
}
}
}
return 0;
}
......
......@@ -125,8 +125,14 @@ private:
bool _DoesUseMethodB; // Method B (Zhang2011a)
bool _DoesUseMethodC; // Method C //calculate and save results of classic in separate file
bool _DoesUseMethodD; // Method D--Voronoi method
bool _DoesUseMethodI; // Method I--Voronoi method modified
// no measurement are)
std::vector<int> _StartFramesMethodD;
std::vector<int> _StopFramesMethodD;
std::vector<int> _StartFramesMethodI;
std::vector<int> _StopFramesMethodI;
std::vector<bool> _IndividualFDFlags;
bool _cutByCircle; //Adjust whether cut each original voronoi cell by a circle
double _cutRadius;
......@@ -141,6 +147,7 @@ private:
std::vector<bool> _plotTimeseriesA;
std::vector<bool> _plotTimeseriesC;
std::vector<bool> _plotTimeseriesD;
std::vector<bool> _plotTimeseriesI;
bool _isOneDimensional;
bool _calcIndividualFD; //Adjust whether analyze the individual density and velocity of each pedestrian in stationary state (ALWAYS VORONOI-BASED)
std::string _vComponent; // to mark whether x, y or x and y coordinate are used when calculating the velocity
......@@ -156,6 +163,10 @@ private:
std::vector<MeasurementArea_B*> _areaForMethod_B;
std::vector<MeasurementArea_B*> _areaForMethod_C;
std::vector<MeasurementArea_B*> _areaForMethod_D;
std::vector<MeasurementArea_B*> _areaForMethod_I; // we still need to know
// the zpos of the
// measurement are, even
// if we don't use its polygon
};
#endif /*ANALYSIS_H_*/
......@@ -180,6 +180,7 @@ set(methods
methods/Method_B.cpp
methods/Method_C.cpp
methods/Method_D.cpp
methods/Method_I.cpp
)
set(source_files
Analysis.cpp
......@@ -211,6 +212,7 @@ set ( header_files
methods/Method_B.h
methods/Method_C.h
methods/Method_D.h
methods/Method_I.h
IO/OutputHandler.h
general/ArgumentParser.h
general/Macros.h
......@@ -310,14 +312,14 @@ endif()
#message (STATUS "PSAPI: ${PSAPI}")
#endif()
add_library ( geometrycore STATIC ${source_files} )
add_library ( geometrycore SHARED ${source_files} ${methods})
set_property(TARGET geometrycore PROPERTY CXX_STANDARD 17)
set_property(TARGET geometrycore PROPERTY CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
target_link_libraries(geometrycore stdc++fs)
add_executable(
jpsreport main.cpp ${methods}
jpsreport main.cpp
)
set_property(TARGET jpsreport PROPERTY CXX_STANDARD 17)
......
......@@ -116,6 +116,35 @@ void OutputHandler::Write(const char* message,...)
}
}
void STDIOHandler::Write(const char* message,...)
{
char msg[CLENGTH]="";
va_list ap;
va_start(ap, message);
vsprintf(msg, message, ap);
va_end(ap);
string str(msg);
if (str.find("ERROR") != string::npos)
{
cerr << msg << endl;
cerr.flush();
incrementErrors();
}
else if (str.find("WARNING") != string::npos)
{
cerr << msg << endl;
cerr.flush();
incrementWarnings();
}
else
{ // infos
cout << msg << endl;
cout.flush();
}
}
void STDIOHandler::Write(const string& str)
{
if (str.find("ERROR") != string::npos)
......
......@@ -61,6 +61,7 @@ public:
class STDIOHandler : public OutputHandler {
public:
void Write(const std::string& str);
void Write(const char *string,...);
};
class FileHandler : public OutputHandler {
......
This diff is collapsed.
......@@ -69,6 +69,7 @@ private:
bool _isMethodB;
bool _isMethodC;
bool _isMethodD;
bool _isMethodI;
bool _isCutByCircle;
double _cutRadius;
int _circleEdges;
......@@ -88,15 +89,19 @@ private:
std::vector<int> _areaIDforMethodB;
std::vector<int> _areaIDforMethodC;
std::vector<int> _areaIDforMethodD;
std::vector<int> _areaIDforMethodI;
float _grid_size_X;
float _grid_size_Y;
int _log;
std::vector<int> _start_frames_MethodD;
std::vector<int> _stop_frames_MethodD;
std::vector<int> _start_frames_MethodI;
std::vector<int> _stop_frames_MethodI;
std::vector<bool> _individual_FD_flags;
std::vector<bool> _isPlotTimeSeriesA;
std::vector<bool> _isPlotTimeSeriesC;
std::vector<bool> _isPlotTimeSeriesD;
std::vector<bool> _isPlotTimeSeriesI;
std::vector<int> _timeIntervalA;
......@@ -131,12 +136,16 @@ public:
bool GetIsMethodB() const;
bool GetIsMethodC() const;
bool GetIsMethodD() const;
bool GetIsMethodI() const;
std::vector<int> GetAreaIDforMethodA() const;
std::vector<int> GetAreaIDforMethodB() const;
std::vector<int> GetAreaIDforMethodC() const;
std::vector<int> GetAreaIDforMethodD() const;
std::vector<int> GetAreaIDforMethodI() const;
std::vector<int> GetStartFramesMethodD() const;
std::vector<int> GetStopFramesMethodD() const;
std::vector<int> GetStartFramesMethodI() const;
std::vector<int> GetStopFramesMethodI() const;
std::vector<bool> GetIndividualFDFlags() const;
bool GetIsCutByCircle() const;
double GetCutRadius() const;
......@@ -147,6 +156,7 @@ public:
std::vector<bool> GetIsPlotTimeSeriesA() const;
std::vector<bool> GetIsPlotTimeSeriesC() const;
std::vector<bool> GetIsPlotTimeSeriesD() const;
std::vector<bool> GetIsPlotTimeSeriesI() const;
bool GetIsOneDimensional() const;
bool GetIsIndividualFD() const;
polygon_2d GetAreaIndividualFD() const;
......
......@@ -38,6 +38,36 @@
#include <sstream>
#include <iostream>
#include <boost/polygon/voronoi.hpp>
using boost::polygon::voronoi_builder;
using boost::polygon::voronoi_diagram;
#include <boost/geometry.hpp>
#include <boost/geometry/geometry.hpp>
#include <boost/geometry/geometries/point_xy.hpp>
#include <boost/geometry/geometries/polygon.hpp>
#include <boost/geometry/geometries/adapted/c_array.hpp>
#include <boost/geometry/geometries/ring.hpp>
#include <boost/geometry/algorithms/intersection.hpp>
#include <boost/geometry/algorithms/within.hpp>
#include <boost/foreach.hpp>
//#include "../general/Macros.h"
typedef boost::geometry::model::d2::point_xy<double, boost::geometry::cs::cartesian> point_2d;
typedef boost::geometry::model::polygon<point_2d> polygon_2d;
typedef std::vector<polygon_2d > polygon_list;
typedef boost::geometry::model::segment<boost::geometry::model::d2::point_xy<double> > segment;
typedef boost::polygon::point_data<double> point_type2;
typedef double coordinate_type;
typedef boost::polygon::voronoi_diagram<double> VD;
typedef VD::edge_type edge_type;
typedef VD::cell_type cell_type;
typedef VD::cell_type::source_index_type source_index_type;
#ifndef M_PI
#define M_PI 3.14159265358979323846
......@@ -174,6 +204,37 @@ inline char xmltoc(const char * t, const char v = '\0')
return v;
}
inline std::string polygon_to_string(const polygon_2d & polygon)
{
std::string polygon_str = "((";
for(auto point: boost::geometry::exterior_ring(polygon) )
{
double x = boost::geometry::get<0>(point);
double y = boost::geometry::get<1>(point);
polygon_str.append("(");
polygon_str.append(std::to_string(x));
polygon_str.append(", ");
polygon_str.append(std::to_string(y));
polygon_str.append("), ");
}
for(auto pRing: boost::geometry::interior_rings(polygon) )
{
for(auto point: pRing )
{
double x = boost::geometry::get<0>(point);
double y = boost::geometry::get<1>(point);
polygon_str.append("(");
polygon_str.append(std::to_string(x));
polygon_str.append(", ");
polygon_str.append(std::to_string(y));
polygon_str.append("), ");
}
}
polygon_str.pop_back(); polygon_str.pop_back(); //remove last komma
polygon_str.append("))");
return polygon_str;
}
/**
* @return true if the element is present in the vector
*/
......
......@@ -217,6 +217,26 @@ void Building::AddSurroundingRoom()
y_max = (ymax >= y_max) ? ymax : y_max;
y_min = (ymin <= y_min) ? ymin : y_min;
}
for(auto&& obs:itr_subroom.second->GetAllObstacles())
{
for(auto&& wall: obs->GetAllWalls())
{
double x1 = wall.GetPoint1().GetX();
double y1 = wall.GetPoint1().GetY();
double x2 = wall.GetPoint2().GetX();
double y2 = wall.GetPoint2().GetY();
double xmax = (x1 > x2) ? x1 : x2;
double xmin = (x1 > x2) ? x2 : x1;
double ymax = (y1 > y2) ? y1 : y2;
double ymin = (y1 > y2) ? y2 : y1;
x_min = (xmin <= x_min) ? xmin : x_min;
x_max = (xmax >= x_max) ? xmax : x_max;
y_max = (ymax >= y_max) ? ymax : y_max;
y_min = (ymin <= y_min) ? ymin : y_min;
}
}
}
}
......@@ -245,20 +265,30 @@ void Building::AddSurroundingRoom()
x_max = x_max + 10.0;
y_min = y_min - 10.0;
y_max = y_max + 10.0;
Log->Write("INFO: \tAdding surrounding room X: %f, Y: %f -- %f, %f\n", x_min, x_max, y_min, y_max);
SubRoom* bigSubroom = new NormalSubRoom();
bigSubroom->SetType("Subroom");
bigSubroom->SetPlanEquation(0,0,1); //@todo: dummy values
bigSubroom->SetRoomID(_rooms.size());
bigSubroom->SetSubRoomID(0); // should be the single subroom
bigSubroom->AddWall(Wall(Point(x_min, y_min), Point(x_min, y_max)));
bigSubroom->AddWall(Wall(Point(x_min, y_max), Point(x_max, y_max)));
bigSubroom->AddWall(Wall(Point(x_max, y_max), Point(x_max, y_min)));
bigSubroom->AddWall(Wall(Point(x_max, y_min), Point(x_min, y_min)));
vector<Line*> goals = vector<Line*>(); // dummy vector
bigSubroom->ConvertLineToPoly(goals);
Room * bigRoom = new Room();
bigRoom->AddSubRoom(bigSubroom);
bigRoom->SetCaption("outside");
bigRoom->SetID(_rooms.size());
bigRoom->SetZPos(0); //@todo: dummy value
AddRoom(bigRoom);
_xMin = x_min;
_xMax = x_max;
_yMin = y_min;
_yMax = y_max;
}
......@@ -1411,5 +1441,3 @@ bool Building::SaveGeometry(const std::string &filename)
}
#endif // _SIMULATOR
......@@ -24,7 +24,7 @@
*
*
**/
#ifndef _BUILDING_H
#define _BUILDING_H
......@@ -206,6 +206,11 @@ public:
* output user specific informations.
*/
bool SanityCheck();
// ---
double _xMin;
double _xMax;
double _yMin;
double _yMax;
private:
......
......@@ -379,8 +379,8 @@ bool SubRoom::IsVisible(const Line &wall, const Point &position)
return wall_is_vis;
}
// p1 and p2 are supposed to be pedestrian's positions. This function does not work properly
// for visibility checks with walls, since the line connecting the pedestrian's position
// p1 and p2 are supposed to be pedestrian's positions. This function does not work properly
// for visibility checks with walls, since the line connecting the pedestrian's position
// with the nearest point on the wall IS intersecting with the wall.
bool SubRoom::IsVisible(const Point& p1, const Point& p2, bool considerHlines)
{
......@@ -744,13 +744,13 @@ string NormalSubRoom::WriteSubRoom() const
s.append("\t\t</wall>\n");
}
const Point& pos = obst->GetCentroid();
const Point& posCenter = obst->GetCentroid();
//add the obstacle caption
char tmp[CLENGTH];
sprintf(tmp, "\t\t<label centerX=\"%.2f\" centerY=\"%.2f\" centerZ=\"%.2f\" text=\"%d\" color=\"100\" />\n"
, pos.GetX() * FAKTOR, pos.GetY() * FAKTOR,GetElevation(pos)*FAKTOR ,obst->GetId());
s.append(tmp);
char Tmp[CLENGTH];
sprintf(Tmp, "\t\t<label centerX=\"%.2f\" centerY=\"%.2f\" centerZ=\"%.2f\" text=\"%d\" color=\"100\" />\n"
, posCenter.GetX() * FAKTOR, posCenter.GetY() * FAKTOR,GetElevation(posCenter)*FAKTOR ,obst->GetId());
s.append(Tmp);
}
return s;
......
......@@ -38,8 +38,8 @@ Method_A::Method_A()
{
_classicFlow = 0;
_vDeltaT = 0;
ub::matrix<double> _xCor(0,0);
ub::matrix<double> _yCor(0,0);
_xCor(0,0);
_yCor(0,0);
_firstFrame = nullptr;
_passLine = nullptr;
_deltaT = 100;
......
......@@ -34,8 +34,8 @@ using std::vector;
Method_B::Method_B()
{
ub::matrix<double> _xCor(0,0);
ub::matrix<double> _yCor(0,0);
_xCor(0,0);
_yCor(0,0);
_tIn = nullptr;
_tOut = nullptr;
_entrancePoint = {};
......
......@@ -198,7 +198,7 @@ bool Method_D::Process (const PedData& peddata,const fs::path& scriptsLocation,
}
if(_outputVoronoiCellData)
{ // output the Voronoi polygons of a frame
OutputVoroGraph(str_frid, polygons_id, NumPeds, XInFrame, YInFrame,VInFrame);
OutputVoroGraph(str_frid, polygons_id, NumPeds, VInFrame);
}
}
else
......@@ -404,7 +404,7 @@ void Method_D::GetProfiles(const string& frameId, const vector<polygon_2d>& poly
fclose(Prf_density);
}
void Method_D::OutputVoroGraph(const string & frameId, std::vector<std::pair<polygon_2d, int> >& polygons_id, int numPedsInFrame, vector<double>& XInFrame, vector<double>& YInFrame,const vector<double>& VInFrame)
void Method_D::OutputVoroGraph(const string & frameId, std::vector<std::pair<polygon_2d, int> >& polygons_id, int numPedsInFrame,const vector<double>& VInFrame)
{
//string voronoiLocation=_projectRootDir+"./Output/Fundamental_Diagram/Classical_Voronoi/VoronoiCell/id_"+_measureAreaId;
......@@ -444,9 +444,9 @@ void Method_D::OutputVoroGraph(const string & frameId, std::vector<std::pair<po
if(polys.is_open())
{
//for(vector<polygon_2d> polygon_iterator=polygons.begin(); polygon_iterator!=polygons.end(); polygon_iterator++)
for(auto && p:polygons_id)
for(auto && p_it : polygons_id)
{
poly = p.first;
poly = p_it.first;
for(auto&& point:poly.outer())
{
point.x(point.x()*CMtoM);
......@@ -460,7 +460,7 @@ void Method_D::OutputVoroGraph(const string & frameId, std::vector<std::pair<po
point.y(point.y()*CMtoM);
}
}
polys << p.second << " | " << dsv(poly) << endl;
polys << p_it.second << " | " << dsv(poly) << endl;
//polys <<dsv(poly)<< endl;
}
}
......@@ -530,7 +530,7 @@ void Method_D::OutputVoroGraph(const string & frameId, std::vector<std::pair<po
velo.close();
}
std::string polygon_to_string(const polygon_2d & polygon)
/*std::string polygon_to_string(const polygon_2d & polygon)
{
string polygon_str = "((";
for(auto point: boost::geometry::exterior_ring(polygon) )
......@@ -559,7 +559,7 @@ std::string polygon_to_string(const polygon_2d & polygon)
polygon_str.pop_back(); polygon_str.pop_back(); //remove last komma
polygon_str.append("))");
return polygon_str;
}
}*/
void Method_D::GetIndividualFD(const vector<polygon_2d>& polygon, const vector<double>& Velocity, const vector<int>& Id, const polygon_2d& measureArea, const string& frid)
{
......
......@@ -102,8 +102,7 @@ private:
void OutputVoronoiResults(const std::vector<polygon_2d>& polygons, const std::string& frid, const std::vector<double>& VInFrame);
std::tuple<double,double> GetVoronoiDensityVelocity(const std::vector<polygon_2d>& polygon, const std::vector<double>& Velocity, const polygon_2d & measureArea);
void GetProfiles(const std::string& frameId, const std::vector<polygon_2d>& polygons, const std::vector<double>& velocity);
void OutputVoroGraph(const std::string & frameId, std::vector<std::pair<polygon_2d, int> >& polygons, int numPedsInFrame,std::vector<double>& XInFrame,
std::vector<double>& YInFrame,const std::vector<double>& VInFrame);