Skip to content
Snippets Groups Projects
Commit 051c7c11 authored by Tobias Schrödter's avatar Tobias Schrödter
Browse files

Added some Documentation

parent 259e41aa
No related branches found
No related tags found
No related merge requests found
Pipeline #18929 passed
...@@ -546,7 +546,8 @@ double Simulation::RunBody(double maxSimTime) ...@@ -546,7 +546,8 @@ double Simulation::RunBody(double maxSimTime)
} }
} }
if (_routingEngine->isNeedUpdate()){ // here the used routers are update, when needed due to external changes
if (_routingEngine->NeedsUpdate()){
_routingEngine->UpdateRouter(); _routingEngine->UpdateRouter();
} }
......
...@@ -142,6 +142,10 @@ public: ...@@ -142,6 +142,10 @@ public:
void SetTrips(const Trips& trips); void SetTrips(const Trips& trips);
/**
* Update the router, when geometry changed due to external changes.
* Remark: Depends on router if needed!
*/
virtual void Update(); virtual void Update();
}; };
......
...@@ -131,7 +131,7 @@ bool RoutingEngine::Init(Building* building) ...@@ -131,7 +131,7 @@ bool RoutingEngine::Init(Building* building)
return status; return status;
} }
bool RoutingEngine::isNeedUpdate() const bool RoutingEngine::NeedsUpdate() const
{ {
return _needUpdate; return _needUpdate;
} }
......
...@@ -107,6 +107,22 @@ public: ...@@ -107,6 +107,22 @@ public:
*/ */
bool Init(Building* building); bool Init(Building* building);
/**
* Returns if routers need to be updated
* @return routers need to be updated
*/
bool NeedsUpdate() const;
/**
* Set if routers need to be updated
* @param needUpdate
*/
void setNeedUpdate(bool needUpdate);
/**
* Updates all used routers
*/
void UpdateRouter();
private: private:
/// collections of all routers used /// collections of all routers used
...@@ -114,12 +130,6 @@ private: ...@@ -114,12 +130,6 @@ private:
/// collection of all trips/routes /// collection of all trips/routes
Trips _tripsCollection; Trips _tripsCollection;
bool _needUpdate = false; bool _needUpdate = false;
public:
bool isNeedUpdate() const;
void setNeedUpdate(bool needUpdate);
void UpdateRouter();
}; };
#endif /* ROUTINGENGINE_H_ */ #endif /* ROUTINGENGINE_H_ */
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment