Commit 17466e2b authored by Arne Graf's avatar Arne Graf

using current group branch, integrating my work

parents 08e79346 6ab5c6e2
......@@ -5,7 +5,9 @@
/Release
/doc/html
/figs
/inputfiles
/figs_bot
/Utest/*/inifiles*/
/Utest/*/trajectories
*~
# Compiled Object files
......@@ -13,7 +15,8 @@
*.lo
*.o
*.obj
*.gch
*_flymake
# Compiled Dynamic libraries
*.so
*.dylib
......@@ -48,4 +51,27 @@ vgcore.*
/.dir-locals.el
/Doxyfile
/*log*
/*plot*
\ No newline at end of file
/*plot*
/.idea/.name
/.idea/encodings.xml
/.idea/jpscore.iml
/.idea/misc.xml
/.idea/modules.xml
/.idea/scopes/scope_settings.xml
/.idea/vcs.xml
/.idea/workspace.xml
/Testing/Temporary/CTestCostData.txt
/Utest/runtests.py
/Utest/test_11/.igncd
/Utest/test_7/.gitignore
/Utest/test_8/routing.xml
/Utest/test_9/cpu.png
/Utest/utils.pyc
/auto/veloModel2.el
/cpu.png
/cscope.file
/gompertz.pdf
/veloModel2.org
/veloModel2.pdf
/veloModel2.tex
/.project
JuPedSim contributors:
Erik Andresen
Mohcine Chraibi
David Haensel
Ulrich Kemloh
Andrea Portz
Oliver Schmidts
Denis Shhikhalev
Jun Zhang
# Change Log
All notable changes to this project will be documented in this file.
## v0.7.0 [Unreleased]
### Added
- Changelog file
- Rimea testcases
- Boost testcases for geometry functions
- risk tolerance factor (value in [0 1]) for pedestrian. Pedestrians with high values are likely to take more risks.
- Sources for generating agents at runtime. Parameter are frequency(agents per seconds) and maximum number
- Option to color the pedestrians by group,spotlight,velocity,group,knowledge,router,final_goal,intermediate_goal. Usage: ( <trajectories format="xml-plain" fps="8" color_mode="group"> )
- More control over the triangulation specially to avoid skinny triangles. Usage: <navigation_mesh method="triangulation" minimum_distance_between_edges="0.5" minimum_angle_in_triangles="20" use_for_local_planning="true" />
- Improved statistics Flow curve for the different exits.
#### JPSVIS
- Display the geometry structure individual room/subroom
- Now build on OSX
### Changed
-
-
### Fixed
- Visiblity in 3D
- Numerous geometrical operations
### Fixed
-
## v0.6.0 - 2015-01-31
### Added
- Steering the simulation with predefined events (closing or opening doors during the simulation)
- Information sharing between the pedestrians. The agents now share their knowledge about closed doors.
- Pre evacuation time for groups of agents.
- Adjustable velocities on stairs and even terrain for group of agents.
- Stability and performance improvement. The simulation is approx 40% faster for larger scenarios and you will notice it
- New route choice model, cognitive map, giving agents the possibility to explore the environment and discover doors for instance.
- Different sensors for improving the navigation of pedestrians (smoke/jam sensor).
- New verification and validation tests.
- General statistics over the evacuation (for instance areas egress time and door usage)
- Support for Visual Studio and Xcode compilers.
### Changed
- refactor NumCPU and ExitCrossingStrategy tags to num_threads and exit_crossing_strategy
### Fixed
-
## v0.5.0 - 2014-08-05
\ No newline at end of file
This diff is collapsed.
## This file should be placed in the root directory of your project.
## Then modify the CMakeLists.txt file in the root directory of your
## project to incorporate the testing dashboard.
##
## # The following are required to submit to the CDash dashboard:
## ENABLE_TESTING()
## INCLUDE(CTest)
set(CTEST_PROJECT_NAME "JuPedSim")
#set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
set(CTEST_DROP_METHOD "http")
set(CTEST_DROP_SITE "my.cdash.org")
set(CTEST_DROP_LOCATION "/submit.php?project=JuPedSim")
set(CTEST_DROP_SITE_CDASH TRUE)
set(WITH_MEMCHECK TRUE)
find_program(CTEST_GIT_COMMAND NAMES git)
find_program(CTEST_MEMORYCHECK_COMMAND NAMES valgrind)
# set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
# ctest using git
# set(CTEST_SOURCE_DIRECTORY "$ENV{HOME}/workspace/tmp/dashboards/libssh/source")
# set(CTEST_BINARY_DIRECTORY "$ENV{HOME}/workspace/tmp/dashboards/libssh/build")
# set(CTEST_BUILD_NAME "linux-gcc-default")
# set(CTEST_CMAKE_GENERATOR "Unix Makefiles")
# set(CTEST_BUILD_CONFIGURATION "Profiling")
# set(CTEST_BUILD_OPTIONS "-DWITH_SSH1=ON -WITH_SFTP=ON -DWITH_SERVER=ON -DWITH_ZLIB=ON -DWITH_PCAP=ON -DWITH_GCRYPT=OFF")
# #######################################################################
# ctest_empty_binary_directory(${CTEST_BINARY_DIRECTORY})
# find_program(CTEST_COVERAGE_COMMAND NAMES gcov)
#if (WITH_MEMCHECK)
#set(CTEST_NIGHTLY_START_TIME "00:00:00 GMT")
# set(CTEST_MEMORYCHECK_SUPPRESSIONS_FILE ${CTEST_SOURCE_DIRECTORY}/tests/valgrind.supp)
# if(NOT EXISTS "${CTEST_SOURCE_DIRECTORY}")
# set(CTEST_CHECKOUT_COMMAND "${CTEST_GIT_COMMAND} clone git://git.libssh.org/projects/libssh/libssh.git ${CTEST_SOURCE_DIRECTORY}")
# endif()
# set(CTEST_UPDATE_COMMAND "${CTEST_GIT_COMMAND}")
# set(CTEST_CONFIGURE_COMMAND "${CMAKE_COMMAND} -DCMAKE_BUILD_TYPE:STRING=${CTEST_BUILD_CONFIGURATION}")
# set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} -DWITH_TESTING:BOOL=ON ${CTEST_BUILD_OPTIONS}")
# set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"-G${CTEST_CMAKE_GENERATOR}\"")
# set(CTEST_CONFIGURE_COMMAND "${CTEST_CONFIGURE_COMMAND} \"${CTEST_SOURCE_DIRECTORY}\"")
#ctest_start("Nightly")
# ctest_update()
# ctest_configure()
#ctest_build()
# ctest_test()
# if (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
# ctest_coverage()
# endif (WITH_COVERAGE AND CTEST_COVERAGE_COMMAND)
# if (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
# ctest_memcheck( res )
# endif (WITH_MEMCHECK AND CTEST_MEMORYCHECK_COMMAND)
# ctest_submit()
\ No newline at end of file
This diff is collapsed.
/**
* \file IODispatcher.h
* \date Nov 20, 2010
* \version v0.5
* \copyright <2009-2014> Forschungszentrum Jülich GmbH. All rights reserved.
* \version v0.7
* \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
*
* \section License
* This file is part of JuPedSim.
......@@ -49,7 +49,7 @@ public:
void AddIO(Trajectories* ioh);
const std::vector<Trajectories*>& GetIOHandlers();
void WriteHeader(int nPeds, double fps, Building* building, int seed);
void WriteHeader(long nPeds, double fps, Building* building, int seed);
void WriteGeometry(Building* building);
void WriteFrame(int frameNr, Building* building);
void WriteFooter();
......@@ -62,8 +62,8 @@ public:
{
_outputHandler = NULL;
};
virtual ~Trajectories(){};
virtual void WriteHeader(int nPeds, double fps, Building* building, int seed)=0;
virtual ~Trajectories(){delete _outputHandler;};
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed)=0;
virtual void WriteGeometry(Building* building)=0;
virtual void WriteFrame(int frameNr, Building* building)=0;
virtual void WriteFooter()=0;
......@@ -103,7 +103,7 @@ public:
TrajectoriesJPSV04(){};
virtual ~TrajectoriesJPSV04(){};
virtual void WriteHeader(int nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -116,7 +116,7 @@ public:
TrajectoriesJPSV05(){};
virtual ~TrajectoriesJPSV05(){};
virtual void WriteHeader(int nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -133,7 +133,7 @@ public:
}
;
virtual void WriteHeader(int nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -150,7 +150,7 @@ public:
}
;
virtual void WriteHeader(int nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......@@ -183,7 +183,7 @@ public:
TrajectoriesJPSV06(){};
virtual ~TrajectoriesJPSV06(){ };
virtual void WriteHeader(int nPeds, double fps, Building* building, int seed);
virtual void WriteHeader(long nPeds, double fps, Building* building, int seed);
virtual void WriteGeometry(Building* building);
virtual void WriteFrame(int frameNr, Building* building);
virtual void WriteFooter();
......
/**
* \file OutputHandler.cpp
* \date Nov 20, 2010
* \version v0.5
* \copyright <2009-2014> Forschungszentrum Jülich GmbH. All rights reserved.
* \version v0.7
* \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
*
* \section License
* This file is part of JuPedSim.
......@@ -31,6 +31,7 @@
#include <stdio.h>
#include <stdarg.h>
#include <cstdlib>
#include <cmath>
using namespace std;
......@@ -54,10 +55,9 @@ int OutputHandler::GetErrors()
return _nErrors;
}
void OutputHandler::Write(string str)
void OutputHandler::Write(const string& str)
{
if (this != NULL)
cout << str << endl;
cout << str << endl;
}
void OutputHandler::ProgressBar(double TotalPeds, double NowPeds)
......@@ -68,7 +68,7 @@ void OutputHandler::ProgressBar(double TotalPeds, double NowPeds)
int totaldotz=40;
double fraction = NowPeds / TotalPeds;
// part of the progressmeter that's already "full"
int dotz = round(fraction * totaldotz);
int dotz = static_cast<int>(round(fraction * totaldotz));
// create the "meter"
int ii=0;
......@@ -89,7 +89,7 @@ void OutputHandler::ProgressBar(double TotalPeds, double NowPeds)
void OutputHandler::Write(const char* message,...)
{
char msg[CLENGTH];
char msg[CLENGTH]="";
va_list ap;
va_start(ap, message);
vsprintf(msg, message, ap);
......@@ -116,7 +116,7 @@ void OutputHandler::Write(const char* message,...)
}
}
void STDIOHandler::Write(string str)
void STDIOHandler::Write(const string& str)
{
if (str.find("ERROR") != string::npos)
{
......@@ -140,7 +140,8 @@ void STDIOHandler::Write(string str)
FileHandler::FileHandler(const char *fn)
{
_pfp.open(fn);
if (!fn) {
if (!_pfp.is_open())
{
char tmp[CLENGTH];
sprintf(tmp, "Error!!! File [%s] could not be opened!", fn);
cerr << tmp << endl;
......@@ -153,7 +154,7 @@ FileHandler::~FileHandler()
_pfp.close();
}
void FileHandler::Write(string str)
void FileHandler::Write(const string& str)
{
if (this != NULL) {
_pfp << str << endl;
......@@ -172,7 +173,7 @@ void FileHandler::Write(string str)
void FileHandler::Write(const char* str_msg,...)
{
char msg[CLENGTH];
char msg[CLENGTH]="";
va_list ap;
va_start (ap, str_msg);
vsprintf (msg,str_msg ,ap);
......@@ -191,7 +192,9 @@ void FileHandler::Write(const char* str_msg,...)
}
}
SocketHandler::SocketHandler(string host, int port)
#ifdef _SIMULATOR
SocketHandler::SocketHandler(const string& host, int port)
{
client = new TraVisToClient(host, port);
brokentags.push_back("<trajectories>");
......@@ -204,10 +207,11 @@ SocketHandler::~SocketHandler()
delete client;
}
void SocketHandler::Write(string str)
void SocketHandler::Write(const string& stringRef)
{
vector<string>::iterator str_it;
string str=stringRef;
//There are a few broken tags which need to be checked for and removed.
for (str_it = brokentags.begin(); str_it != brokentags.end(); ++str_it) {
......@@ -218,3 +222,5 @@ void SocketHandler::Write(string str)
}
client->sendData(str.c_str());
}
#endif
/**
* \file OutputHandler.h
* \date Nov 20, 2010
* \version v0.5
* \copyright <2009-2014> Forschungszentrum Jülich GmbH. All rights reserved.
* \version v0.7
* \copyright <2009-2015> Forschungszentrum Jülich GmbH. All rights reserved.
*
* \section License
* This file is part of JuPedSim.
......@@ -33,9 +33,12 @@
#include <fstream>
#include <vector>
#include "../general/Macros.h"
#ifdef _SIMULATOR
#include "../IO/TraVisToClient.h"
#include "../general/Macros.h"
#endif
class OutputHandler {
protected:
......@@ -51,13 +54,13 @@ public:
void incrementErrors();
void ProgressBar(double TotalPeds, double NowPeds);
virtual void Write(std::string str);
virtual void Write(const std::string& str);
virtual void Write(const char *string, ...);
};
class STDIOHandler : public OutputHandler {
public:
void Write(std::string str);
void Write(const std::string& str);
};
class FileHandler : public OutputHandler {
......@@ -66,22 +69,25 @@ private:
public:
FileHandler(const char *fn);
virtual ~FileHandler();
void Write(std::string str);
void Write(const std::string& str);
void Write(const char *string,...);
};
#ifdef _SIMULATOR
class SocketHandler : public OutputHandler {
private:
TraVisToClient* client;
public:
SocketHandler(std::string host, int port);
SocketHandler(const std::string& host, int port);
virtual ~SocketHandler();
void Write(std::string str);
void Write(const std::string& str);
//Some tags are broken
std::vector<std::string> brokentags;
};
#endif
#endif /*OUTPUT_HANDLER_H_*/
/**
* \file TraVisToClient.cpp
* \date Jul 4, 2014
* \version v0.5
* \copyright <2009-2014> Forschungszentrum J��lich GmbH. All rights reserved.
* \file travistoclient.cpp
* \date jul 4, 2014
* \version v0.7
* \copyright <2009-2015> Forschungszentrum Jülich GmbH. all rights reserved.
*
* \section License
* This file is part of JuPedSim.
* \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
* 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.
* 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/>.
* along with JuPedSim. if not, see <http://www.gnu.org/licenses/>.
*
* \section Description
*
*
**/
......@@ -32,9 +32,8 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "TraVisToClient.h"
#include "../general/Macros.h"
//using namespace std;
......@@ -47,8 +46,6 @@ TraVisToClient::TraVisToClient(string hostname, unsigned short port)
_port = port;
_isConnected = false;
createConnection();
}
TraVisToClient::~TraVisToClient()
......@@ -56,14 +53,11 @@ TraVisToClient::~TraVisToClient()
if (_isConnected) close();
}
/// send datablock to the server