Commit daf0257e authored by Arne Graf's avatar Arne Graf

Conf not const, dist-field good

parent 0222c50a
Pipeline #3426 failed with stages
in 8 seconds
......@@ -24,7 +24,7 @@
#include "../geometry/Goal.h"
#include "../geometry/SubRoom.h"
GeoFileParser::GeoFileParser(const Configuration* configuration)
GeoFileParser::GeoFileParser(Configuration* configuration)
:_configuration(configuration)
{
......
......@@ -33,7 +33,7 @@
class GeoFileParser : public GeometryReader {
public:
GeoFileParser(const Configuration* configuration);
GeoFileParser(Configuration* configuration);
~GeoFileParser();
virtual void LoadBuilding(Building* building) override;
......
......@@ -50,7 +50,7 @@ using namespace std;
OutputHandler* Log;
Simulation::Simulation(const Configuration* args)
Simulation::Simulation(Configuration* args)
:_config(args)
{
_nPeds = 0;
......
......@@ -79,7 +79,7 @@ private:
/// EventManager
EventManager* _em;
/// config
const Configuration* _config;
Configuration* _config;
/// Agents sources manager
AgentsSourcesManager _agentSrcManager;
/// hybrid simulation manager
......@@ -91,7 +91,7 @@ public:
/**
* Constructor
*/
Simulation(const Configuration* args);
Simulation(Configuration* args);
/**
* Destructor
......
......@@ -186,7 +186,9 @@ enum FloorfieldMode {
FF_CENTRALPOINT,
FF_FULL_LINE,
FF_WALL_AVOID,
FF_HOMO_SPEED
FF_HOMO_SPEED,
FF_ROOM_SCALE,
FF_SUBROOM_SCALE
};
enum MagicNumbers{
......
......@@ -67,7 +67,7 @@ Building::Building()
#ifdef _SIMULATOR
Building::Building(const Configuration* configuration, PedDistributor& pedDistributor)
Building::Building(Configuration* configuration, PedDistributor& pedDistributor)
:_configuration(configuration),
_routingEngine(
configuration->GetRoutingEngine()),
......@@ -156,7 +156,7 @@ Building::~Building()
}
}
const Configuration* Building::GetConfig() const {
Configuration* Building::GetConfig() const {
return _configuration;
}
......
......@@ -61,7 +61,7 @@ class Configuration;
class Building {
private:
const Configuration* _configuration;
Configuration* _configuration;
std::shared_ptr<RoutingEngine> _routingEngine;
std::string _caption;
std::string _geometryFilename;
......@@ -82,12 +82,12 @@ public:
Building();
// Building(const std::string &, const std::string &, RoutingEngine &, PedDistributor &, double);
Building(const Configuration* config, PedDistributor& pedDistributor);
Building(Configuration* config, PedDistributor& pedDistributor);
/// destructor
virtual ~Building();
const Configuration* GetConfig() const;
Configuration* GetConfig() const;
void SetCaption(const std::string& s);
......
This diff is collapsed.
......@@ -81,10 +81,10 @@ class UnivFFviaFM {
public:
UnivFFviaFM(Room* a, Building* b, double c, double e, bool f);
UnivFFviaFM(SubRoom* a, Building* b, double c, double e, bool f);
UnivFFviaFM(Room *a, const Configuration *b, double hx, double wallAvoid, bool useWallAvoid);
UnivFFviaFM(Room *a, const Configuration *b, double hx, double wallAvoid, bool useWallAvoid, std::vector<int> wantedDoors);
UnivFFviaFM(SubRoom *sr, const Configuration *conf, double hx, double wallAvoid, bool useWallAvoid);
UnivFFviaFM(SubRoom *subRoomArg, const Configuration *confArg, double hx, double wallAvoid, bool useWallAvoid, std::vector<int> wantedDoors);
UnivFFviaFM(Room* a, Configuration* const b, double hx, double wallAvoid, bool useWallAvoid);
UnivFFviaFM(Room* a, Configuration* const b, double hx, double wallAvoid, bool useWallAvoid, std::vector<int> wantedDoors);
UnivFFviaFM(SubRoom* sr, Configuration* const conf, double hx, double wallAvoid, bool useWallAvoid);
UnivFFviaFM(SubRoom* subRoomArg, Configuration* const confArg, double hx, double wallAvoid, bool useWallAvoid, std::vector<int> wantedDoors);
void create(std::vector<Line>& walls, std::map<int, Line>& doors, std::vector<int> targetUIDs, int mode,
double spacing, double wallAvoidDist, bool useWallAvoid);
UnivFFviaFM() {};
......@@ -105,6 +105,7 @@ public:
void createRectGrid(std::vector<Line>& walls, std::map<int, Line>& doors, double spacing);
void processGeometry(std::vector<Line>&walls, std::map<int, Line>& doors);
void createReduWallSpeed(double* reduWallSpeed);
void drawLinesOnGrid(std::map<int, Line>& doors, int *const grid);
template <typename T>
......@@ -112,8 +113,15 @@ public:
template <typename T>
void drawLinesOnGrid(Line& line, T* const target, const T value);
template <typename T>
void drawLinesOnWall(std::vector<Line>& wallArg, T* const target, const T value);
template <typename T>
void drawLinesOnWall(Line& line, T* const target, const T value);
void calcFF(double*, Point*, const double* const);
void calcCost(const long int key, double* cost, Point* dir, const double* const speed);
void calcDF(double*, Point*, const double* const);
void calcDist(const long int key, double* cost, Point* dir, const double* const speed);
inline double onesidedCalc(double xy, double hDivF);
inline double twosidedCalc(double x, double y, double hDivF);
......@@ -123,6 +131,7 @@ private:
int _mode = LINESEGMENT; //default
int _user = DISTANCE_AND_DIRECTIONS_USED; //default
int _speedmode = FF_HOMO_SPEED; //default
int _scope = 0; //not set / unknown
RectGrid* _grid = nullptr;
long int _nPoints = 0;
std::vector<double*> _speedFieldSelector;
......
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