Skip to content

Commit 8c8767a

Browse files
committed
Try to fix all
1 parent a7b0c2c commit 8c8767a

19 files changed

+132
-106
lines changed

CMakeLists.txt

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@ find_package(spdlog REQUIRED)
2929
find_package(simdjson REQUIRED)
3030

3131
file(GLOB SOURCES "src/dsf/base/*.cpp" "src/dsf/mobility/*.cpp" "src/dsf/utility/*.cpp" "src/dsf/geometry/*.cpp")
32-
# Exclude binding.cpp from the main library - it's only for Python bindings
33-
list(FILTER SOURCES EXCLUDE REGEX ".*binding\\.cpp$")
3432

3533
include(FetchContent)
3634
# Get rapidcsv
@@ -86,7 +84,7 @@ if(BUILD_PYTHON_BINDINGS)
8684
endif()
8785

8886
# Add the Python binding module
89-
add_library(dsf_python_module MODULE src/dsf/mobility/binding.cpp)
87+
add_library(dsf_python_module MODULE src/dsf/binding_mobility.cpp)
9088

9189
# Ensure the Python module name has no 'lib' prefix on Unix systems
9290
set_target_properties(dsf_python_module PROPERTIES

Doxyfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -943,7 +943,7 @@ WARN_LOGFILE =
943943
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
944944
# Note: If this tag is empty the current directory is searched.
945945

946-
INPUT = ./src/dsf/headers \
946+
INPUT = ./src/dsf \
947947
./src/dsf/python
948948

949949
# This tag can be used to specify the character encoding of the source files

benchmark/Dynamics/BenchDynamics.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
#include <cstdint>
22

3-
#include "RoadNetwork.hpp"
4-
#include "Itinerary.hpp"
5-
#include "FirstOrderDynamics.hpp"
3+
#include "mobility/RoadNetwork.hpp"
4+
#include "mobility/Itinerary.hpp"
5+
#include "mobility/FirstOrderDynamics.hpp"
66
#include "Bench.hpp"
77

88
#include <spdlog/spdlog.h>
99

10-
using RoadNetwork = dsf::RoadNetwork;
11-
using Itinerary = dsf::Itinerary;
12-
using Dynamics = dsf::FirstOrderDynamics;
10+
using RoadNetwork = dsf::mobility::RoadNetwork;
11+
using Itinerary = dsf::mobility::Itinerary;
12+
using Dynamics = dsf::mobility::FirstOrderDynamics;
1313

1414
using Bench = sb::Bench<long long int>;
1515

benchmark/Dynamics/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ if(NOT rapidcsv_POPULATED)
2626
FetchContent_MakeAvailable(rapidcsv)
2727
endif()
2828

29-
include_directories(../../src/dsf/headers)
29+
include_directories(../../src/dsf)
3030
include_directories(../../src/dsf/utility/)
3131

32-
file(GLOB SOURCES "../../src/dsf/base/*.cpp src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp")
32+
file(GLOB SOURCES "../../src/dsf/base/*.cpp" "../../src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp")
33+
list(FILTER SOURCES EXCLUDE REGEX ".*binding.*\\.cpp$")
3334

3435
# Compile
3536
add_executable(bench_dynamics.out BenchDynamics.cpp ${SOURCES})

benchmark/Graph/BenchGraph.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
#include <utility>
66
#include "Bench.hpp"
77

8-
#include "RoadNetwork.hpp"
8+
#include "mobility/RoadNetwork.hpp"
99

10-
using RoadNetwork = dsf::RoadNetwork;
11-
using Intersection = dsf::Intersection;
12-
using Street = dsf::Street;
10+
using RoadNetwork = dsf::mobility::RoadNetwork;
11+
using Intersection = dsf::mobility::Intersection;
12+
using Street = dsf::mobility::Street;
1313
using SparseMatrix = dsf::SparseMatrix<bool>;
1414

1515
using Bench = sb::Bench<long long int>;

benchmark/Graph/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ string(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra -O3")
1313
# Set the folder for the executable
1414
set(EXECUTABLE_OUTPUT_PATH ../../)
1515

16-
include_directories(../../src/)
16+
include_directories(../../src/dsf)
1717
include_directories(../../src/dsf/utility/)
1818

19-
file(GLOB SOURCES "../../src/dsf/base/*.cpp src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp")
19+
file(GLOB SOURCES "../../src/dsf/base/*.cpp" "../../src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp")
20+
list(FILTER SOURCES EXCLUDE REGEX ".*binding.*\\.cpp$")
2021

2122
# Compile
2223
add_executable(bench_graph.out BenchGraph.cpp ${SOURCES})

benchmark/Street/BenchStreet.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
#include <random>
55
#include "Bench.hpp"
66

7-
#include "RoadNetwork.hpp"
7+
#include "mobility/RoadNetwork.hpp"
88

9-
using Agent = dsf::Agent;
10-
using Street = dsf::Street;
9+
using Agent = dsf::mobility::Agent;
10+
using Street = dsf::mobility::Street;
1111
using SparseMatrix = dsf::SparseMatrix<bool>;
1212

1313
using Bench = sb::Bench<long long int>;

benchmark/Street/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,11 @@ string(APPEND CMAKE_CXX_FLAGS "-Wall -Wextra -O3")
1313
# Set the folder for the executable
1414
set(EXECUTABLE_OUTPUT_PATH ../../)
1515

16-
include_directories(../../src/dsf/headers)
16+
include_directories(../../src/dsf)
1717
include_directories(../../src/dsf/utility/)
1818

19-
file(GLOB SOURCES "../../src/dsf/base/*.cpp src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp")
19+
file(GLOB SOURCES "../../src/dsf/base/*.cpp" "../../src/dsf/mobility/*.cpp" "../../src/dsf/utility/*.cpp" "../../src/dsf/geometry/*.cpp")
20+
list(FILTER SOURCES EXCLUDE REGEX ".*binding.*\\.cpp$")
2021

2122
# Compile
2223
add_executable(bench_street.out BenchStreet.cpp ${SOURCES})

examples/slow_charge_rb.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ std::atomic<bool> bExitFlag{false};
3131
#define PRINT_OUT_SPIRES
3232
// #define PRINT_SPEEDS
3333

34-
using RoadNetwork = dsf::RoadNetwork;
35-
using Dynamics = dsf::FirstOrderDynamics;
36-
using Street = dsf::Street;
37-
using SpireStreet = dsf::SpireStreet;
38-
using Roundabout = dsf::Roundabout;
34+
using RoadNetwork = dsf::mobility::RoadNetwork;
35+
using Dynamics = dsf::mobility::FirstOrderDynamics;
36+
using Street = dsf::mobility::Street;
37+
using SpireStreet = dsf::mobility::SpireStreet;
38+
using Roundabout = dsf::mobility::Roundabout;
3939

4040
void printLoadingBar(int const i, int const n) {
4141
std::cout << "Loading: " << std::setprecision(2) << std::fixed << (i * 100. / n) << "%"

examples/slow_charge_tl.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ std::atomic<bool> bExitFlag{false};
3232
// #define PRINT_SPEEDS
3333
// #define PRINT_TP
3434

35-
using RoadNetwork = dsf::RoadNetwork;
36-
using Dynamics = dsf::FirstOrderDynamics;
37-
using Street = dsf::Street;
38-
using SpireStreet = dsf::SpireStreet;
39-
using TrafficLight = dsf::TrafficLight;
35+
using RoadNetwork = dsf::mobility::RoadNetwork;
36+
using Dynamics = dsf::mobility::FirstOrderDynamics;
37+
using Street = dsf::mobility::Street;
38+
using SpireStreet = dsf::mobility::SpireStreet;
39+
using TrafficLight = dsf::mobility::TrafficLight;
4040

4141
void printLoadingBar(int const i, int const n) {
4242
std::cout << "Loading: " << std::setprecision(2) << std::fixed << (i * 100. / n) << "%"

0 commit comments

Comments
 (0)