Commit e6f8156f authored by Arne Graf's avatar Arne Graf

Merge branch 'develop'

parents 75a90a74 6899f6df
/build/
/lib/
/bin/
/outside/
/doc
/Debug
/Release
......
# compile jpscore and run light tests
before_script:
- nproc=`grep -c '^processor' /proc/cpuinfo`
- echo "nproc = ${nproc}"
- mkdir build && cd build/
build:
script:
- cmake .. -DBUILD_TESTING=ON
- make -j$(nproc)
- ctest -R Boost
\ No newline at end of file
- cmake -DBUILD_TESTING=ON -DBoost_NO_SYSTEM_PATHS=true -DBOOST_ROOT=~/boost_1_61_0 ..
- make -j${nproc}
- export LD_LIBRARY_PATH=$HOME/boost_1_61_0/stage/lib/:$LD_LIBRARY_PATH
- ctest -R Boost
......@@ -41,5 +41,4 @@ notifications:
recipients:
- mohcine@chraibi.de
on_success: change
on_failure: always
on_failure: always
\ No newline at end of file
# Change Log
All notable changes to this project will be documented in this file.
## Known Issues
#### JPSCORE
Please also check the Issue tracker on GitLab, if access is available.
## Unreleased
### Added
- Tag Sources: new attribute to choose between "greedy" approach and random approach: `gready="true"` (default: `false`)
- Floor field router. See [usage](http://jupedsim.github.io/jpscore/models/routing/#floorfield-router).
- New attribute for *step_size* `<step_size fix "no">0.01</step_size>`. Default is yes. See #193 for description and commit 78b634ff.
- Added new operational model `<model operational_model_id="5" description="Krausz">`. See [Wiki](https://cst.version.fz-juelich.de/jupedsim/jpscore/wikis/docs/models/operativ#generalized-centrifugal-force-model-with-lateral-swaying)
- Added new `cmake` compilation flags:
- `-D DUSE_DUAL_ABI=ON` (default OFF): See [note in GCC 5.1 release](https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html).
- `-D Boost_NO_SYSTEM_PATHS=true` (default false): In case a local version of boost has to be used.
Pass this option together with `-D BOOST_ROOT=PATH_where_to_find_boost`.
### Modified
- If no seed is given, the simulation will be run with `seed=Time(NULL)` (random).
- Major refactoring of the parsing machinery. :+1: @laemmel.
### Fixed
- Fix properly delete pedestrians in `Tordeux915` (#203).
- Fix simulations are not thread-safe (#200).
- Fix memory lacks (#202).
### Bugs
Please also check the [Issue tracker](https://cst.version.fz-juelich.de/jupedsim/jpscore/issues?assignee_id=&author_id=&label_name=&milestone_id=&scope=all&sort=created_desc&state=opened), if access is available.
- exit strategies using *local* - prefix can result in circular routing
- triangulation creates error-prone help-lines in certain geometries
- errors in unused parts of ini files lead to system-exit
- exit_strategy: exit strat 9 currently bugged
- router: ff_global_shortest might not find paths in some geometries. please use exit_strategy 8
- console output: messages of only one line will be overwritten by progress bar
- agents that leave the building might produce an error-msg (although they correctly left the simulation)
## v0.8.0 [Unreleased]
## v0.8.0 [2016-02-18]
### Added
#### JPSCORE
- CI with travis and Gitlab CI
- Compilation checked on Visual Studio 12 2013
- Added more validation tests
......@@ -33,20 +55,7 @@ Please also check the Issue tracker on GitLab, if access is available.
- Added floor field to all exits, providing direction to target, direction to closest wall and cost estimates. Parameter to control wall-avoidance included.
- Added new __Exit Strategies__ using floor fields on various subdomains (rooms, subrooms). Please refer to the online documentation on [jupedsim.org](www.jupedsim.org).
#### JPSVIS
- Added option to load vtk files. Need to add the line ``` <gradient_field filename="floorfield.vtk">
``` in the header of the trajectory file. Alternatively drag and drop a vtk file on JPSvis.
- Fixed error displaying the total number of frames when using the scroolbar
#### JPSREPORT
- Added geometry information while plotting the voronoi cells
- Added option to disable plotting
- Issue a warning when the voronoi cell cannot be calculated
- Fixed error where all trajectories were colinear
#### JPSEDITOR
## v0.7.0 [2015-07-15]
......@@ -65,13 +74,10 @@ Please also check the Issue tracker on GitLab, if access is available.
- Changelog file
- Rimea testcases
- Unit tests are now based on the Boost testing engine
#### JPSVIS
- Display the geometry structure individual room/subroom.
- Now build on OSX/Linux/Windows
### Changed
-
-
### Fixed
- Visiblity in 3D
......
This diff is collapsed.
......@@ -20,9 +20,10 @@ There are only a few rules and advices we want to give to you:
- [Coding style](#coding-style)
- [Unit tests](#unit-tests)
- [Writing documentation](#wrinting-documentation)
- [Writing documentation](#writing-documentation)
- [Comments](#comments)
- [Documenting new features](#documenting-new-features)
- [Sample Templates](#sample-templates)
- [Committing code](#commiting-code)
- [Committing guidelines](#commiting-guidelines)
......@@ -290,7 +291,7 @@ To write additional tests, create a directory under *Utest/*.
- run the script `makeini.py` with the obligatory option `-f`: Using the
aforementioned example the call is:
```bash
python makeini.py -f test_case1/inifile.xml
python3 makeini.py -f test_case1/inifile.xml
```
The Script is going to create two directories:
......@@ -304,7 +305,7 @@ The Script is going to create two directories:
Your script has to start with the following lines:
```python
#!/usr/bin/env python
#!/usr/bin/env python3
import os
import sys
from sys import *
......@@ -352,6 +353,66 @@ Comments have to be written in **English** everywhere. Please use markdown where
### Documenting new features
Please update the changelog with every feature/fix you provide so we can keep track of changes for new versions of JuPedSim.
### Sample Templates
```
/*!
* \file [filename]
*
* \author [your name]
* \date
* \version v[x.y]
* \copyright <2016-2022> Forschungszentrum Jülich GmbH. All rights reserved.
*
* \section License
* This file is part of JuPedSim.
*
* JuPedSim is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* 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.
*
* You should have received a copy of the GNU Lesser General Public License
* along with JuPedSim. If not, see <http://www.gnu.org/licenses/>.
*
* \section Description
*
* [your comment here]
*/
```
```
/*!
* \class [class name]
*
* \brief [brief description]
*
* [detailed description]
*
* \author [your name]
* \date
*/
```
```
/*!
* \brief [brief description]
*
* [detailed description]
*
* \param[in] [name of input parameter] [its description]
* \param[out] [name of output parameter] [its description]
* \return [information about return value]
* \sa [see also section]
* \note [any note about the function you might have]
* \warning [any warning if necessary]
*/
```
## Commiting Code
### Commiting guidelines
......
# -----------------------------------------
# - build:
# docker build jupedsim/jpscore .
# - run:
# docker -it jupedsim/jpscore
# -----------------------------------------
FROM ubuntu:14.04
MAINTAINER Mohcine Chraibi <m.chraibi@gmail.com>
# install required packages
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
g++ \
git \
lcov \
doxygen \
libboost-system-dev \
libboost-filesystem-dev \
libboost-test-dev \
python \
python-dev \
python-pip \
&& apt-get clean
# set environment
ENV BOOST_ROOT /usr
ENV HOME /home/jupedsim
# add user
RUN groupadd -r -g 1000 jupedsim && useradd -r -g jupedsim -u 1000 -m jupedsim
USER jupedsim
# install jpscore
RUN mkdir -p /home/jupedsim/workspace
RUN cd /home/jupedsim/workspace \
&& git clone --depth=5 https://cst.version.fz-juelich.de/jupedsim/jpscore.git \
&& cd jpscore \
&& mkdir -p build \
&& cd build \
&& cmake -DBUILD_TESTING=ON ..\
&& make
# install python variant filtering dependencies
#RUN pip install numpy
#RUN pip install matplotlib
# by default /bin/bash is executed
CMD /bin/bash && echo "JuPedSim/jpscore: Enjoy simulating!"
This diff is collapsed.
/**
* \file MeshRouter.h
* \date Aug 21, 2013
* \version v0.7
* \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
*
* \section License
* This file is part of JuPedSim.
*
......@@ -19,41 +14,37 @@
*
* You should have received a copy of the GNU Lesser General Public License
* along with JuPedSim. If not, see <http://www.gnu.org/licenses/>.
*
* \section Description
*
*
**/
//
// Created by laemmel on 30.03.16.
//
#ifndef JPSCORE_GEOFILEPARSER_H
#define JPSCORE_GEOFILEPARSER_H
#ifndef MESHROUTER_H_
#define MESHROUTER_H_
#include "../general/Configuration.h"
#include "../geometry/Building.h"
#include "../geometry/GeometryReader.h"
#include "Router.h"
#include "NavMesh.h"
#include "mesh/Mesh.h"
//TODO: the class name GeoFileParser is misleading as the ``geometry'' file contains among others also relations (transitions)
//TODO: between geometries/rooms. Probably, EnvironmentFileParser would be better, still parts of the environment are
//TODO: currently stored in the ``ini'' file (e.g. goals) [gl march '16]
//TODO: currently stored in the ``ini'' file (e.g. goals) [gl march '16]
class GeoFileParser : public GeometryReader {
class MeshRouter: public Router {
private:
Building* _building;
MeshData* _meshdata;
public:
GeoFileParser(const Configuration* configuration);
~GeoFileParser();
virtual void LoadBuilding(Building* building) override;
std::vector<MeshEdge*> AStar(Pedestrian* p,int& status)const;
NavLine Funnel(Point&,Point&,std::vector<MeshEdge*>)const;
NavLine FunnelRad(Point&,Point&,std::vector<MeshEdge*>);
MeshEdge* Visibility(Point&,Point&,std::vector<MeshEdge*>)const;
std::string GetMeshFileName() const;
void WriteMeshToFile(const std::string& filename);
void FixMeshEdges();
virtual bool LoadTrafficInfo(Building* building) override;
public:
MeshRouter();
MeshRouter(int id, RoutingStrategy s);
virtual ~MeshRouter();
private:
const Configuration* _configuration;
virtual int FindExit(Pedestrian* p);
virtual bool Init(Building* b);
bool LoadGeometry(Building* building);
bool LoadRoutingInfo(Building* filename);
};
#endif /* MESHROUTER_H_ */
#endif //JPSCORE_GEOFILEPARSER_H
......@@ -28,7 +28,6 @@
#include "IODispatcher.h"
#include "../pedestrian/Pedestrian.h"
#include "../routing/NavMesh.h"
#include "../tinyxml/tinyxml.h"
#include "../geometry/SubRoom.h"
#include "../mpi/LCGrid.h"
......@@ -116,7 +115,7 @@ string TrajectoriesJPSV04::WritePed(Pedestrian* ped)
void TrajectoriesJPSV04::WriteHeader(long nPeds, double fps, Building* building, int seed)
{
//nPeds=building->GetAllPedestrians().size();
building->GetCaption();
string tmp;
tmp =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" "<trajectories>\n";
......@@ -389,49 +388,51 @@ void TrajectoriesVTK::WriteHeader(long nPeds, double fps, Building* building, in
void TrajectoriesVTK::WriteGeometry(Building* building)
{
stringstream tmp;
NavMesh* nv= new NavMesh(building);
nv->BuildNavMesh();
//nv->WriteToFile("../pedunc/examples/stadium/arena.nav");
Write("DATASET UNSTRUCTURED_GRID");
//writing the vertices
const vector<NavMesh::JVertex*>& vertices= nv->GetVertices() ;
tmp<<"POINTS "<<vertices.size()<<" FLOAT"<<endl;
for (unsigned int v=0; v<vertices.size(); v++) {
tmp<<vertices[v]->pPos._x<<" " <<vertices[v]->pPos._y <<" 0.0"<<endl;
}
Write(tmp.str());
tmp.str(std::string());
//writing the cells data
const vector<NavMesh::JNode*>& cells= nv->GetNodes();
int nComponents= (int) cells.size();
stringstream tmp1;
for (unsigned int n=0; n<cells.size(); n++) {
int hSize= (int) cells[n]->pHull.size();
tmp1<<hSize<<"";
for(unsigned int i=0; i<cells[n]->pHull.size(); i++) {
tmp1<<" "<<cells[n]->pHull[i].id;
}
tmp1<<endl;
nComponents+= hSize;
}
tmp<<"CELLS "<<cells.size()<<" "<<nComponents<<endl;
tmp<<tmp1.str();
Write(tmp.str());
tmp.str(std::string());
// writing the cell type
tmp<<"CELL_TYPES "<<cells.size()<<endl;
for (unsigned int n=0; n<cells.size(); n++) {
tmp<<"9"<<endl;
}
Write(tmp.str());
delete nv;
(void)building; // avoid warning
Log->Write("WARNING:\t Creating NavMesh is deprecated. Please have a look at old files on git lab if you want to use this!");
// stringstream tmp;
// NavMesh* nv= new NavMesh(building);
// nv->BuildNavMesh();
// //nv->WriteToFile("../pedunc/examples/stadium/arena.nav");
// Write("DATASET UNSTRUCTURED_GRID");
// //writing the vertices
// const vector<NavMesh::JVertex*>& vertices= nv->GetVertices() ;
// tmp<<"POINTS "<<vertices.size()<<" FLOAT"<<endl;
// for (unsigned int v=0; v<vertices.size(); v++) {
// tmp<<vertices[v]->pPos._x<<" " <<vertices[v]->pPos._y <<" 0.0"<<endl;
// }
// Write(tmp.str());
// tmp.str(std::string());
// //writing the cells data
// const vector<NavMesh::JNode*>& cells= nv->GetNodes();
// int nComponents= (int) cells.size();
// stringstream tmp1;
// for (unsigned int n=0; n<cells.size(); n++) {
// int hSize= (int) cells[n]->pHull.size();
// tmp1<<hSize<<"";
// for(unsigned int i=0; i<cells[n]->pHull.size(); i++) {
// tmp1<<" "<<cells[n]->pHull[i].id;
// }
// tmp1<<endl;
// nComponents+= hSize;
// }
// tmp<<"CELLS "<<cells.size()<<" "<<nComponents<<endl;
// tmp<<tmp1.str();
// Write(tmp.str());
// tmp.str(std::string());
// // writing the cell type
// tmp<<"CELL_TYPES "<<cells.size()<<endl;
// for (unsigned int n=0; n<cells.size(); n++) {
// tmp<<"9"<<endl;
// }
// Write(tmp.str());
// delete nv;
}
void TrajectoriesVTK::WriteFrame(int frameNr, Building* building)
......@@ -446,7 +447,7 @@ void TrajectoriesVTK::WriteFooter()
void TrajectoriesJPSV06::WriteHeader(long nPeds, double fps, Building* building, int seed)
{
//nPeds=building->GetAllPedestrians().size();
building->GetCaption();
string tmp;
tmp =
"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n\n" "<trajectories>\n";
......@@ -585,22 +586,24 @@ void TrajectoriesJPSV06::WriteFooter()
void TrajectoriesXML_MESH::WriteGeometry(Building* building)
{
//Navigation mesh implementation
NavMesh* nv= new NavMesh(building);
nv->BuildNavMesh();
string geometry;
nv->WriteToString(geometry);
Write("<geometry>");
Write(geometry);
Write("</geometry>");
nv->WriteToFile(building->GetProjectFilename()+".full.nav");
delete nv;
(void)building; // avoid warning
Log->Write("WARNING:\t Creating NavMesh is deprecated. Please have a look at old files on git lab if you want to use this!");
// //Navigation mesh implementation
// NavMesh* nv= new NavMesh(building);
// nv->BuildNavMesh();
// string geometry;
// nv->WriteToString(geometry);
// Write("<geometry>");
// Write(geometry);
// Write("</geometry>");
// nv->WriteToFile(building->GetProjectFilename()+".full.nav");
// delete nv;
}
void TrajectoriesJPSV05::WriteHeader(long nPeds, double fps, Building* building, int seed)
{
//nPeds=building->GetAllPedestrians().size();