diff --git a/CMakeLists.txt b/CMakeLists.txt index 989a17238a6622888ac91f6ea1e835131eba10ab..58a3b728ee22f96f13e151488d6a3c640df5308e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,6 +36,12 @@ endif () set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${warnings}") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${warnings}") +# TODO clean up. no flags. +#set(CMAKE_CXX_STANDARD 11) +#set(CMAKE_CXX_STANDARD_REQUIRED ON) +#set(CMAKE_CXX_EXTENSIONS OFF) + + if (NOT BUILD_TESTING) set(BUILD_TESTING OFF) # test units & python tests are not generated. endif (NOT BUILD_TESTING) diff --git a/IO/GeoFileParser.cpp b/IO/GeoFileParser.cpp index 029b146fac07982b4e45ec094d5b7a175b6bdded..6d7350a588e310ac5bfaabad114292b734f8acc6 100644 --- a/IO/GeoFileParser.cpp +++ b/IO/GeoFileParser.cpp @@ -21,7 +21,6 @@ #include "GeoFileParser.h" #include "../tinyxml/tinyxml.h" -#include "../geometry/Goal.h" #include "../geometry/SubRoom.h" GeoFileParser::GeoFileParser(Configuration* configuration) diff --git a/IO/IODispatcher.cpp b/IO/IODispatcher.cpp index c2fe2957265a2d5f7731cb48344ae50f17ec19fd..a8208d2228f4982221214f252bc4266eb145e6f9 100644 --- a/IO/IODispatcher.cpp +++ b/IO/IODispatcher.cpp @@ -33,8 +33,6 @@ #include "../mpi/LCGrid.h" #define _USE_MATH_DEFINES -#include <math.h> - using namespace std; diff --git a/IO/OutputHandler.cpp b/IO/OutputHandler.cpp index d476decb93efe4aca39d8531b5e4b752c2c83912..923cf30dc11ca39203376ad8515ea0ab7e41ee1c 100644 --- a/IO/OutputHandler.cpp +++ b/IO/OutputHandler.cpp @@ -28,9 +28,6 @@ #include "OutputHandler.h" -#include <stdio.h> -#include <stdarg.h> -#include <cstdlib> #include <cmath> using namespace std; diff --git a/IO/TraVisToClient.cpp b/IO/TraVisToClient.cpp index 2ebfb7dd93fe5005aed64c27b30fed2cec4cfa79..cceb025d02dc1d143837bd0518997d75540e62ff 100644 --- a/IO/TraVisToClient.cpp +++ b/IO/TraVisToClient.cpp @@ -29,9 +29,6 @@ /********* include files ******************************************************/ #include <iostream> -#include <stdlib.h> -#include <string.h> -#include <stdio.h> #include "TraVisToClient.h" #include "../general/Macros.h" diff --git a/JPSfire/C_toxicity_analysis/ToxicityAnalysis.cpp b/JPSfire/C_toxicity_analysis/ToxicityAnalysis.cpp index 2579e096649b22ac3357df33e5f127d7f9ffa376..92779c79abe38b1264084773130d2378dc406ccc 100644 --- a/JPSfire/C_toxicity_analysis/ToxicityAnalysis.cpp +++ b/JPSfire/C_toxicity_analysis/ToxicityAnalysis.cpp @@ -30,12 +30,7 @@ #include "../../pedestrian/Pedestrian.h" #include "../generic/FDSMesh.h" #include "../generic/FDSMeshStorage.h" -#include "../../pedestrian/PedDistributor.h" #include "../../tinyxml/tinyxml.h" -#include <set> -#include <algorithm> -#include <math.h> -#include "../../IO/OutputHandler.h" #include <boost/filesystem.hpp> using namespace boost::filesystem; diff --git a/JPSfire/generic/FDSMesh.cpp b/JPSfire/generic/FDSMesh.cpp index 99f692af347db5d049b60b0e9c271a841589c055..633924e131a50d20d7ae721fd8ff2f754cc78127 100644 --- a/JPSfire/generic/FDSMesh.cpp +++ b/JPSfire/generic/FDSMesh.cpp @@ -1,9 +1,5 @@ #include "FDSMesh.h" #include <cmath> -#include <string> -#include <fstream> -#include <iostream> -#include <sstream> std::vector<std::string> &split2(const std::string &s, char delim, std::vector<std::string> &elems) { std::stringstream ss(s); @@ -163,17 +159,23 @@ void FDSMesh::ReadMatrix(std::string line, std::ifstream &pFile) while (std::getline(pFile, line)) { n = 0; strVec = split2(line, ',', strVec); - for (auto &elem : strVec) - { + for (auto &elem : strVec) { //std::cout << elem << " col " << n << " line " << m << std::endl; - if (elem=="nan" || elem=="NAN" || elem=="NaN" || elem=="-inf" || elem=="inf") - { + if (elem=="nan" || elem=="NAN" || elem=="NaN" || elem=="-inf" || elem=="inf") { _matrix[m][n].SetValue(1.0); //Log->Write("ERROR: Mesh values consist of nan!"); //exit(EXIT_FAILURE); } - else - _matrix[m][n].SetValue(std::stod(elem)); + else { + double temp = 0; + try { + temp = std::stod(elem); + } + catch (...) { + std::cout << "can not convert " << elem << std::endl; + } + _matrix[m][n].SetValue(temp); + } ++n; } strVec.clear(); diff --git a/JPSfire/generic/FDSMeshStorage.cpp b/JPSfire/generic/FDSMeshStorage.cpp index aaff1754ce5c56cb985de41533c63f375da46d49..a087c8f78c43404e1017652f9f840d9880ee3edb 100644 --- a/JPSfire/generic/FDSMeshStorage.cpp +++ b/JPSfire/generic/FDSMeshStorage.cpp @@ -27,11 +27,8 @@ * **/ #include "FDSMeshStorage.h" -#include "../../IO/OutputHandler.h" //#include <unistd.h> -#include <stdio.h> //#include <glob.h> -#include <string> #include <boost/filesystem.hpp> namespace fs=boost::filesystem; @@ -161,7 +158,7 @@ void FDSMeshStorage::CreateTimeList() { /// Create time list for mesh refreshment _timelist.clear(); - double i=0; + double i=0; while (i<=_finalTime) { _timelist.push_back(i); @@ -174,12 +171,12 @@ void FDSMeshStorage::CreateTimeList() if (_doorlist.size() > 0) { // Smoke sensor active check_str = _filepath + _quantitylist[0] + "/" + _doorlist[0] + "/t_" + std::to_string(elem) + ".csv"; -// std::cout << "1: " << check_str << std::endl; + std::cout << "1: " << check_str << std::endl; } else if (_doorlist.size() == 0) { // Smoke sensor not active check_str = _filepath + _quantitylist[0] + "/Z_" + std::to_string(_elevationlist[0]) + "/t_" + std::to_string(elem) + ".csv"; -// std::cout << "2: " << check_str << std::endl; + std::cout << "2: " << check_str << std::endl; } if (fs::exists(check_str) == false ) diff --git a/Simulation.cpp b/Simulation.cpp index 04e1b223b2253dde993d3588a9c7a653010acfca..89c96ed28f23da9bcca43cc355db63b35c4e355b 100644 --- a/Simulation.cpp +++ b/Simulation.cpp @@ -35,12 +35,9 @@ #include "math/GompertzModel.h" #include "math/GradientModel.h" #include "pedestrian/AgentsQueue.h" -#include "pedestrian/AgentsSourcesManager.h" #ifdef _OPENMP -#include <omp.h> - #else #define omp_get_thread_num() 0 #define omp_get_max_threads() 1 diff --git a/Utest/JPSRunTest.py b/Utest/JPSRunTest.py index 8335e959c98f6341d53203b0f6293949f72a7aac..977fee786893c400ebcda0ec572d49d7b3d41573 100644 --- a/Utest/JPSRunTest.py +++ b/Utest/JPSRunTest.py @@ -7,12 +7,12 @@ See template_test/How_to_make_new_test.txt import fnmatch import glob import logging -from os import path +import numpy as np import os -from stat import S_ISREG, ST_MODE, ST_MTIME import subprocess import sys -import numpy as np +from os import path +from stat import S_ISREG, ST_MODE, ST_MTIME __author__ = 'Oliver Schmidts' __email__ = 'dev@jupedsim.org' diff --git a/Utest/Validation/1test_1D/fd.py b/Utest/Validation/1test_1D/fd.py index e0e22d7565002228621da2a28dabab0f7244ab4b..df18e1be1b2c1f866de57c0587d49b79d0a5ef7c 100644 --- a/Utest/Validation/1test_1D/fd.py +++ b/Utest/Validation/1test_1D/fd.py @@ -2,11 +2,12 @@ measure the fundamental diagram in a 1d scenario. return density, velocity """ +import glob import numpy as np import os -import glob -from sys import * import sys +from sys import * + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) path.append(utestdir) from utils import * diff --git a/Utest/Validation/1test_1D/run_validation_1.py b/Utest/Validation/1test_1D/run_validation_1.py index 863bfc4190b5dbcb9623df6d37e0f03558daef13..4f9dbc32d18afc2f9eed96d30a5d65fd0ff082fe 100644 --- a/Utest/Validation/1test_1D/run_validation_1.py +++ b/Utest/Validation/1test_1D/run_validation_1.py @@ -22,9 +22,10 @@ Source """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/Validation/2test_2D/plot_fd.py b/Utest/Validation/2test_2D/plot_fd.py index 2800498a199a44c8c7b1e44a7dcd7eeba43641dc..5ac06b78549244665fb58f9ea2ac54687ba65bc4 100644 --- a/Utest/Validation/2test_2D/plot_fd.py +++ b/Utest/Validation/2test_2D/plot_fd.py @@ -2,9 +2,9 @@ plot fundamental diagram produced by runtest just to check the results without reruning the test """ +import glob import matplotlib.pyplot as plt import numpy as np -import glob simfiles = glob.glob("Output/Fundamental_Diagram/Individual_FD/*.dat") expfiles = glob.glob("data/*.txt") diff --git a/Utest/Validation/2test_2D/run_validation_2.py b/Utest/Validation/2test_2D/run_validation_2.py index 9a5eadde77871b138231f39d4cf59929b33f10d7..1b00be07a23694892d45eaf0edc8789a987956fb 100644 --- a/Utest/Validation/2test_2D/run_validation_2.py +++ b/Utest/Validation/2test_2D/run_validation_2.py @@ -16,9 +16,10 @@ Source """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/Validation/3test_UO/run_validation_3.py b/Utest/Validation/3test_UO/run_validation_3.py index 091d5889b09f2fee4930d9654d7e7ce77a6fc527..bc59f26715ec6c11c94c7ea3fd1d7a294c3547c8 100644 --- a/Utest/Validation/3test_UO/run_validation_3.py +++ b/Utest/Validation/3test_UO/run_validation_3.py @@ -17,9 +17,10 @@ Source """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/Validation/4test_EO/run_validation_4.py b/Utest/Validation/4test_EO/run_validation_4.py index 9adff2887931304ef79a8a403c301102a38e91f9..ee6b74572e44dada5d791eedc567bd453bb7b9c4 100644 --- a/Utest/Validation/4test_EO/run_validation_4.py +++ b/Utest/Validation/4test_EO/run_validation_4.py @@ -17,9 +17,10 @@ Source """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/Validation/6test_KO/run_validation_6.py b/Utest/Validation/6test_KO/run_validation_6.py index 9c9e24d230d8663c0261fe1e36406a78a02c2e95..fe9d7faeb5601f76162eecf258468f7aaa152d5a 100644 --- a/Utest/Validation/6test_KO/run_validation_6.py +++ b/Utest/Validation/6test_KO/run_validation_6.py @@ -18,9 +18,10 @@ Source Table 4.4 Jun Zhang Diss. """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/Validation/7test_BO/run_validation_7.py b/Utest/Validation/7test_BO/run_validation_7.py index 4b70691c3b90a47434a72edec31a31f205cc0bee..a03f07e074572aaa4e1204485d1d0803bf9138bc 100644 --- a/Utest/Validation/7test_BO/run_validation_7.py +++ b/Utest/Validation/7test_BO/run_validation_7.py @@ -18,9 +18,10 @@ Source """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/Validation/test_13/run_validation_13.py b/Utest/Validation/test_13/run_validation_13.py index f03853ecc1437d2c3402051e38c42d59c078c9c3..dbeaf00e9b79ac7117fc6f4afe370769abd79d99 100755 --- a/Utest/Validation/test_13/run_validation_13.py +++ b/Utest/Validation/test_13/run_validation_13.py @@ -1,11 +1,16 @@ #!/usr/bin/env python3 +import glob +import logging +import matplotlib.pyplot as plt +import multiprocessing import numpy as np -import os, logging, time, sys -from sys import argv, exit -import subprocess, glob +import os +import subprocess +import sys +import time from os import path -import multiprocessing -import matplotlib.pyplot as plt +from sys import argv, exit + def get_empirical_flow(): files = glob.glob("experiments/*.txt") @@ -79,7 +84,7 @@ if __name__ == "__main__": # lib_path = os.path.abspath(lib_path) sys.path.append(lib_path) from utils import SUCCESS, FAILURE - from utils import parse_file, flow, rolling_flow + from utils import parse_file, rolling_flow # from utils import get_maxtime os.chdir("..") TRUNK = os.getcwd() diff --git a/Utest/juelich_tests/test_10/runtest_juelich_10.py b/Utest/juelich_tests/test_10/runtest_juelich_10.py index 7ff08fcfc56323561be01afc491d339dccb53189..9e571c2051644ad21fc57ee27900a10d1ca55b6b 100755 --- a/Utest/juelich_tests/test_10/runtest_juelich_10.py +++ b/Utest/juelich_tests/test_10/runtest_juelich_10.py @@ -2,14 +2,16 @@ # todo: spaghetti code. directory mess -import numpy as np -from xml.dom import minidom -import os, argparse, logging, time -from os import path, system -from sys import argv ,exit -import subprocess, glob, sys -import multiprocessing +import glob +import logging import matplotlib.pyplot as plt +import numpy as np +import os +import subprocess +import sys +import time +from os import path +from sys import argv, exit #========================= testnr = 10 diff --git a/Utest/juelich_tests/test_11/a_runtest.py b/Utest/juelich_tests/test_11/a_runtest.py index 7bcb434588ae8880fab1cf43184c87439f0c8e3e..f391d353ad5e11510614805f728be114df41f661 100644 --- a/Utest/juelich_tests/test_11/a_runtest.py +++ b/Utest/juelich_tests/test_11/a_runtest.py @@ -1,13 +1,13 @@ #! /usr/bin/env python +import glob +import logging import numpy as np +import os +import subprocess +import sys +from os import path +from sys import argv, exit from xml.dom import minidom -import os, argparse, logging, time -from os import path, system -from sys import argv ,exit -import subprocess, glob -import multiprocessing -import matplotlib.pyplot as plt -import re, sys #========================= testnr = 11 diff --git a/Utest/juelich_tests/test_11/b_runtest.py b/Utest/juelich_tests/test_11/b_runtest.py index ac20f7b24b685cb3bf20682c6fd8058dfd78d582..d98c939153b396a4ebee7c4e6d32e07d18bbccc9 100644 --- a/Utest/juelich_tests/test_11/b_runtest.py +++ b/Utest/juelich_tests/test_11/b_runtest.py @@ -1,13 +1,13 @@ #! /usr/bin/env python +import glob +import logging import numpy as np +import os +import subprocess +import sys +from os import path +from sys import argv, exit from xml.dom import minidom -import os, argparse, logging, time -from os import path, system -from sys import argv ,exit -import subprocess, glob -import multiprocessing -import matplotlib.pyplot as plt -import re, sys #========================= testnr = 11 diff --git a/Utest/juelich_tests/test_11/runtest_juelich_11.py b/Utest/juelich_tests/test_11/runtest_juelich_11.py index b507650c1bbdcb1bfa1b5b2114aaafcec5be76a8..f5a50e2d64e35eb92610c48639ea5bc11b680a4c 100755 --- a/Utest/juelich_tests/test_11/runtest_juelich_11.py +++ b/Utest/juelich_tests/test_11/runtest_juelich_11.py @@ -1,13 +1,10 @@ #! /usr/bin/env python +import logging import numpy as np -from xml.dom import minidom -import os, argparse, logging, time -from os import path, system -from sys import argv ,exit -import subprocess, glob -import multiprocessing -import matplotlib.pyplot as plt -import re +import os +import subprocess +from os import path +from sys import argv, exit #========================= testnr = 11 diff --git a/Utest/juelich_tests/test_15/runtest_juelich_15.py b/Utest/juelich_tests/test_15/runtest_juelich_15.py index 2dcde08bf4c1666ea59181fc76820a13759dd930..8a4a51a11b12837e91fcd088b049d3e5faf44fc2 100755 --- a/Utest/juelich_tests/test_15/runtest_juelich_15.py +++ b/Utest/juelich_tests/test_15/runtest_juelich_15.py @@ -22,9 +22,6 @@ import os import sys from sys import * utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) -import scipy -import scipy.stats -import matplotlib.pyplot as plt sys.path.append(utestdir) from JPSRunTest import JPSRunTestDriver from utils import * diff --git a/Utest/juelich_tests/test_9/runtest_juelich_9.py b/Utest/juelich_tests/test_9/runtest_juelich_9.py index bdfbc3ca4921806fb9fd9080b45ab38210593257..f3a9afb900573249b798e5711ba4fed5f012106c 100644 --- a/Utest/juelich_tests/test_9/runtest_juelich_9.py +++ b/Utest/juelich_tests/test_9/runtest_juelich_9.py @@ -16,10 +16,11 @@ Source """ -import os -import sys import matplotlib.pyplot as plt import numpy as np +import os +import sys + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/makeini.py b/Utest/makeini.py index 3b92baabd641da378168b8846261362e91e667c5..52cd9a44b71c0eef0e45afdaeee6e55f8dba332f 100644 --- a/Utest/makeini.py +++ b/Utest/makeini.py @@ -1,11 +1,16 @@ # help: python3 makeini.py -h -import os, sys, glob -from shutil import copy2, rmtree, move -import logging, types, argparse -import errno, time -from numpy import * +import argparse +import errno +import glob +import logging +import os +import sys +import time from itertools import product +from numpy import * +from shutil import copy2, rmtree, move + try: import xml.etree.cElementTree as ET except ImportError: diff --git a/Utest/rimea_tests/reportscript.py b/Utest/rimea_tests/reportscript.py index 8a134195fc67fdf6823f33f67e3b7b536bf02f1d..0c7821ba85c65271085cd4f4bb5cf1f5d70d2307 100644 --- a/Utest/rimea_tests/reportscript.py +++ b/Utest/rimea_tests/reportscript.py @@ -1,9 +1,8 @@ -import re, subprocess +import re +import subprocess from pylatex import Document, Command, PageStyle, Head, MiniPage, LargeText, LineBreak, \ - MediumText, LongTabu, NewPage, Package, Section, Description, NoEscape, Subsection, Figure, Center -from pylatex.utils import NoEscape, bold, verbatim -from pylatex.base_classes import Environment - + MediumText, LongTabu, NewPage, Package, Section, Description, Figure +from pylatex.utils import NoEscape, bold def get_evac_time(testnumber): diff --git a/Utest/rimea_tests/test_11/runtest_rimea_11.py b/Utest/rimea_tests/test_11/runtest_rimea_11.py index f42eb5ec3e9c399607440b634ea6775718529ea3..d75b637a18a80470a6136392105aaca8a3283660 100644 --- a/Utest/rimea_tests/test_11/runtest_rimea_11.py +++ b/Utest/rimea_tests/test_11/runtest_rimea_11.py @@ -16,9 +16,10 @@ Source http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E.pdf """ +import glob import os import sys -import glob + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_13/runtest_rimea_13.py b/Utest/rimea_tests/test_13/runtest_rimea_13.py index 7389caff11b3aa13d24524284bfc675d488f80bf..a3bbd2496f4907ceb344950a74767961b1a67d65 100644 --- a/Utest/rimea_tests/test_13/runtest_rimea_13.py +++ b/Utest/rimea_tests/test_13/runtest_rimea_13.py @@ -35,9 +35,10 @@ Source http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E.pdf """ +import matplotlib.pyplot as plt import os import sys -import matplotlib.pyplot as plt + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_14/runtest_rimea_14.py b/Utest/rimea_tests/test_14/runtest_rimea_14.py index 3b9195e49ce9495df69ef3364dd8ccf04dd8b6ef..fa298793230aa390a4ae4d3efa72298a53142ca0 100644 --- a/Utest/rimea_tests/test_14/runtest_rimea_14.py +++ b/Utest/rimea_tests/test_14/runtest_rimea_14.py @@ -23,7 +23,7 @@ http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E import numpy as np import os import sys -import glob + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_15/runtest_rimea_15.py b/Utest/rimea_tests/test_15/runtest_rimea_15.py index 911699508b62fe356e0bbc5b55b4934af7a91e34..be524e05dba2ee75076abfc74254f569a8ff5729 100644 --- a/Utest/rimea_tests/test_15/runtest_rimea_15.py +++ b/Utest/rimea_tests/test_15/runtest_rimea_15.py @@ -25,7 +25,7 @@ http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E import numpy as np import os import sys -import glob + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_4/runtest_rimea_4.py b/Utest/rimea_tests/test_4/runtest_rimea_4.py index 4fa49dc94e3229982d506ebb62d081d04e1aee85..ff0b6f2a2befcd6c544caa55dc7d78b4705d9f3c 100644 --- a/Utest/rimea_tests/test_4/runtest_rimea_4.py +++ b/Utest/rimea_tests/test_4/runtest_rimea_4.py @@ -41,8 +41,9 @@ http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E """ -import numpy as np import matplotlib +import numpy as np + matplotlib.use('Agg') import matplotlib.pyplot as plt import os diff --git a/Utest/rimea_tests/test_5/runtest_rimea_5.py b/Utest/rimea_tests/test_5/runtest_rimea_5.py index 90c6f3c50524ed237d716bdc7e16e9f466aad07a..bfe3ce7adc2a08f23f42681ecc62436e77530e49 100644 --- a/Utest/rimea_tests/test_5/runtest_rimea_5.py +++ b/Utest/rimea_tests/test_5/runtest_rimea_5.py @@ -24,9 +24,10 @@ Source http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E.pdf """ +import numpy as np import os import sys -import numpy as np + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_6/runtest_rimea_6.py b/Utest/rimea_tests/test_6/runtest_rimea_6.py index b9254db669c9832cc069e730e4307a80928c48e0..b46b789d966d0d0e37bc8250abfbe1b7cfb5c379 100644 --- a/Utest/rimea_tests/test_6/runtest_rimea_6.py +++ b/Utest/rimea_tests/test_6/runtest_rimea_6.py @@ -17,9 +17,10 @@ Source http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E.pdf """ +import numpy as np import os import sys -import numpy as np + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_7/gauss.py b/Utest/rimea_tests/test_7/gauss.py index a6f48183c18db468a8cdc259047eb8e996dc35af..12363595825450136b67c34948eab007d0c3ae62 100644 --- a/Utest/rimea_tests/test_7/gauss.py +++ b/Utest/rimea_tests/test_7/gauss.py @@ -1,6 +1,6 @@ +import matplotlib.mlab as mlab import matplotlib.pyplot as plt import numpy as np -import matplotlib.mlab as mlab weidman_max_vel = np.array([1.61, 1.54, 1.41, 0.76]) weidman_min_vel = np.array([0.58, 1.41, 0.68, 0.46]) diff --git a/Utest/rimea_tests/test_7/runtest_rimea_7.py b/Utest/rimea_tests/test_7/runtest_rimea_7.py index 869b634f93a570ee73eb1773992d227b57aa7678..f383151a46e8e4b9f110bf0696238b53dff14168 100644 --- a/Utest/rimea_tests/test_7/runtest_rimea_7.py +++ b/Utest/rimea_tests/test_7/runtest_rimea_7.py @@ -36,10 +36,11 @@ Source http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E.pdf """ -import os -import sys import numpy as np +import os import pylab as P +import sys + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) from sys import * sys.path.append(utestdir) diff --git a/Utest/rimea_tests/test_9/runtest_rimea_9.py b/Utest/rimea_tests/test_9/runtest_rimea_9.py index 675fad391951d3ea9a03fd6a666d08da82e47d98..23e7d669eda6eeee226413535aa5a2a75a20222c 100644 --- a/Utest/rimea_tests/test_9/runtest_rimea_9.py +++ b/Utest/rimea_tests/test_9/runtest_rimea_9.py @@ -30,7 +30,7 @@ http://www.rimea.de/fileadmin/files/dok/richtlinien/RiMEA_Richtlinie_3.0.0_-_D-E import os import sys from sys import * -import glob + utestdir = os.path.abspath(os.path.dirname(os.path.dirname(sys.path[0]))) sys.path.append(utestdir) from JPSRunTest import JPSRunTestDriver diff --git a/Utest/template_test/script.py b/Utest/template_test/script.py index 782897f1712ebd63014567957590d4a4f030a2dd..55a11a939e9138ac430c56bfef88de25f96aa3f9 100755 --- a/Utest/template_test/script.py +++ b/Utest/template_test/script.py @@ -1,12 +1,11 @@ #! /usr/bin/env python -import numpy as np -import os, argparse, logging, time, sys -from os import path, system -from sys import argv ,exit -import subprocess, glob -import multiprocessing -import matplotlib.pyplot as plt -import re +import glob +import logging +import os +import subprocess +import sys +from os import path +from sys import argv, exit #========================= testnr = 1 diff --git a/Utest/utils.py b/Utest/utils.py index 7860ec22648de4dc622292b67ed84747701d3da5..8a9a665406c8c185257b8003b2822282b0551ccf 100644 --- a/Utest/utils.py +++ b/Utest/utils.py @@ -1,7 +1,8 @@ -from xml.dom import minidom import logging import numpy as np import pandas as pd +from xml.dom import minidom + SUCCESS = 0 FAILURE = -1 critical_value = 0.9 diff --git a/events/EventManager.cpp b/events/EventManager.cpp index 0009b9de4b3a66e4d5d5a2321f47022187c6766a..310f35cca89ef6e7303b48a9cb0a1ec6bafd1f68 100644 --- a/events/EventManager.cpp +++ b/events/EventManager.cpp @@ -27,25 +27,16 @@ #include <string> -#include <cstdio> #include <cstdlib> #include <iostream> -#include <algorithm> #include <fstream> #include <vector> #include <math.h> -#include <stdio.h> #include "../pedestrian/Pedestrian.h" #include "../pedestrian/Knowledge.h" #include "../mpi/LCGrid.h" -#include "../geometry/Building.h" #include "../geometry/SubRoom.h" -#include "../geometry/Transition.h" -#include "../geometry/Point.h" #include "../tinyxml/tinyxml.h" -#include "../IO/OutputHandler.h" -#include "../IO/IODispatcher.h" -#include "../routing/RoutingEngine.h" #include "../routing/global_shortest/GlobalRouter.h" #include "../routing/quickest/QuickestPathRouter.h" #include "../routing/ai_router/AIRouter.h" diff --git a/general/ArgumentParser.cpp b/general/ArgumentParser.cpp index f2101090fc9a6b04f0b4a64a929617f95cc8e2f9..d093eb5b69e17c7aa577dda7481be221a2771b6b 100644 --- a/general/ArgumentParser.cpp +++ b/general/ArgumentParser.cpp @@ -34,8 +34,6 @@ #ifdef _OPENMP -#include <omp.h> - #else #define omp_get_thread_num() 0 #define omp_get_max_threads() 1 @@ -43,13 +41,11 @@ #include "../IO/OutputHandler.h" #include "ArgumentParser.h" -#include "Macros.h" #include "../pedestrian/AgentsParameters.h" #include "../routing/global_shortest/GlobalRouter.h" #include "../routing/quickest/QuickestPathRouter.h" #include "../routing/ai_router/AIRouter.h" #include "../IO/IniFileParser.h" -#include <sys/stat.h> using namespace std; diff --git a/geometry/Building.cpp b/geometry/Building.cpp index cc8448c263c698a5b04dd38901e0238d46c18b25..3bce48ddae680a1c546fd84608e5e64d4383c283 100644 --- a/geometry/Building.cpp +++ b/geometry/Building.cpp @@ -36,10 +36,7 @@ #include "GeometryReader.h" #include "../pedestrian/Pedestrian.h" #include "../mpi/LCGrid.h" -#include "../routing/RoutingEngine.h" -#include "../pedestrian/PedDistributor.h" #include "../IO/GeoFileParser.h" -#include "../hybrid/GeometryFromProtobufLoader.h" #endif @@ -47,8 +44,6 @@ #ifdef _OPENMP -#include <omp.h> - #else #define omp_get_thread_num() 0 #define omp_get_max_threads() 1 diff --git a/geometry/Building.h b/geometry/Building.h index 306381a0145371d05220230ed6716133305b9119..52e217c9f6b5807680e466938797e4437fe4b09a 100644 --- a/geometry/Building.h +++ b/geometry/Building.h @@ -29,13 +29,13 @@ #ifndef _BUILDING_H #define _BUILDING_H -#include <cstdlib> -#include <string> -#include <vector> -#include <fstream> -#include <cfloat> -#include <map> -#include <memory> +// nclude <cstdlib> +// #include <string> +// #include <vector> +// #include <fstream> +// #include <cfloat> +// #include <map> +// #include <memory> #include "Room.h" #include "NavLine.h" diff --git a/geometry/Crossing.cpp b/geometry/Crossing.cpp index 00a3d85b539ef2c9192b1f218f5ee6c201a15edd..601611175df83ded2ca8ada16cef483d7602fde5 100644 --- a/geometry/Crossing.cpp +++ b/geometry/Crossing.cpp @@ -27,7 +27,6 @@ #include "Crossing.h" -#include "Room.h" #include "SubRoom.h" using namespace std; diff --git a/geometry/Line.cpp b/geometry/Line.cpp index 4e257b1b6d40ae47cf0ba559d69510f9735b940a..33a93e98f2f5cc8e4faa32baafb07ef1dbc8061f 100644 --- a/geometry/Line.cpp +++ b/geometry/Line.cpp @@ -31,10 +31,6 @@ #include "../general/Macros.h" #include "Line.h" #include "Wall.h" -#include "../IO/OutputHandler.h" - -#include <cmath> -#include <sstream> int Line::_static_UID = 0; diff --git a/geometry/Obstacle.cpp b/geometry/Obstacle.cpp index 8dad5eaf9128bee8c8af417529b493a9ef28af26..08ef27a790ebbcb0c9b2977afe1bad39e660e03d 100644 --- a/geometry/Obstacle.cpp +++ b/geometry/Obstacle.cpp @@ -28,16 +28,10 @@ #include "Obstacle.h" -#include <cmath> -#include <cstdio> #include <cstdlib> -#include <iterator> -#include <string> -#include <vector> #include "../IO/OutputHandler.h" #include "Line.h" -#include "Point.h" #include "Wall.h" diff --git a/geometry/Point.cpp b/geometry/Point.cpp index dfe82699af9ce06215f4c75a6d7f2cee4121195b..c1b7bbdcbc34be4411c97ef183f9cb1bdef95cbb 100644 --- a/geometry/Point.cpp +++ b/geometry/Point.cpp @@ -29,14 +29,6 @@ #include "Point.h" #include "../general/Macros.h" -#include <iostream> -#include <cmath> -#include <sstream> - - - - - /************************************************************ Konstruktoren ************************************************************/ diff --git a/geometry/Room.cpp b/geometry/Room.cpp index d9efd5d779e96af46f95e2d0a95351f7a1266875..62a679c79965b784775bfdb45a6a4565b267cd33 100644 --- a/geometry/Room.cpp +++ b/geometry/Room.cpp @@ -28,10 +28,6 @@ #include "Room.h" #include "SubRoom.h" -#include "../IO/OutputHandler.h" - -#include <sstream> -#include <memory> using namespace std; diff --git a/geometry/SubRoom.cpp b/geometry/SubRoom.cpp index 7296664b166bc15c11eb14bd8778182abe1912c1..c5f452856b9ff8e417498e658f947f76aebe2c90 100644 --- a/geometry/SubRoom.cpp +++ b/geometry/SubRoom.cpp @@ -32,15 +32,11 @@ #include "Obstacle.h" #include "SubRoom.h" #include "Transition.h" -#include "Hline.h" - #ifdef _SIMULATOR #include "../pedestrian/Pedestrian.h" #endif //_SIMULATOR -#include <cmath> - using namespace std; /************************************************************ diff --git a/geometry/Transition.cpp b/geometry/Transition.cpp index 7e65bdb49bce346309bcafd267f16f4e3226eff8..1ab6918e4d01410ef904b4fbbf84b6aa1280f852 100644 --- a/geometry/Transition.cpp +++ b/geometry/Transition.cpp @@ -27,9 +27,7 @@ #include "Transition.h" -#include "Room.h" #include "SubRoom.h" -#include "../IO/OutputHandler.h" using namespace std; diff --git a/main.cpp b/main.cpp index aec52b5105ed799d78b4a8aa910a6086940b0542..a1cc927e35f0448fdce4ddecec610edf51823ea6 100644 --- a/main.cpp +++ b/main.cpp @@ -29,7 +29,6 @@ #include "geometry/Building.h" #include "general/ArgumentParser.h" #include "./Simulation.h" -#include "pedestrian/AgentsSourcesManager.h" #ifdef _JPS_AS_A_SERVICE @@ -38,8 +37,6 @@ #endif #include <thread> -#include <functional> -#include <iomanip> int main(int argc, char** argv) { diff --git a/math/ForceModel.cpp b/math/ForceModel.cpp index e6f42a9f85da6a507462e3c9052c9bd31d40f6ad..249223fe76bcd97b4932ecd2bc75973806f32e7e 100644 --- a/math/ForceModel.cpp +++ b/math/ForceModel.cpp @@ -27,13 +27,10 @@ #include "ForceModel.h" -#include "../routing/DirectionStrategy.h" -#include "../mpi/LCGrid.h" #include "../pedestrian/Pedestrian.h" #ifdef _OPENMP -#include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_max_threads() 1 diff --git a/math/GCFMModel.cpp b/math/GCFMModel.cpp index dd325b379ff10df6ad450bd5ad3889cbd8d04548..88d181d28fc7a322798f1932af96655232187b7a 100644 --- a/math/GCFMModel.cpp +++ b/math/GCFMModel.cpp @@ -31,10 +31,8 @@ #include "GCFMModel.h" #include "../pedestrian/Pedestrian.h" -#include "../routing/DirectionStrategy.h" #include "../mpi/LCGrid.h" #include "../geometry/SubRoom.h" -#include "../geometry/Wall.h" #ifdef _OPENMP #include <omp.h> diff --git a/math/GompertzModel.cpp b/math/GompertzModel.cpp index 6e1de1ac8fdcbe7a765b74a88b4307a32d3867c6..7401fac61ded21a68b8b8006b2101076930b145c 100644 --- a/math/GompertzModel.cpp +++ b/math/GompertzModel.cpp @@ -30,7 +30,6 @@ #include "../pedestrian/Pedestrian.h" -#include "../routing/DirectionStrategy.h" #include "../mpi/LCGrid.h" #include "../geometry/Wall.h" #include "../geometry/SubRoom.h" diff --git a/math/GradientModel.cpp b/math/GradientModel.cpp index 84abdede22a8c3fd9457c8b2747ecd6a83084331..19a58e73a3d1feb5554969d30bcc4317225f35ee 100644 --- a/math/GradientModel.cpp +++ b/math/GradientModel.cpp @@ -30,7 +30,6 @@ #include <math.h> #include "../pedestrian/Pedestrian.h" -#include "../routing/DirectionStrategy.h" #include "../mpi/LCGrid.h" #include "../geometry/Wall.h" #include "../geometry/SubRoom.h" diff --git a/math/KrauszModel.cpp b/math/KrauszModel.cpp index c40cd7227ecc5fe91acbdd06e55aa75dd462b7f0..8b89367d6e79ac469338c56c27953d6b0784474e 100644 --- a/math/KrauszModel.cpp +++ b/math/KrauszModel.cpp @@ -31,10 +31,8 @@ #include "KrauszModel.h" #include "../pedestrian/Pedestrian.h" -#include "../routing/DirectionStrategy.h" #include "../mpi/LCGrid.h" #include "../geometry/SubRoom.h" -#include "../geometry/Wall.h" #ifdef _OPENMP #include <omp.h> diff --git a/mpi/LCGrid.cpp b/mpi/LCGrid.cpp index 12d99e15b6832206c251dbee1d037f5ecf12d4af..5f0aa30990b00bf80105a3a8b5647d8a32b8f6d9 100644 --- a/mpi/LCGrid.cpp +++ b/mpi/LCGrid.cpp @@ -36,7 +36,6 @@ #include"LCGrid.h" #include "../pedestrian/Pedestrian.h" -#include "../geometry/Building.h" using namespace std; diff --git a/pedestrian/AgentsSource.cpp b/pedestrian/AgentsSource.cpp index 02de84c39857ffbfbc68c7020c0a960b6e387c86..e37f626320f07d2d4f64e069761af21d61fa6343 100644 --- a/pedestrian/AgentsSource.cpp +++ b/pedestrian/AgentsSource.cpp @@ -29,10 +29,6 @@ #include "AgentsSource.h" #include "Pedestrian.h" -#include "StartDistribution.h" -#include "../IO/OutputHandler.h" - -#include <iostream> AgentsSource::AgentsSource(int id, const std::string& caption,int max_agents,int group_id,int frequency, bool greedy): _id(id), _frequency(frequency), _maxAgents(max_agents), _groupID(group_id), _caption(caption), _greedy(greedy) diff --git a/pedestrian/AgentsSourcesManager.cpp b/pedestrian/AgentsSourcesManager.cpp index edf3ad1720046ab128b0adc76f3c863bcd3b67e8..df54ad0e5e37f4bff46f10c741b2a3725282e1f5 100644 --- a/pedestrian/AgentsSourcesManager.cpp +++ b/pedestrian/AgentsSourcesManager.cpp @@ -29,16 +29,9 @@ #include "AgentsSourcesManager.h" #include "Pedestrian.h" -#include "StartDistribution.h" -#include "PedDistributor.h" -#include "AgentsSource.h" -#include "../geometry/Building.h" -#include "../geometry/Point.h" #include "../mpi/LCGrid.h" -#include <iostream> #include <thread> -#include <chrono> #include "AgentsQueue.h" #include "../voronoi-boost/VoronoiPositionGenerator.h" diff --git a/pedestrian/Ellipse.cpp b/pedestrian/Ellipse.cpp index aa952477718813123bbf330c40fa6944ae9add74..8543ca426c9375457700dc943dcbd0a23f8ace14 100644 --- a/pedestrian/Ellipse.cpp +++ b/pedestrian/Ellipse.cpp @@ -29,7 +29,6 @@ #include "Ellipse.h" #define _USE_MATH_DEFINES -#include <math.h> #ifndef M_PI #define M_PI 3.14159265358979323846 #endif diff --git a/pedestrian/PedDistributor.cpp b/pedestrian/PedDistributor.cpp index f4b81b2eb2d5d00089009f52a2d85396092a91fd..f8aa76864e4a4bc38d5f77ba4bf6c023f44ee9c1 100644 --- a/pedestrian/PedDistributor.cpp +++ b/pedestrian/PedDistributor.cpp @@ -28,27 +28,15 @@ #include <cmath> #include "PedDistributor.h" -#include "../tinyxml/tinyxml.h" -#include "../geometry/Obstacle.h" -#include "../routing/RoutingEngine.h" #include "../pedestrian/Pedestrian.h" #include "../geometry/SubRoom.h" -#include "../IO/OutputHandler.h" #include "../IO/PedDistributionParser.h" -#include "PedDistributionLoader.h" -#include "../hybrid/PedDistributionFromProtobufLoader.h" #include <boost/filesystem.hpp> #include <boost/lambda/bind.hpp> #include <boost/foreach.hpp> -#include <boost/algorithm/string.hpp> //split #include <boost/range/combine.hpp> -#include<fstream> -#include <string> -#include <vector> - - using namespace std; namespace fs = boost::filesystem; using namespace boost::lambda; diff --git a/pedestrian/Pedestrian.cpp b/pedestrian/Pedestrian.cpp index ebc4308b26f1c2dc934e75b231a9145a4e232ac6..f252ccd2a4340c84937883cb2aabf236d044f348 100644 --- a/pedestrian/Pedestrian.cpp +++ b/pedestrian/Pedestrian.cpp @@ -28,19 +28,11 @@ #include <cassert> #include "../geometry/Building.h" -#include "../geometry/NavLine.h" -#include "../routing/Router.h" #include "../geometry/SubRoom.h" -#include "../IO/OutputHandler.h" #include "Knowledge.h" #include "Pedestrian.h" -#include "PedDistributor.h" -#include "../JPSfire/generic/FDSMesh.h" -#include "../JPSfire/generic/Knot.h" #include "../JPSfire/generic/FDSMeshStorage.h" -#include "../JPSfire/B_walking_speed/WalkingSpeed.h" -#include "../JPSfire/C_toxicity_analysis/ToxicityAnalysis.h" using namespace std; diff --git a/pedestrian/StartDistribution.cpp b/pedestrian/StartDistribution.cpp index f89e8697682f0271a22c60ec5cff0e75ad93d2d5..1ef439553299f2631579869545371c5345cba3fa 100644 --- a/pedestrian/StartDistribution.cpp +++ b/pedestrian/StartDistribution.cpp @@ -27,15 +27,9 @@ #include "StartDistribution.h" -#include <cmath> -#include <cfloat> #include "AgentsParameters.h" #include "Pedestrian.h" -#include "../geometry/Building.h" -#include "../geometry/Point.h" -#include "../routing/RoutingEngine.h" #include "../geometry/SubRoom.h" -#include "boost/math/distributions.hpp" using namespace std; diff --git a/routing/DirectionStrategy.cpp b/routing/DirectionStrategy.cpp index 9daedf9b567942ceaba049220abe486482dff683..3a900b8f39ba400a455284c7ba9e61ae7de98755 100644 --- a/routing/DirectionStrategy.cpp +++ b/routing/DirectionStrategy.cpp @@ -35,11 +35,9 @@ //#include "../geometry/Wall.h" #include "../routing/ff_router/UnivFFviaFM.h" #include "../routing/ff_router/FloorfieldViaFM.h" -#include "../routing/ff_router/LocalFloorfieldViaFM.h" #include "../routing/ff_router/ffRouter.h" //#include "DirectionStrategy.h" //#include <fstream> -#include <chrono> //#include <ctime> #define UNUSED(x) [&x]{}() // c++11 silence warnings diff --git a/routing/Router.cpp b/routing/Router.cpp index 2aa1fef44faeb051beebe83b6344b2f92ca865ae..da533732e4150fae9943ab0431e065c110f98053 100644 --- a/routing/Router.cpp +++ b/routing/Router.cpp @@ -29,7 +29,6 @@ #include "Router.h" #include "../geometry/Building.h" #include "../pedestrian/Pedestrian.h" -#include "../IO/OutputHandler.h" using namespace std; diff --git a/routing/ai_router/AIRouter.cpp b/routing/ai_router/AIRouter.cpp index 176ea04f54bdd418fa47db73c2373649c7d96798..01a443b8a9f1f3acfabfda6027020a531f771b83 100644 --- a/routing/ai_router/AIRouter.cpp +++ b/routing/ai_router/AIRouter.cpp @@ -27,17 +27,10 @@ #include "AIRouter.h" -#include "../Router.h" #include "BrainStorage.h" -#include "./cognitiveMap/cognitivemap.h" -#include "NavigationGraph.h" #include "./sensor/SensorManager.h" -#include "../../geometry/SubRoom.h" -#include "../../geometry/NavLine.h" -#include "../../geometry/Building.h" - #include "../../pedestrian/Pedestrian.h" #include "../../tinyxml/tinyxml.h" diff --git a/routing/ai_router/BrainStorage.cpp b/routing/ai_router/BrainStorage.cpp index 552700bb5908b841452f23bbdf6eab71686a9e67..b6af145c83a721ed5a873ad36cb9eff1a41f0669 100644 --- a/routing/ai_router/BrainStorage.cpp +++ b/routing/ai_router/BrainStorage.cpp @@ -28,12 +28,9 @@ #include "BrainStorage.h" -#include "cognitiveMap/internnavigationnetwork.h" #include "../../tinyxml/tinyxml.h" -#include <memory> -#include "../../geometry/Building.h" #include "../../pedestrian/Pedestrian.h" //#include "NavigationGraph.h" diff --git a/routing/ai_router/GraphNetwork.cpp b/routing/ai_router/GraphNetwork.cpp index fc91e6c8432925eec00b501b51181cde5114c8b0..f962662003f7a0e5874dd24c7eb0f16fc6385cf2 100644 --- a/routing/ai_router/GraphNetwork.cpp +++ b/routing/ai_router/GraphNetwork.cpp @@ -28,13 +28,9 @@ #include "GraphNetwork.h" -#include "NavigationGraph.h" -#include "navigation_graph/GraphVertex.h" -#include "navigation_graph/GraphEdge.h" #include "../../geometry/Crossing.h" #include "../../geometry/Building.h" -#include "../../geometry/NavLine.h" #include "../../pedestrian/Pedestrian.h" diff --git a/routing/ai_router/NavigationGraph.cpp b/routing/ai_router/NavigationGraph.cpp index f9ab9b6c253f865b20e17f6ed52c6162f7bb2ee2..8291800676f00a819b8884faed046dabe484c2af 100644 --- a/routing/ai_router/NavigationGraph.cpp +++ b/routing/ai_router/NavigationGraph.cpp @@ -29,11 +29,6 @@ #include "NavigationGraph.h" -#include <iostream> -#include <utility> -#include <fstream> - -#include "navigation_graph/GraphEdge.h" #include "../../geometry/Building.h" #include "../../geometry/SubRoom.h" diff --git a/routing/ai_router/cognitiveMap/cognitivemap.cpp b/routing/ai_router/cognitiveMap/cognitivemap.cpp index 6cc449de56d4ac3c60ec5e96fdcf04cfe52eed32..a71101e1f9f74f77be0fb0913ea3f21531aa5fe0 100644 --- a/routing/ai_router/cognitiveMap/cognitivemap.cpp +++ b/routing/ai_router/cognitiveMap/cognitivemap.cpp @@ -1,12 +1,7 @@ #include "cognitivemap.h" -#include "../../../geometry/Point.h" #include "../../../geometry/SubRoom.h" -#include "../../../geometry/Building.h" #include "../../../pedestrian/Pedestrian.h" #include "../../../visiLibity/source_code/visilibity.hpp" -#include <chrono> -#include <random> -#include <algorithm> //for shortest path calculations //#include <boost/graph/graph_traits.hpp> diff --git a/routing/ai_router/cognitiveMap/connection.cpp b/routing/ai_router/cognitiveMap/connection.cpp index d118ff190779787a008ecd454b14f923fc92172a..70b565f2cc6d5c3fef0a7011ec261a6b11504e26 100644 --- a/routing/ai_router/cognitiveMap/connection.cpp +++ b/routing/ai_router/cognitiveMap/connection.cpp @@ -1,5 +1,4 @@ #include "connection.h" -#include <utility> Connection::Connection(const int &id, const std::string &caption, const std::string &type, const ptrLandmark &landmark1, const ptrLandmark &landmark2) { diff --git a/routing/ai_router/cognitiveMap/internnavigationnetwork.cpp b/routing/ai_router/cognitiveMap/internnavigationnetwork.cpp index 44a0a6276e7356e274cd3020ea8e825ae69cda11..61ecf14d149cccca164d1d805163218ba80d6839 100644 --- a/routing/ai_router/cognitiveMap/internnavigationnetwork.cpp +++ b/routing/ai_router/cognitiveMap/internnavigationnetwork.cpp @@ -1,9 +1,5 @@ #include "internnavigationnetwork.h" -#include <boost/graph/graph_traits.hpp> -#include <boost/graph/adjacency_list.hpp> -#include <boost/graph/dijkstra_shortest_paths.hpp> -#include <boost/geometry.hpp> #include "../../../geometry/Obstacle.h" InternNavigationNetwork::InternNavigationNetwork() diff --git a/routing/ai_router/cognitiveMap/landmark.cpp b/routing/ai_router/cognitiveMap/landmark.cpp index 7965201999a67db417f93e0c649f7775f10ebce1..070b67819e1fc87b6ea00d546599ab11db5a5b44 100644 --- a/routing/ai_router/cognitiveMap/landmark.cpp +++ b/routing/ai_router/cognitiveMap/landmark.cpp @@ -1,7 +1,5 @@ #include "landmark.h" #include "associations.h" -#include <stdlib.h> -#include <math.h> Landmark::Landmark(Point pos, ptrRoom room) { diff --git a/routing/ai_router/cognitiveMap/youareherepointer.cpp b/routing/ai_router/cognitiveMap/youareherepointer.cpp index 22ed29c75d34275e296f866e0cdb6dd1c31cb67e..18d3424991bb17c6512deb7927983a7a7c44cdcf 100644 --- a/routing/ai_router/cognitiveMap/youareherepointer.cpp +++ b/routing/ai_router/cognitiveMap/youareherepointer.cpp @@ -1,7 +1,5 @@ #include "youareherepointer.h" #include "../../../pedestrian/Pedestrian.h" -#include <cmath> -#include <iostream> #ifndef M_PI #define M_PI 3.14159265358979323846 diff --git a/routing/ai_router/navigation_graph/GraphEdge.cpp b/routing/ai_router/navigation_graph/GraphEdge.cpp index 88b6705ffda96378511e14cdea6304c8223eab1d..263df27b752ab34b2710b0a52f5bc1309c2b7dc9 100644 --- a/routing/ai_router/navigation_graph/GraphEdge.cpp +++ b/routing/ai_router/navigation_graph/GraphEdge.cpp @@ -28,8 +28,6 @@ #include "GraphEdge.h" -#include<vector> - #include "GraphVertex.h" #include "../../../geometry/SubRoom.h" #include "../../../geometry/Crossing.h" diff --git a/routing/ai_router/navigation_graph/GraphVertex.cpp b/routing/ai_router/navigation_graph/GraphVertex.cpp index c400759da852391d9aabac1e265d302de09ee304..0e96b638d06d2dfd7467dd36b1757560e148d373 100644 --- a/routing/ai_router/navigation_graph/GraphVertex.cpp +++ b/routing/ai_router/navigation_graph/GraphVertex.cpp @@ -28,18 +28,10 @@ #include "GraphVertex.h" -#include <utility> -#include <cmath> -#include <set> -#include <map> -#include <queue> -#include <functional> - #include "GraphEdge.h" #include "../../../geometry/SubRoom.h" #include "../NavigationGraph.h" #include "../../../geometry/Transition.h" -#include <algorithm> using namespace std; #define UNUSED(x) [&x]{}() // c++11 silence warnings diff --git a/routing/ai_router/perception/visibleenvironment.cpp b/routing/ai_router/perception/visibleenvironment.cpp index c156397642247eeb24edea28379914ce173e0b4e..30bd8124037aea76f0e97625e5298deaa0f126e0 100644 --- a/routing/ai_router/perception/visibleenvironment.cpp +++ b/routing/ai_router/perception/visibleenvironment.cpp @@ -4,7 +4,6 @@ #include "../../../pedestrian/Pedestrian.h" #include "../../../geometry/SubRoom.h" -#include <boost/geometry/geometry.hpp> //#include <boost/foreach.hpp> #define UNUSED(x) [&x]{}() // c++11 silence warnings diff --git a/routing/ai_router/sensor/DiscoverDoorsSensor.cpp b/routing/ai_router/sensor/DiscoverDoorsSensor.cpp index 96c53d9ce5fe8823659de3ecca0ed02064b2dfcd..85b8b7e94bdc41bf9003e5399a0cacf1c5b260c4 100644 --- a/routing/ai_router/sensor/DiscoverDoorsSensor.cpp +++ b/routing/ai_router/sensor/DiscoverDoorsSensor.cpp @@ -34,7 +34,6 @@ #include "../cognitiveMap/cognitivemap.h" #include "../../../pedestrian/Pedestrian.h" #include "../../../geometry/SubRoom.h" -#include <vector> DiscoverDoorsSensor::~DiscoverDoorsSensor() { diff --git a/routing/ai_router/sensor/JamSensor.cpp b/routing/ai_router/sensor/JamSensor.cpp index 2ada431222da600978e783a12f3cfbe278e21431..e8e66f040bca54de6bf6e4c457a9649b7e1bc432 100644 --- a/routing/ai_router/sensor/JamSensor.cpp +++ b/routing/ai_router/sensor/JamSensor.cpp @@ -31,8 +31,7 @@ #include "../cognitiveMap/cognitivemap.h" #include "../../../pedestrian/Pedestrian.h" #include "../../../geometry/SubRoom.h" -#include <set> -#include <vector> + JamSensor::~JamSensor() { } diff --git a/routing/ai_router/sensor/SensorManager.cpp b/routing/ai_router/sensor/SensorManager.cpp index 05bdeb7e063329149a143b1ae7d89db68db1666a..6a79654359b10c08bbe729e71c007e6c2ecf1794 100644 --- a/routing/ai_router/sensor/SensorManager.cpp +++ b/routing/ai_router/sensor/SensorManager.cpp @@ -38,9 +38,7 @@ #include "../../../geometry/Building.h" #include "../BrainStorage.h" -#include "../navigation_graph/GraphVertex.h" -#include "../NavigationGraph.h" -#include "../cognitiveMap/cognitivemap.h" + #define UNUSED(x) [&x]{}() // c++11 silence warnings SensorManager::SensorManager(const Building * b, BrainStorage * cms) diff --git a/routing/ff_router/FloorfieldViaFM.cpp b/routing/ff_router/FloorfieldViaFM.cpp index cc4f3d3ba5cf5795b9d09bdf6a21e248693f238a..b25c1a52e8cfdb4d99068995a347eda794e0b13e 100644 --- a/routing/ff_router/FloorfieldViaFM.cpp +++ b/routing/ff_router/FloorfieldViaFM.cpp @@ -36,7 +36,6 @@ //#include <chrono> #ifdef _OPENMP -#include <omp.h> #else #define omp_get_thread_num() 0 #define omp_get_max_threads() 1 diff --git a/routing/ff_router/UnivFFviaFM.cpp b/routing/ff_router/UnivFFviaFM.cpp index 2a86c419c6b84c4a040685872e792e6fcd69b61a..4f248b1bed90bda557cbf76962967baf3ac1aed2 100644 --- a/routing/ff_router/UnivFFviaFM.cpp +++ b/routing/ff_router/UnivFFviaFM.cpp @@ -6,7 +6,6 @@ #include "UnivFFviaFM.h" #include "../../geometry/Line.h" #include "../../geometry/Building.h" -#include "../../geometry/Room.h" #include "../../geometry/SubRoom.h" #include "../../pedestrian/Pedestrian.h" #include "mesh/RectGrid.h" diff --git a/routing/ff_router/ffRouter.cpp b/routing/ff_router/ffRouter.cpp index 64cd6b1ce74415ea082c92da8f838f2ba8a46b65..8b555c0ee9cf034816d08b030a97288e669557c6 100644 --- a/routing/ff_router/ffRouter.cpp +++ b/routing/ff_router/ffRouter.cpp @@ -50,10 +50,6 @@ #include "ffRouter.h" //#include "FloorfieldViaFM.h" //#include "../../geometry/Building.h" -#include "../../pedestrian/Pedestrian.h" -#include "../../IO/OutputHandler.h" - -#include <chrono> int FFRouter::_cnt = 0; diff --git a/scripts/cdf.py b/scripts/cdf.py index 01f239bab7a7f6983c9ef5ae64545ec5e1e17c3c..93836317f9c5232bddace0e8a892a99f2b248961 100644 --- a/scripts/cdf.py +++ b/scripts/cdf.py @@ -1,11 +1,9 @@ +import matplotlib.pyplot as plt import numpy as np import pandas as pd -from scipy.optimize import curve_fit -import matplotlib.pyplot as plt import sys from sys import exit - fps = 8 x0 = 61 name = "times.txt" diff --git a/scripts/plot_neighbors.py b/scripts/plot_neighbors.py index 0bcff1c8a2dd019598eb34ecfa634c072fe0a3b2..bd6e2b13ac1a7f616334a7331fa11ffa3e89a268 100644 --- a/scripts/plot_neighbors.py +++ b/scripts/plot_neighbors.py @@ -1,8 +1,6 @@ -from multiprocessing import Pool, current_process import numpy as np import matplotlib.pyplot as plt from sys import argv, exit -import pandas as pd import os, time from pylab import Rectangle @@ -11,8 +9,6 @@ if len(argv)<=2: print("usage: %s, filename geometryfile"%argv[0]) exit() - -from itertools import product try: import xml.etree.cElementTree as ET except ImportError: diff --git a/scripts/vizUnity_geometry.py b/scripts/vizUnity_geometry.py index e9a78df6275a8a2bfb594013e0b948d3fa03faec..c2f5b196155878ac08fda713425d08d24898b99e 100644 --- a/scripts/vizUnity_geometry.py +++ b/scripts/vizUnity_geometry.py @@ -1,14 +1,13 @@ -from itertools import product try: import xml.etree.cElementTree as ET except ImportError: import xml.etree.ElementTree as ET -from xml.dom import minidom import logging -import numpy as np +import numpy as np import sys +from xml.dom import minidom logfile='log.dat' logging.basicConfig(filename=logfile, level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s') diff --git a/scripts/xml2txt.py b/scripts/xml2txt.py index f9f2607b826c13b7d7b48094147712172c720b44..90a5e5b202d12492b4c1c8c83d40571ead2a670e 100644 --- a/scripts/xml2txt.py +++ b/scripts/xml2txt.py @@ -5,8 +5,9 @@ input: xml file output: xml file """ -from sys import argv, exit import os +from sys import argv, exit + try: import xml.etree.cElementTree as ET except ImportError: diff --git a/voronoi-boost/VoronoiPositionGenerator.cpp b/voronoi-boost/VoronoiPositionGenerator.cpp index c512503c99ebfcc966ee94a8d58346d3a8765dae..22aa899936acfb4633264e7f7df2ed594fb4ae79 100644 --- a/voronoi-boost/VoronoiPositionGenerator.cpp +++ b/voronoi-boost/VoronoiPositionGenerator.cpp @@ -33,7 +33,6 @@ static int global_count = 0; //#include <string> //#include <random> -#include "boost/polygon/voronoi.hpp" using boost::polygon::voronoi_builder; using boost::polygon::voronoi_diagram; using boost::polygon::x;