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
79d3e39b
Commit
79d3e39b
authored
Sep 24, 2015
by
Ulrich Kemloh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
few comments and todos
parent
482d587a
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
7 deletions
+8
-7
matsim/JPSclient.cpp
matsim/JPSclient.cpp
+0
-1
matsim/JPSserver.cpp
matsim/JPSserver.cpp
+2
-2
matsim/MATSimInterface.proto
matsim/MATSimInterface.proto
+1
-0
pedestrian/AgentsSourcesManager.cpp
pedestrian/AgentsSourcesManager.cpp
+1
-1
scripts/update_version.sh
scripts/update_version.sh
+1
-1
voronoi-boost/VoronoiPositionGenerator.cpp
voronoi-boost/VoronoiPositionGenerator.cpp
+3
-2
No files found.
matsim/JPSclient.cpp
View file @
79d3e39b
...
...
@@ -51,7 +51,6 @@ JPSclient::~JPSclient()
void
JPSclient
::
ProcessAgentQueue
(
Building
*
building
)
{
std
::
vector
<
Pedestrian
*>
peds
;
//cout<<"size:"<<AgentsQueueOut::Size()<<endl;
AgentsQueueOut
::
GetandClear
(
peds
);
for
(
auto
&&
ped
:
peds
)
{
...
...
matsim/JPSserver.cpp
View file @
79d3e39b
...
...
@@ -72,8 +72,7 @@ void JPSserver::RunSimulation()
_jpsClient
->
NotifyEndOfSimulation
();
}
//Log->Write("INFO:\tRPC::JPSserver idle for 3 seconds");
//std::this_thread::sleep_for(std::chrono::milliseconds(500));
}
while
(
!
_shutdown
);
_SimManager
.
RunFooter
();
...
...
@@ -85,6 +84,7 @@ Status JPSserver::reqMATSim2ExternHasSpace(ServerContext* context __attribute__(
{
string
nodeID
=
request
->
nodeid
();
//Log->Write("INFO:\tRPC::JPSserver I have space on node " + nodeID);
//TODO: call the voronoi implementation and check if there is a spot
response
->
set_hasspace
(
true
);
return
Status
::
OK
;
}
...
...
matsim/MATSimInterface.proto
View file @
79d3e39b
...
...
@@ -50,6 +50,7 @@ message Extern2MATSimTrajectories {
}
optional
double
time
=
1
;
//
repeated
Agent
agent
=
15
;
}
...
...
pedestrian/AgentsSourcesManager.cpp
View file @
79d3e39b
...
...
@@ -32,7 +32,6 @@
#include "StartDistribution.h"
#include "PedDistributor.h"
#include "AgentsSource.h"
//#include "../voronoi/VoronoiDiagramGenerator.h"
#include "../geometry/Building.h"
#include "../geometry/Point.h"
...
...
@@ -156,6 +155,7 @@ void AgentsSourcesManager::ComputeBestPositionCompleteRandom(AgentsSource* src,
auto
subroom
=
_building
->
GetRoom
(
dist
->
GetRoomId
())
->
GetSubRoom
(
dist
->
GetSubroomID
());
vector
<
Point
>
positions
=
PedDistributor
::
PossiblePositions
(
*
subroom
);
//TODO: get the seed from the simulation
srand
(
time
(
NULL
));
for
(
auto
&
ped
:
peds
)
...
...
scripts/update_version.sh
View file @
79d3e39b
#!/bin/sh
old_version
=
'v0.7'
new_version
=
'v0.
7
'
new_version
=
'v0.
8
'
#old_version='http://134.94.2.137/jps_ini_core.xsd'
...
...
voronoi-boost/VoronoiPositionGenerator.cpp
View file @
79d3e39b
...
...
@@ -64,7 +64,6 @@ using namespace std;
//TODO: refactor the function
bool
IsEnoughInSubroom
(
SubRoom
*
subroom
,
Point
&
pt
,
double
radius
)
{
//TODO: code refactoring:
for
(
const
auto
&
wall
:
subroom
->
GetAllWalls
())
if
(
wall
.
DistTo
(
pt
)
<
radius
)
return
false
;
...
...
@@ -185,6 +184,8 @@ bool ComputeBestPositionVoronoiBoost(AgentsSource* src, std::vector<Pedestrian*>
no
++
;
}
//TODO: dividing by 0 when existing_peds is empty
// sum up the weighted velocity in the loop
v
=
v
/
no
;
//this is the mean of all velocities
//adding fake people to the vector for constructing voronoi diagram
...
...
@@ -386,7 +387,7 @@ void VoronoiBestVertexRand (const std::vector<Point>& discrete_positions, const
}
}
//now we have all the possible vertices and their distances and we can choose one randomly
//TODO: get the seed from the simulation/argumentparser
srand
(
time
(
NULL
));
unsigned
int
i
=
rand
()
%
possible_vertices
.
size
();
chosen_it
=
possible_vertices
[
i
];
...
...
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