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
476a343a
Commit
476a343a
authored
Feb 26, 2019
by
tobias schroedter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some debug information
parent
36d7aea7
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
41 additions
and
17 deletions
+41
-17
Simulation.cpp
Simulation.cpp
+14
-15
geometry/Building.cpp
geometry/Building.cpp
+3
-0
geometry/Crossing.cpp
geometry/Crossing.cpp
+22
-1
geometry/Crossing.h
geometry/Crossing.h
+1
-0
geometry/Line.h
geometry/Line.h
+1
-1
No files found.
Simulation.cpp
View file @
476a343a
...
...
@@ -578,21 +578,20 @@ double Simulation::RunBody(double maxSimTime)
#endif
// here open transition that should be closed
for
(
auto
&
itr
:
_building
->
GetAllTransitions
())
{
Transition
*
Trans
=
itr
.
second
;
if
(
Trans
->
isTemporaryClosed
())
{
Trans
->
UpdateClosingTime
(
_deltaT
);
if
(
Trans
->
GetClosingTime
()
<=
_deltaT
)
{
Trans
->
changeTemporaryState
();
Log
->
Write
(
"INFO:
\t
Reset state of door %d, Time=%.2f"
,
Trans
->
GetID
(),
Pedestrian
::
GetGlobalTime
());
}
}
}
// TODO fix, opens door everytime...
// for (auto& itr: _building->GetAllTransitions())
// {
// Transition* Trans = itr.second;
// if(Trans->IsTempClose())
// {
// Trans->UpdateClosingTime( _deltaT);
// if(Trans->GetClosingTime() <= _deltaT)
// {
// Trans->changeTemporaryState();
// Log-> Write("INFO:\tReset state of door %d, Time=%.2f", Trans->GetID(), Pedestrian::GetGlobalTime());
// }
// }
// }
}
// while time
return
t
;
}
...
...
geometry/Building.cpp
View file @
476a343a
...
...
@@ -370,6 +370,9 @@ bool Building::InitGeometry()
for
(
auto
&
transItr
:
_transitions
){
Transition
*
trans
=
transItr
.
second
;
std
::
cout
<<
trans
->
GetID
()
<<
" is open "
<<
trans
->
IsOpen
()
<<
std
::
endl
;
std
::
cout
<<
trans
->
GetID
()
<<
" is close "
<<
trans
->
IsClose
()
<<
std
::
endl
;
std
::
cout
<<
trans
->
GetID
()
<<
" is temp_close "
<<
trans
->
IsTempClose
()
<<
std
::
endl
;
}
return
true
;
}
...
...
geometry/Crossing.cpp
View file @
476a343a
...
...
@@ -337,4 +337,25 @@ DoorState Crossing::GetState() const
void
Crossing
::
SetState
(
DoorState
_state
)
{
Crossing
::
_state
=
_state
;
}
\ No newline at end of file
}
std
::
string
Crossing
::
toString
()
const
{
std
::
stringstream
tmp
;
// tmp << _point1.toString() << "--" << _point2.toString();
tmp
<<
this
->
GetPoint1
().
toString
()
<<
"--"
<<
this
->
GetPoint2
().
toString
();
switch
(
_state
){
case
DoorState
::
OPEN
:
tmp
<<
" open"
;
break
;
case
DoorState
::
CLOSE
:
tmp
<<
" close"
;
break
;
case
DoorState
::
TEMP_CLOSE
:
tmp
<<
" temp_close"
;
break
;
}
return
tmp
.
str
();
}
geometry/Crossing.h
View file @
476a343a
...
...
@@ -226,6 +226,7 @@ public:
void
SetState
(
DoorState
_state
);
std
::
string
toString
()
const
;
};
#endif
/* _CROSSING_H */
\ No newline at end of file
geometry/Line.h
View file @
476a343a
...
...
@@ -277,7 +277,7 @@ public:
/**
* @return a nice formated string describing the line
*/
std
::
string
toString
()
const
;
virtual
std
::
string
toString
()
const
;
/**
* @return the angle between two lines
...
...
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