ForceModel.h 1.87 KB
Newer Older
1
/**
2 3
 * \file        ForceModel.h
 * \date        Apr 15, 2014
4 5
 * \version     v0.7
 * \copyright   <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
Ulrich Kemloh's avatar
Ulrich Kemloh committed
6
 *
7
 * \section License
8
 * This file is part of JuPedSim.
9 10
 *
 * JuPedSim is free software: you can redistribute it and/or modify
11
 * it under the terms of the GNU Lesser General Public License as published by
12 13 14 15 16 17 18 19
 * 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.
 *
20
 * You should have received a copy of the GNU Lesser General Public License
21 22
 * along with JuPedSim. If not, see <http://www.gnu.org/licenses/>.
 *
23
 * \section Description
24 25
 * Implementation of classes for force-based models.
 * Actually we've got two different models:
Mohcine Chraibi's avatar
Mohcine Chraibi committed
26
 * 1. Generalized Centrifugal Force Model
27
 * 2. Gompertz Model
28
 *
29 30
 *
 **/
Ulrich Kemloh's avatar
Ulrich Kemloh committed
31

Ulrich Kemloh's avatar
Ulrich Kemloh committed
32

Ulrich Kemloh's avatar
Ulrich Kemloh committed
33
#ifndef _FORCEMODEL_H
Mohcine Chraibi's avatar
Mohcine Chraibi committed
34
#define _FORCEMODEL_H
Ulrich Kemloh's avatar
Ulrich Kemloh committed
35

Ulrich Kemloh's avatar
Ulrich Kemloh committed
36
#include <string>
Ulrich Kemloh's avatar
Ulrich Kemloh committed
37

38

Ulrich Kemloh's avatar
Ulrich Kemloh committed
39 40
//forward declaration
class Building;
41 42


Ulrich Kemloh's avatar
Ulrich Kemloh committed
43 44
class ForceModel {

45
public:
Ulrich Kemloh's avatar
Ulrich Kemloh committed
46
     // constructor/destructor
47 48
     ForceModel();
     virtual ~ForceModel();
49

50
     /**
51
      * Solve the differential equations and update the positions and velocities
52 53 54 55
      * @param t the actual time
      * @param tp the next timestep
      * @param building the geometry object
      */
Ulrich Kemloh's avatar
Ulrich Kemloh committed
56
     virtual void CalculateForce(double t, double tp, Building* building) const = 0;
57

58 59 60 61
     /**
      * Performs whatever initialization is needed/required
      * @param building the building object
      */
62
     virtual bool Init (Building* building) const = 0;
63

64 65 66 67
     /**
      * @return all model parameters in a nicely formatted string
      */
     virtual std::string writeParameter() const = 0;
Ulrich Kemloh's avatar
Ulrich Kemloh committed
68 69 70
};


Mohcine Chraibi's avatar
Mohcine Chraibi committed
71
#endif  /* _FORCEMODEL_H */