KrauszModel.h 4.29 KB
 carlos committed Jul 19, 2016 1 2 3 4 5 /** * \file KrauszModel.h * \date Jul 19, 2016 * \version v0.7 * \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.  Mohcine Chraibi committed Nov 15, 2018 6  * \ingroup OperationalModels  carlos committed Jul 19, 2016 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24  * * \section License * This file is part of JuPedSim. * * JuPedSim is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * JuPedSim is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with JuPedSim. If not, see . * * \section Description  Mohcine Chraibi committed Nov 15, 2018 25  * Implementation of classes for force-based models.*  carlos committed Jul 19, 2016 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44  * **/ #ifndef KrauszMODEL_H_ #define KrauszMODEL_H_ #include #include "../geometry/Building.h" #include "OperationalModel.h" //forward declaration class Pedestrian; class DirectionStrategy;  Mohcine Chraibi committed Nov 15, 2018 45 46 47 48 49 50 51 52 53 /*! * \class KrauszModel * * \brief @todo * *\ingroup OperationalModels * * \author Carlos */  carlos committed Jul 19, 2016 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 class KrauszModel : public OperationalModel { public: KrauszModel(std::shared_ptr dir, double nuped, double nuwall, double dist_effPed, double dist_effWall, double intp_widthped, double intp_widthwall, double maxfped, double maxfwall); virtual ~KrauszModel(void); // Getter std::shared_ptr GetDirection() const; double GetNuPed() const; double GetNuWall() const; double GetDistEffMax() const; double GetIntpWidthPed() const; double GetIntpWidthWall() const; double GetMaxFPed() const; double GetMaxFWall() const; double GetDistEffMaxPed() const; double GetDistEffMaxWall() const; /** * Compute the next simulation step * Solve the differential equations and update the positions and velocities * @param current the actual time * @param deltaT the next timestep * @param building the geometry object */ virtual void ComputeNextTimeStep(double current, double deltaT, Building* building, int periodic); virtual std::string GetDescription() ; virtual bool Init (Building* building); private: // Modellparameter double _nuPed; /**< strength of the pedestrian repulsive force */ double _nuWall; /**< strength of the wall repulsive force */ double _intp_widthPed; /**< Interpolation cutoff radius (in cm) */ double _intp_widthWall; /**< Interpolation cutoff radius (in cm) */ double _maxfPed; double _maxfWall; double _distEffMaxPed; // maximal effective distance double _distEffMaxWall; // maximal effective distance // Private Funktionen /** * Driving force \f$F_i =\frac{\mathbf{v_0}-\mathbf{v_i}}{\tau}\f$ * * @param ped Pointer to Pedestrians * @param room Pointer to Room * * @return Point */ Point ForceDriv(Pedestrian* ped, Room* room) const; /** * Repulsive force between two pedestrians ped1 and ped2 according to * the Generalized Centrifugal Force Model (chraibi2010a) * * @param ped1 Pointer to Pedestrian: First pedestrian * @param ped2 Pointer to Pedestrian: Second pedestrian * * @return Point */ Point ForceRepPed(Pedestrian* ped1, Pedestrian* ped2) const; /** * Repulsive force acting on pedestrian from the walls in * . The sum of all repulsive forces of the walls in is calculated * @see ForceRepWall * @param ped Pointer to Pedestrian * @param subroom Pointer to SubRoom * * @return */ Point ForceRepRoom(Pedestrian* ped, SubRoom* subroom) const; Point ForceRepWall(Pedestrian* ped, const Line& l) const;  carlos committed Jul 19, 2016 127  Point AccelOscil(Pedestrian *ped) const;  carlos committed Jul 21, 2016 128 129  double OscilFreq(double a, double b, double v) const; double OscilAmp(double a, double b, double v) const;  carlos committed Jul 19, 2016 130 131 132 133 134 135 136  Point ForceRepStatPoint(Pedestrian* ped, const Point& p, double l, double vn) const; Point ForceInterpolation(double v0, double K_ij, const Point& e, double v, double d, double r, double l) const; }; #endif /* KrauszMODEL_H_ */