Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
JPScore
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
92
Issues
92
List
Boards
Labels
Service Desk
Milestones
Merge Requests
3
Merge Requests
3
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JuPedSim
JPScore
Commits
cc943d2b
Commit
cc943d2b
authored
Mar 30, 2019
by
tobias schroedter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Event handling for FF_Router_Trips
parent
b5f8a348
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
41 additions
and
3 deletions
+41
-3
Simulation.cpp
Simulation.cpp
+4
-0
events/EventManager.cpp
events/EventManager.cpp
+1
-1
events/EventManager.h
events/EventManager.h
+0
-1
routing/Router.cpp
routing/Router.cpp
+4
-0
routing/Router.h
routing/Router.h
+1
-1
routing/RoutingEngine.cpp
routing/RoutingEngine.cpp
+18
-0
routing/RoutingEngine.h
routing/RoutingEngine.h
+7
-0
routing/ff_router_trips/ffRouterTrips.cpp
routing/ff_router_trips/ffRouterTrips.cpp
+4
-0
routing/ff_router_trips/ffRouterTrips.h
routing/ff_router_trips/ffRouterTrips.h
+2
-0
No files found.
Simulation.cpp
View file @
cc943d2b
...
...
@@ -546,6 +546,10 @@ double Simulation::RunBody(double maxSimTime)
}
}
if
(
_routingEngine
->
isNeedUpdate
()){
_routingEngine
->
UpdateRouter
();
}
//update the routes and locations
UpdateRoutesAndLocations
();
...
...
events/EventManager.cpp
View file @
cc943d2b
...
...
@@ -25,7 +25,6 @@
*
**/
#include <string>
#include <cstdlib>
#include <iostream>
...
...
@@ -537,6 +536,7 @@ void EventManager::ProcessEvent()
TempCloseDoor
(
event
.
GetId
());
break
;
}
_building
->
GetRoutingEngine
()
->
setNeedUpdate
(
true
);
}
}
...
...
events/EventManager.h
View file @
cc943d2b
...
...
@@ -31,7 +31,6 @@
class
Building
;
class
Router
;
class
GlobalRouterTrips
;
class
QuickestPathRouter
;
class
RoutingEngine
;
class
Event
;
...
...
routing/Router.cpp
View file @
cc943d2b
...
...
@@ -98,3 +98,7 @@ void Router::SetTrips(const Trips& trips){
_trips
=
trips
;
std
::
cout
<<
_trips
<<
std
::
endl
;
}
void
Router
::
Update
(){
}
\ No newline at end of file
routing/Router.h
View file @
cc943d2b
...
...
@@ -142,7 +142,7 @@ public:
void
SetTrips
(
const
Trips
&
trips
);
virtual
void
Update
();
};
#endif
/* _ROUTING_H */
routing/RoutingEngine.cpp
View file @
cc943d2b
...
...
@@ -131,3 +131,21 @@ bool RoutingEngine::Init(Building* building)
return
status
;
}
bool
RoutingEngine
::
isNeedUpdate
()
const
{
return
_needUpdate
;
}
void
RoutingEngine
::
setNeedUpdate
(
bool
needUpdate
)
{
_needUpdate
=
needUpdate
;
}
void
RoutingEngine
::
UpdateRouter
()
{
for
(
auto
*
router
:
_routersCollection
){
router
->
Update
();
}
_needUpdate
=
false
;
}
routing/RoutingEngine.h
View file @
cc943d2b
...
...
@@ -113,6 +113,13 @@ private:
std
::
vector
<
Router
*>
_routersCollection
;
/// collection of all trips/routes
Trips
_tripsCollection
;
bool
_needUpdate
=
false
;
public:
bool
isNeedUpdate
()
const
;
void
setNeedUpdate
(
bool
needUpdate
);
void
UpdateRouter
();
};
#endif
/* ROUTINGENGINE_H_ */
routing/ff_router_trips/ffRouterTrips.cpp
View file @
cc943d2b
...
...
@@ -707,3 +707,7 @@ bool FFRouterTrips::MustReInit() {
void
FFRouterTrips
::
SetRecalc
(
double
t
)
{
_timeToRecalc
=
t
+
_recalc_interval
;
}
void
FFRouterTrips
::
Update
(){
this
->
ReInit
();
}
\ No newline at end of file
routing/ff_router_trips/ffRouterTrips.h
View file @
cc943d2b
...
...
@@ -194,6 +194,8 @@ public:
bool
MustReInit
();
void
SetRecalc
(
double
t
);
virtual
void
Update
();
private:
protected:
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment