diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml
index b04488f1..1182d0c1 100644
--- a/.github/workflows/cmake-multi-platform.yml
+++ b/.github/workflows/cmake-multi-platform.yml
@@ -292,7 +292,7 @@ jobs:
message(FATAL_ERROR "Building documentation failed")
endif()
- # See https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-deploy-to-external-repository-external_repository
+ # See https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-deploy-to-external-repository-external_repository
# for more information on the parameters.
- name: Publish Documentation to Github Pages
uses: peaceiris/actions-gh-pages@v3
diff --git a/.github/workflows/synopsys-security-scan.yml b/.github/workflows/synopsys-security-scan.yml
index 03c644ef..7acf1b0b 100644
--- a/.github/workflows/synopsys-security-scan.yml
+++ b/.github/workflows/synopsys-security-scan.yml
@@ -99,8 +99,8 @@ jobs:
cmake -B ${{ steps.strings.outputs.build-output-dir }}
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_C_COMPILER=gcc
- -DEGOA_BUILD_TYPE=Release
- -DCMAKE_BUILD_TYPE=Release
+ -DEGOA_BUILD_TYPE=Release
+ -DCMAKE_BUILD_TYPE=Release
-DBoost_NO_SYSTEM_PATHS=TRUE
-DEGOA_DOWNLOAD_CPPAD=OFF
-DEGOA_DOWNLOAD_EIGEN=OFF
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 1521fe45..d4fb0576 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -14,7 +14,7 @@ repos:
- id: no-commit-to-branch
args: [--branch, staging, --branch, main]
- id: pretty-format-json
- args: [--autofix, --indent, 4]
+ args: [--autofix] # , --indent, 4
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/psf/black
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e51b973..7e575024 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,13 +1,13 @@
# CMakeLists.txt
-#
+#
# Created on: 30.01.2019
# Author: Franziska Wegner
-#
+#
# Main cmake configuration file.
-#
+#
-cmake_minimum_required ( VERSION 3.13.1 )
-# Required for CMAKE_MSVC_RUNTIME_LIBRARY
+cmake_minimum_required ( VERSION 3.13.1 )
+# Required for CMAKE_MSVC_RUNTIME_LIBRARY
# https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html#variable:CMAKE_MSVC_RUNTIME_LIBRARY
cmake_policy(SET CMP0091 NEW)
@@ -85,7 +85,7 @@ set(CMAKE_CXX_OUTPUT_EXTENSION_REPLACE 1)
####################################################################
# Find external libraries ##########################################
-####################################################################
+####################################################################
# Initial Configuration
include ( SetEnvironmentVariables )
@@ -147,12 +147,12 @@ if ( EGOA_ENABLE_TESTS )
# find_package ( GoogleTestFramework )
# endif ()
- # Add test coverage
+ # Add test coverage
# -coverage includes -fprofile-arcs -ftest-coverage while compiling and
# -lgcov while linking -coverage
- #
+ #
# brew install lcov || gcovr (https://gcovr.com/en/stable/)
- #
+ #
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${EGOA_COVERAGE_COMPILE_FLAGS}")
# set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${EGOA_COVERAGE_LINK_FLAGS}")
endif(EGOA_ENABLE_TESTS)
@@ -176,7 +176,7 @@ elseif ( COIN_FOUND )
include_directories(SYSTEM ${COIN_INCLUDE_DIRS} ${GUROBI_INCLUDE_DIRS} ${CPLEX_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include)
link_directories(${COIN_LIBRARY_DIR})
-else()
+else()
message( STATUS "Neither OGDF nor COIN include directory and library are added to the project.")
include_directories(SYSTEM ${GUROBI_INCLUDE_DIRS} ${CPLEX_INCLUDE_DIRS})
include_directories(${PROJECT_SOURCE_DIR}/include ${CMAKE_CURRENT_BINARY_DIR}/include)
@@ -184,9 +184,9 @@ endif()
####################################################################
# Add files, libraries and sources #################################
-####################################################################
+####################################################################
file ( GLOB_RECURSE HEADERS ${PROJECT_INCLUDE_DIR} include/*.hpp )
-file ( GLOB_RECURSE SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp )
+file ( GLOB_RECURSE SOURCES ${PROJECT_SOURCE_DIR}/src/*.cpp )
file ( GLOB_RECURSE SOURCES_REMOVE ${PROJECT_SOURCE_DIR}/src/Runnables/*.cpp )
list ( FILTER SOURCES EXCLUDE REGEX ".*Runnables.*" )
@@ -201,7 +201,7 @@ add_subdirectory ( src )
####################################################################
# Testing ##########################################################
-####################################################################
+####################################################################
if ( EGOA_ENABLE_TESTS )
add_subdirectory ( tests )
enable_testing()
@@ -305,7 +305,7 @@ endif ( )
# Define a macro to get number of configured threads
target_compile_definitions ( EGOA PUBLIC EGOA_USER_DEFINED_THREAD_LIMIT=$ENV{OMP_NUM_THREADS} )
-#
+#
target_compile_definitions ( EGOA PUBLIC EGOA_ENABLE_STATISTIC_DTP )
target_compile_definitions ( EGOA PUBLIC EGOA_ENABLE_STATISTIC_BETWEENNESS_CENTRALITY )
diff --git a/DoxyfileConfig.in b/DoxyfileConfig.in
index e706574a..e44966f8 100644
--- a/DoxyfileConfig.in
+++ b/DoxyfileConfig.in
@@ -1661,7 +1661,7 @@ EXTRA_PACKAGES = {${PROJECT_INCLUDE_DIR}/documentation/includes/EGOA_Doc
# to HTML_HEADER.
# This tag requires that the tag GENERATE_LATEX is set to YES.
-LATEX_HEADER =
+LATEX_HEADER =
# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for the
# generated LaTeX document. The footer should contain everything after the last
diff --git a/README.md b/README.md
index b254168b..0b1dc16c 100644
--- a/README.md
+++ b/README.md
@@ -1,9 +1,9 @@
-[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![CMake on multiple platforms](https://github.com/franziska-wegner/egoa/actions/workflows/cmake-multi-platform.yml/badge.svg?branch=master)](https://github.com/franziska-wegner/egoa/actions/workflows/cmake-multi-platform.yml) [![CodeQL](https://github.com/franziska-wegner/egoa/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/franziska-wegner/egoa/actions/workflows/codeql.yml) [![codecov](https://codecov.io/gh/franziska-wegner/egoa/graph/badge.svg?token=OL0N2WXV4I)](https://codecov.io/gh/franziska-wegner/egoa) [![cpp-linter](https://github.com/franziska-wegner/egoa/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/franziska-wegner/egoa/actions/workflows/cpp-linter.yml)
+[![License: GPL v3](https://img.shields.io/badge/License-GPL%20v3-blue.svg)](http://www.gnu.org/licenses/gpl-3.0) [![CMake on multiple platforms](https://github.com/franziska-wegner/egoa/actions/workflows/cmake-multi-platform.yml/badge.svg?branch=master)](https://github.com/franziska-wegner/egoa/actions/workflows/cmake-multi-platform.yml) [![CodeQL](https://github.com/franziska-wegner/egoa/actions/workflows/codeql.yml/badge.svg?branch=master)](https://github.com/franziska-wegner/egoa/actions/workflows/codeql.yml) [![codecov](https://codecov.io/gh/franziska-wegner/egoa/graph/badge.svg?token=OL0N2WXV4I)](https://codecov.io/gh/franziska-wegner/egoa) [![cpp-linter](https://github.com/franziska-wegner/egoa/actions/workflows/cpp-linter.yml/badge.svg)](https://github.com/franziska-wegner/egoa/actions/workflows/cpp-linter.yml) [![pre-commit.ci status](https://results.pre-commit.ci/badge/github/franziska-wegner/egoa/main.svg)](https://results.pre-commit.ci/latest/github/franziska-wegner/egoa/main)
EGOA - Energy Grid Optimization and Analysis
-Energy Grid Optimization and Analysis (EGOA) is a framework for energy grid analysis and planning. This framework is based on the PhD thesis "Combinatorial Problems in Energy Networks -- Graph Theoretic Models and Algorithms". The Git repository of the PhD thesis is available under Combinatorial_Problems_in_Energy_Networks.
+Energy Grid Optimization and Analysis (EGOA) is a framework for energy grid analysis and planning. This framework is based on the PhD thesis "Combinatorial Problems in Energy Networks -- Graph Theoretic Models and Algorithms". The Git repository of the PhD thesis is available under Combinatorial_Problems_in_Energy_Networks.
@@ -57,7 +57,7 @@ At the moment this is limited to PyPSA, the IEEE cases, and the windfarm cases;
```
IEEE
+ 00-Matpower-Data
-(+) 02-gml
+(+) 02-gml
+ 03-IEEE-Power_Flow_Test_Cases
+ 04-IEEE-Dynamic_Test_Cases
+ 05-IEEE-Reliability_Test_Systems-RTS
@@ -167,13 +167,13 @@ The Qt project can be installed on a Mac using
brew install qt
```
-and on Ubuntu using
+and on Ubuntu using
```
sudo apt-get install qt
```
-The compiler clang and gcc can be installed on a Mac using the following command or you use the Apple clang compiler if necessary.
+The compiler clang and gcc can be installed on a Mac using the following command or you use the Apple clang compiler if necessary.
```
brew install llvm
@@ -191,7 +191,7 @@ If the tests are enabled `"EGOA_TEST_FRAMEWORK": "OfflineGoogleTestFramework"` t
CMake Parameter Overrides
The repository provides an intial set of parameters in the sublimetext project file that can be found under `egoa.sublime-project`. In addition, there are scripts that support with server and local runs that have a initial CMake parameter configuration and can be adapted to the particular needs under [egoa/scripts/Build](https://github.com/franziska-wegner/egoa/tree/master/scripts/Build) and monitoring scripts under [egoa/scripts/Experiments](https://github.com/franziska-wegner/egoa/tree/master/scripts/Experiments).
-An essential CMake setting parameter is the build directory that should be changed according to your file system, e.g., `"build_folder": "/Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug"`.
+An essential CMake setting parameter is the build directory that should be changed according to your file system, e.g., `"build_folder": "/Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug"`.
Example CMake Configuration for SublimeText
@@ -249,63 +249,63 @@ An essential CMake setting parameter is the build directory that should be chang
Most parameters represent flags and can be enabled with `ON` if available and `OFF` if not available. Dependent on the flag the required path to the framework or tool has to be set accordingly (see above). There are flags that enable downloads for data sets and frameworks, and start with `EGOA_DOWNLOAD_`. The recommendation is to start with a minimum of enabled tools and extend if necessary.
-This framework provides a set of unittests that uses the Google Test Framework as base. The CMake files allow two different setups of the test framework that are known by online and offline configuration. The CMake parameter for the online version are `"EGOA_TEST_FRAMEWORK": "OnlineGoogleTestFramework"` OR `"EGOA_TEST_FRAMEWORK": "OfflineGoogleTestFramework"` with the pointer to the installation directory of the Google test framework repository, e.g., `"EGOA_TEST_FRAMEWORK_LOCATION": "external/GoogleTestFramework"`.
+This framework provides a set of unittests that uses the Google Test Framework as base. The CMake files allow two different setups of the test framework that are known by online and offline configuration. The CMake parameter for the online version are `"EGOA_TEST_FRAMEWORK": "OnlineGoogleTestFramework"` OR `"EGOA_TEST_FRAMEWORK": "OfflineGoogleTestFramework"` with the pointer to the installation directory of the Google test framework repository, e.g., `"EGOA_TEST_FRAMEWORK_LOCATION": "external/GoogleTestFramework"`.
Successful Initial CMake Run
```
---
+--
-- /Users/fwegner/Documents/Repositories/Public/EGOA/egoa
---
+--
-- /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug
-- Set OpenMP variables
-- OMP_WAIT_POLICY: ACTIVE
--- OMP_STACKSIZE:
--- OMP_SCHEDULE:
+-- OMP_STACKSIZE:
+-- OMP_SCHEDULE:
-- OMP_PROC_BIND: TRUE
-- OMP_THREAD_LIMIT: 0
-- Number of processors: 8
-- OMP_NUM_THREADS: 8
---
--- Compiler extra flags: -pedantic -Werror -Wall -Wextra -Wunused-result -Wno-error=unused-but-set-variable -Wno-error=conversion -Wshadow -Wno-error=zero-length-array
---
+--
+-- Compiler extra flags: -pedantic -Werror -Wall -Wextra -Wunused-result -Wno-error=unused-but-set-variable -Wno-error=conversion -Wshadow -Wno-error=zero-length-array
+--
-- Download of data sets:
-- Download PyPSA Europe data from https://github.com/PyPSA/pypsa-eur.git into /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/data/PowerGrids/PyPSA/pypsa-eur.
-- Download PyPSA ITI Collaboration data from https://git.scc.kit.edu/FN/iti-collaboration.git into /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/data/PowerGrids/PyPSA/pypsa-iti-collaboration.
-- Download IEEE Power Grid data.
---
+--
-- Looking for Qt6
--- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
--- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
--- Found Qt6 Core module in "/opt/homebrew/lib/QtCore.framework/Versions/A/QtCore"
--- Found Qt6 Quick module in "/opt/homebrew/lib/QtQuick.framework/Versions/A/QtQuick"
--- Found Qt6 Widgets module in "/opt/homebrew/lib/QtWidgets.framework/Versions/A/QtWidgets"
--- Found Qt6 Concurrent module in "/opt/homebrew/lib/QtConcurrent.framework/Versions/A/QtConcurrent"
+-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
+-- Could NOT find WrapVulkanHeaders (missing: Vulkan_INCLUDE_DIR)
+-- Found Qt6 Core module in "/opt/homebrew/lib/QtCore.framework/Versions/A/QtCore"
+-- Found Qt6 Quick module in "/opt/homebrew/lib/QtQuick.framework/Versions/A/QtQuick"
+-- Found Qt6 Widgets module in "/opt/homebrew/lib/QtWidgets.framework/Versions/A/QtWidgets"
+-- Found Qt6 Concurrent module in "/opt/homebrew/lib/QtConcurrent.framework/Versions/A/QtConcurrent"
SRC=/Users/fwegner/Documents/Repositories/Public/EGOA/egoa and Binary=/Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug
-- Doxygen: /opt/homebrew/bin/doxygen
-- Google Test Framework
-- EGOA_ENABLE_TESTS: ON
---
+--
-- Neither OGDF nor COIN include directory and library are added to the project.
---
+--
-- Compiler:
-- CMAKE_C_COMPILER: /opt/homebrew/opt/llvm/bin/clang
-- CMAKE_CXX_COMPILER: /opt/homebrew/opt/llvm/bin/clang++
-- make VERBOSE = 1? : TRUE
---
+--
-- Other important targets:
-- qt6: add libraries of QT6
-- doc: build doxygen documentation
-- EGOA Exceptions: ON
-- EGOA Assertions: ON
---
+--
-- Build type is set to: Debug
-- Build files have been written to: /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug
-- Runtime output directory: /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug/bin
-- Archive output directory: /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug/lib
-- Library output directory: /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug/lib
---
+--
-- Configuring done (3.2s)
-- Generating done (0.1s)
-- Build files have been written to: /Users/fwegner/Documents/Repositories/Public/EGOA/egoa/build-debug
@@ -319,7 +319,7 @@ A general recommendation is CLION and Sublimetext. However, Visual Studio and ot
Documentation
-The repository's public code documentation is available under [Code Documentation by Doxygen](https://franziska-wegner.github.io/egoa). For the purpose of code documentation, the Doxygen framework is used. It provides a simple and well formed way of code documentation for C++. Run
+The repository's public code documentation is available under [Code Documentation by Doxygen](https://franziska-wegner.github.io/egoa). For the purpose of code documentation, the Doxygen framework is used. It provides a simple and well formed way of code documentation for C++. Run
make doc
diff --git a/cmake/Boost.cmake b/cmake/Boost.cmake
index 1a8d9d42..e9a5f874 100644
--- a/cmake/Boost.cmake
+++ b/cmake/Boost.cmake
@@ -1,10 +1,10 @@
# Boost.cmake
-#
+#
# Created on: Nov 04, 2019
# Author: Franziska Wegner
-#
+#
# Find the Boost library.
-#
+#
####################################################################
# Reset variables ##################################################
@@ -21,7 +21,7 @@ set( Boost_DIRECTORIES "/usr/local/Cellar/boost/1.71.0/" CACHE STRING
set( Boost_LIBRARY_DIRS "" )
set( Boost_INCLUDE_DIRS "" )
set( BOOST_ROOT "" CACHE PATH "Boost library path" )
-# https://stackoverflow.com/questions/58081084/target-boostlibrary-already-has-an-imported-location-link-errors
+# https://stackoverflow.com/questions/58081084/target-boostlibrary-already-has-an-imported-location-link-errors
# https://stackoverflow.com/questions/3016448/how-can-i-get-cmake-to-find-my-alternative-boost-installation/51904185
set( Boost_NO_SYSTEM_PATHS on CACHE BOOL "Do not search system for Boost" )
set( Boost_NO_BOOST_CMAKE on CACHE INTERNAL "" )
@@ -38,4 +38,4 @@ include_directories(${Boost_INCLUDE_DIRS})
# Output ###########################################################
####################################################################
message(STATUS "${MY_SPACE}Boost_LIBRARY_DIRS:\t\t\t${Boost_LIBRARY_DIRS}")
-message(STATUS "${MY_SPACE}Boost_INCLUDE_DIRS:\t\t\t${Boost_INCLUDE_DIRS}")
\ No newline at end of file
+message(STATUS "${MY_SPACE}Boost_INCLUDE_DIRS:\t\t\t${Boost_INCLUDE_DIRS}")
diff --git a/cmake/CompilerConfiguration.cmake b/cmake/CompilerConfiguration.cmake
index f063434d..915a3e8e 100644
--- a/cmake/CompilerConfiguration.cmake
+++ b/cmake/CompilerConfiguration.cmake
@@ -6,13 +6,13 @@
# Compiler specific configurations.
#
-# -ggdb Produce debugging information for use by GDB. This means
-# to use the most expressive format available (DWARF, stabs, or
-# the native format if neither of those are supported), including
+# -ggdb Produce debugging information for use by GDB. This means
+# to use the most expressive format available (DWARF, stabs, or
+# the native format if neither of those are supported), including
# GDB extensions if at all possible.
-#
-# - Wall This enables all the warnings about constructions that
-# some users consider questionable, and that are easy to avoid
+#
+# - Wall This enables all the warnings about constructions that
+# some users consider questionable, and that are easy to avoid
# (or modify to prevent the warning), even in conjunction with macros
if (CMAKE_BUILD_TYPE MATCHES "Debug" AND CMAKE_CXX_COMPILER_ID MATCHES "GNU" AND CMAKE_SYSTEM_NAME MATCHES "Linux")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -coverage")
@@ -80,7 +80,7 @@ if(CMAKE_BUILD_TYPE STREQUAL Debug)
else()
set(extra_flags "${extra_flags} ${EGOA_WARNING_FLAGS_RELEASE}")
endif()
-# Warning and error
+# Warning and error
if(EGOA_WARNINGS_AS_ERRORS)
set(extra_flags "${EGOA_WARNINGS_AS_ERRORS_FLAG} ${extra_flags}")
endif()
@@ -92,6 +92,6 @@ if(EGOA_PEDANTIC_MODE)
set(extra_flags "${EGOA_PEDANTIC_WARNING_FLAG} ${extra_flags}")
endif()
endif()
-#
+#
set_property(TARGET ${TARGET_NAME} APPEND_STRING PROPERTY COMPILE_FLAGS " ${extra_flags} ")
message(STATUS "${MY_SPACE}Compiler extra flags:\t\t\t${TARGET_NAME} ${extra_flags}")
diff --git a/cmake/CppAD.cmake b/cmake/CppAD.cmake
index 67dd3127..d8cf0a38 100644
--- a/cmake/CppAD.cmake
+++ b/cmake/CppAD.cmake
@@ -1,12 +1,12 @@
# FindCppAD.cmake
-#
+#
# Created on: Jan 26, 2020
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_CPPAD is ON the script searches for CppAD in given and
# standard location (see EGOA_DOWNLOAD_CPPAD). If found it adds the library to
# the project.
-#
+#
# Environment variable CPPAD_ROOT_DIR of CPPAD should be set, e.g.,
# /usr/local/include or /external/CppAD/include
@@ -28,7 +28,7 @@ unset ( CPPAD_INCLUDE_DIR CACHE )
# CppAD include directory ##########################################
####################################################################
find_path ( CPPAD_INCLUDE_DIR
- NAMES cppad/cppad.hpp
+ NAMES cppad/cppad.hpp
HINTS /external/CppAD/include
${CPPAD_ROOT_DIR}/include/
)
@@ -53,7 +53,7 @@ mark_as_advanced ( CPPAD_INCLUDE_DIR )
####################################################################
message ( STATUS "" )
if ( EGOA_ENABLE_CPPAD AND NOT CPPAD_FOUND )
- message( FATAL_ERROR
+ message( FATAL_ERROR
"CppAD is enabled, but not available on the system. Please, check the \
CppAD installation, and cmake configuration or disable CppAD by \
setting EGOA_ENABLE_CPPAD to OFF." )
diff --git a/cmake/Doxygen.cmake b/cmake/Doxygen.cmake
index d8719056..e58b1198 100644
--- a/cmake/Doxygen.cmake
+++ b/cmake/Doxygen.cmake
@@ -1,12 +1,12 @@
# Doxygen.cmake
-#
+#
# Created on: 30.01.2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_DOCUMENTATION is ON the script add target to generate API
# documentation with Doxygen. The documentation can then be generated by the
# command "make doc".
-#
+#
####################################################################
# Find Doxygen #####################################################
@@ -21,7 +21,7 @@ if(EGOA_ENABLE_DOCUMENTATION)
set(doxyfile ${CMAKE_CURRENT_SOURCE_DIR}/documentation/Doxyfile)
configure_file(${doxyfile_in} ${doxyfile} @ONLY)
- add_custom_target(doc ALL
+ add_custom_target(doc ALL
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile_in}
WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}"
COMMENT "Generating API documentation with Doxygen"
diff --git a/cmake/ExternalProjectConfiguration.cmake b/cmake/ExternalProjectConfiguration.cmake
index e6e3a9cc..613b1167 100644
--- a/cmake/ExternalProjectConfiguration.cmake
+++ b/cmake/ExternalProjectConfiguration.cmake
@@ -1,10 +1,10 @@
# ExternalProjectConfiguration.cmake
-#
+#
# Created on: Jan 10, 2020
# Author: Franziska Wegner
-#
+#
# Download external project if necessary.
-#
+#
include ( ExternalProject )
include ( FetchContent )
@@ -16,7 +16,7 @@ message( STATUS "Download of data sets:")
####################################################################
# CppAD ############################################################
####################################################################
-#
+#
# Website: https://github.com/coin-or/CppAD.git
# and https://coin-or.github.io/CppAD/doc/cppad.htm
####################################################################
@@ -24,7 +24,7 @@ message( STATUS "Download of data sets:")
if ( EGOA_DOWNLOAD_CPPAD )
message( STATUS "${MY_SPACE}Download CppAD from https://github.com/coin-or/CppAD into ${PROJECT_INCLUDE_DIR}/external/CppAD.")
file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/external/CppAD" )
-
+
ExternalProject_Add ( CppAD
GIT_REPOSITORY https://github.com/coin-or/CppAD
SOURCE_DIR "${PROJECT_INCLUDE_DIR}/external/CppAD"
@@ -36,7 +36,7 @@ endif ( EGOA_DOWNLOAD_CPPAD )
####################################################################
# Eigen ############################################################
####################################################################
-#
+#
# Website: https://gitlab.com/libeigen/eigen.git
# and http://eigen.tuxfamily.org/index.php
####################################################################
@@ -67,14 +67,14 @@ endif ( EGOA_DOWNLOAD_EIGEN )
####################################################################
# Google Test Framework ############################################
####################################################################
-#
+#
# Website: https://github.com/google/googletest
####################################################################
if ( EGOA_DOWNLOAD_GOOGLE_TEST_FRAMEWORK )
message( STATUS "${MY_SPACE}Download Google-Testing Framework from https://github.com/google/googletest.git into ${PROJECT_INCLUDE_DIR}/external/GoogleTestFramework.")
file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/external/GoogleTestFramework" )
-
+
ExternalProject_Add ( GoogleTestFramework
GIT_REPOSITORY https://github.com/google/googletest.git
SOURCE_DIR "${PROJECT_INCLUDE_DIR}/external/GoogleTestFramework"
@@ -86,11 +86,11 @@ endif ( EGOA_DOWNLOAD_GOOGLE_TEST_FRAMEWORK )
####################################################################
# PyPSA Europe #####################################################
####################################################################
-# Publication:
-#
-# PyPSA-Eur: An Open Optimisation Model of the European Transmission
+# Publication:
+#
+# PyPSA-Eur: An Open Optimisation Model of the European Transmission
# System
-#
+#
# 2018
# Website: https://doi.org/10.5281/zenodo.3520875
# and https://github.com/PyPSA/pypsa-eur
@@ -119,11 +119,11 @@ endif ( EGOA_DOWNLOAD_PYPSA_EUR )
####################################################################
# PyPSA ITI Collaboration ##########################################
####################################################################
-# Publication:
-#
-# PyPSA-Eur: An Open Optimisation Model of the European Transmission
+# Publication:
+#
+# PyPSA-Eur: An Open Optimisation Model of the European Transmission
# System
-#
+#
# 2018
# Website: https://doi.org/10.5281/zenodo.3520875
# and https://git.scc.kit.edu/FN/iti-collaboration
@@ -151,11 +151,11 @@ endif ( EGOA_DOWNLOAD_PYPSA_ITI_COLLABORATION )
####################################################################
# SciGRID Power v0.1 ###############################################
####################################################################
-# Publication:
-#
-# SciGRID - An Open Source Reference Model for the European
+# Publication:
+#
+# SciGRID - An Open Source Reference Model for the European
# Transmission Network (v0.2)
-#
+#
# 2016
# Website: http://www.scigrid.de
####################################################################
@@ -166,8 +166,8 @@ if ( EGOA_DOWNLOAD_SCIGRID AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/sc
message( STATUS "${MY_SPACE}Download SciGRID Power data (version 0.1) from \"https://www.power.scigrid.de/releases_archive/scigrid-0.1-data-only.zip\" into \"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-0.1-data-only/\".")
file ( MAKE_DIRECTORY "${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-0.1-data-only" )
- file ( DOWNLOAD
- https://www.power.scigrid.de/releases_archive/scigrid-0.1-data-only.zip
+ file ( DOWNLOAD
+ https://www.power.scigrid.de/releases_archive/scigrid-0.1-data-only.zip
"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-0.1-data-only.zip"
# URL_HASH SHA512=56c8246eca1142dc9d9487ef1d1bd690af91c0e3716a56adc25c4a218bceb1be7f84cf5361acbaae354fe23cf44be6f479ae3d6026abd7dcb131b89ca5779f26
# SHOW_PROGRESS
@@ -184,11 +184,11 @@ endif ()
####################################################################
# SciGRID Power v0.2 ###############################################
####################################################################
-# Publication:
-#
-# SciGRID - An Open Source Reference Model for the European
+# Publication:
+#
+# SciGRID - An Open Source Reference Model for the European
# Transmission Network (v0.2)
-#
+#
# 2016
# Website: http://www.scigrid.de
####################################################################
@@ -196,7 +196,7 @@ endif ()
if ( EGOA_DOWNLOAD_SCIGRID AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-0.2-data-only" )
message( STATUS "${MY_SPACE}Download SciGRID Power data (version 0.2) from \"https://www.power.scigrid.de/releases_archive/scigrid-0.2-data-only.zip\" into \"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-0.2-data-only/\".")
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.power.scigrid.de/releases_archive/scigrid-0.2-data-only.zip
"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-0.2-data-only.zip"
# URL_HASH SHA512=0f6473487cc224e86d73d764b2b9ad5b34fae3c7b9a2a8f3be70846631429f14ddde10fb0a06672955e2725794c1c32fe5fc5fc356219d371ab462ca98bc1d7c
@@ -214,11 +214,11 @@ endif ()
####################################################################
# SciGRID Power Germany ############################################
####################################################################
-# Publication:
-#
-# SciGRID - An Open Source Reference Model for the European
+# Publication:
+#
+# SciGRID - An Open Source Reference Model for the European
# Transmission Network (v0.2)
-#
+#
# 2016
# Website: http://www.scigrid.de
####################################################################
@@ -226,7 +226,7 @@ endif ()
if ( EGOA_DOWNLOAD_SCIGRID AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-conference-de-data-only" )
message( STATUS "${MY_SPACE}Download SciGRID Power data (conference version) from \"https://www.power.scigrid.de/releases_archive/scigrid-conference-de-data-only.zip\" into \"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-conference-de-data-only/\".")
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.power.scigrid.de/releases_archive/scigrid-conference-de-data-only.zip
"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-conference-de-data-only.zip"
# URL_HASH SHA512=a03a69d9f30fca08a7945e9d9acbf4e0da18b639df351024f11df1c4b2d57a15bbc8eb4419b20b97a9741c9641a0aa24c8a3c7b45816380787185e58771ca77f
@@ -244,11 +244,11 @@ endif ()
####################################################################
# SciGRID Power Europe #############################################
####################################################################
-# Publication:
-#
-# SciGRID - An Open Source Reference Model for the European
+# Publication:
+#
+# SciGRID - An Open Source Reference Model for the European
# Transmission Network (v0.2)
-#
+#
# 2016
# Website: http://www.scigrid.de
####################################################################
@@ -256,7 +256,7 @@ endif ()
if ( EGOA_DOWNLOAD_SCIGRID AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-conference-eu-data-only" )
message( STATUS "${MY_SPACE}Download SciGRID Power data (conference version) from \"https://www.power.scigrid.de/releases_archive/scigrid-conference-eu-data-only.zip\" into \"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-conference-eu-data-only/\".")
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.power.scigrid.de/releases_archive/scigrid-conference-eu-data-only.zip
"${EGOA_DOWNLOAD_DIRECTORY_SCIGRID}/scigrid-conference-eu-data-only.zip"
# URL_HASH SHA512=b8590cf9c2cea1ef3a096d041a5918a8e9f919236aba898e205ba732dbbab7b0b388bfd521399cfa2460123e16f3b0c1528db5dc8d0da82c097b9f096001f697
@@ -274,9 +274,9 @@ endif ()
####################################################################
# IEEE Benchmark Cases #############################################
####################################################################
-# Publication:
-#
-# Website:
+# Publication:
+#
+# Website:
# * https://github.com/MATPOWER/matpower/archive/master.zip
# * https://labs.ece.uw.edu/pstca
# * https://www.maths.ed.ac.uk/optenergy
@@ -284,7 +284,7 @@ endif ()
if ( EGOA_DOWNLOAD_IEEE AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_IEEE}/IEEE" )
message( STATUS "${MY_SPACE}Download IEEE Power Grid data.")
-
+
# file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/00-Matpower-Data" )
# file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/01-Pypower-Data" )
file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/02-gml" )
@@ -303,10 +303,10 @@ if ( EGOA_DOWNLOAD_IEEE AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_IEEE}/IEEE" )
file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/15-Synthetic_Power_Grid_Test_Cases" )
file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/16-Literature_Based_Power_Flow_Test_Cases" )
file ( MAKE_DIRECTORY "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/17-Small_Signal_Stability_Test_Cases" )
-
+
# Matlab ###################################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/00-Matpower-Data" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://github.com/MATPOWER/matpower/archive/master.zip
"${PROJECT_INCLUDE_DIR}/external/Matpower-Master.zip"
)
@@ -320,10 +320,10 @@ if ( EGOA_DOWNLOAD_IEEE AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_IEEE}/IEEE" )
)
file ( REMOVE ${PROJECT_INCLUDE_DIR}/external/Matpower-Master.zip )
endif ()
-
+
# PyPower ##################################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/01-Pypower-Data" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://github.com/rwl/PYPOWER/archive/master.zip
"${PROJECT_INCLUDE_DIR}/external/Pypower-Master.zip"
)
@@ -343,569 +343,569 @@ if ( EGOA_DOWNLOAD_IEEE AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_IEEE}/IEEE" )
COMMAND bash -c "rm \"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/01-Pypower-Data/savecase.py\""
WORKING_DIRECTORY ${PROJECT_INCLUDE_DIR}/external/matpower-master/data/
)
-
- file ( REMOVE ${PROJECT_INCLUDE_DIR}/external/PYPOWER-master )
- file ( REMOVE ${PROJECT_INCLUDE_DIR}/external/Pypower-Master.zip )
+
+ file ( REMOVE ${PROJECT_INCLUDE_DIR}/external/PYPOWER-master )
+ file ( REMOVE ${PROJECT_INCLUDE_DIR}/external/Pypower-Master.zip )
endif()
-
+
# 14 Bus System ############################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/014-Bus" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf14/ieee14cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/014-Bus/ieee14cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf14/pg_tca14fig.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/014-Bus/pg_tca14fig.htm"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf14/14bus600.tif
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/014-Bus/14bus600.tif"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/014-Bus/cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf14/pg_tca14bus.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/014-Bus/pg_tca14bus.webarchive"
)
endif ()
-
+
# 57 Bus System ############################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/057-Bus" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf57/ieee57cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/057-Bus/ieee57cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf57/pg_tca57fig.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/057-Bus/pg_tca57fig.htm"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf57/57bus600.tif
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/057-Bus/57bus600.tif"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/057-Bus/cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf57/pg_tca57bus.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/057-Bus/pg_tca57bus.webarchive"
)
endif ()
-
+
# 118 Bus System ###########################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf118/ieee118psp.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/ieee118psp.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf118/ieee118cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/ieee118cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf118/pg_tca118fig.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/pg_tca118fig.htm"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf118/118bus6.tif
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/118bus6.tif"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/psap.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/psap.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf118/pg_tca118bus.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/pg_tca118bus.webarchive"
)
endif ()
-
+
# 300 Bus System ###########################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf300/ieee300cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus/ieee300cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf300/ieee300pti.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus/ieee300pti.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf300/pg_tca300fig.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus/pg_tca300fig.htm"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf300/300bus6.tif
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus/300bus6.tif"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus/cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/pti.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/300-Bus/pti.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/pf300/pg_tca300bus.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/118-Bus/pg_tca300bus.webarchive"
)
endif ()
-
+
# 17 Generator Dynamic System ##############################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/17-Generator" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn17/dd17cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/17-Generator/dd17cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn17/dd17cldat.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/17-Generator/dd17cldat.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/Formats/cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/17-Generator/cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn17/pg_tcadd17.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/17-Generator/pg_tcadd17.webarchive"
)
endif ()
-
+
# 30 Bus Dynamic System ####################################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/30-Bus" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn30/dyn30dat.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/30-Bus/dyn30dat.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn30/pg_tcadyn30.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/03-IEEE-Power_Flow_Test_Cases/30-Bus/pg_tcadyn30.webarchive"
)
endif ()
-
+
# 50 Generator Dynamic System ##############################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/04-IEEE-Dynamic_Test_Cases/50-Generator" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn50/dd50cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/04-IEEE-Dynamic_Test_Cases/50-Generator/dd50cdf.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn50/dd50cldat.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/04-IEEE-Dynamic_Test_Cases/50-Generator/dd50cldat.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn50/dd50exdat.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/04-IEEE-Dynamic_Test_Cases/50-Generator/dd50exdat.txt"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/dyn50/pg_tcadd50.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/04-IEEE-Dynamic_Test_Cases/50-Generator/pg_tcadd50.txt"
)
endif ()
-
+
# Reliability Test System (RTS) - 1979 #####################
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1979-RTS" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts79/ieeerts79.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1979-RTS/ieeerts79.txt"
)
endif ()
# Reliability Test System (RTS) - 1996 #####################
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS" )
- #
- file ( DOWNLOAD
+ #
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/pg_tcarts.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/pg_tcarts.webarchive"
)
- #
+ #
# Bus Data
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-01.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Bus-Data/Table-01.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-01.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Bus-Data/Table-01.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-01.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Bus-Data/Table-01.txt"
)
- #
+ #
# Weekly Loads
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-02.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Weekly-Loads/Table-02.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-02.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Weekly-Loads/Table-02.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-02.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Weekly-Loads/Table-02.txt"
)
- #
+ #
# Daily Loads
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-03.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Weekly-Loads/Table-03.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-03.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Weekly-Loads/Table-03.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-03.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Weekly-Loads/Table-03.txt"
)
- #
+ #
# Hourly Loads
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-04.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Hourly-Loads/Table-04.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-04.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Hourly-Loads/Table-04.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-04.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Hourly-Loads/Table-04.txt"
)
- #
+ #
# Bus Loads
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-05.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Bus-Loads/Table-05.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-05.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Bus-Loads/Table-05.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-05.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Bus-Loads/Table-05.txt"
)
- #
+ #
# Generator reliability
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-06.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Reliability/Table-06.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-06.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Reliability/Table-06.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-06.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Reliability/Table-06.txt"
)
- #
+ #
# Generator parameters
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-07.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Reliability/Table-07.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-07.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Reliability/Table-07.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-07.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Reliability/Table-07.txt"
)
- #
+ #
# Generator startup heat input
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-08.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Startup-Heat-Input/Table-08.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-08.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Startup-Heat-Input/Table-08.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-08.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Startup-Heat-Input/Table-08.txt"
)
- #
+ #
# Generator heat rates
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-09.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Heat-Rates/Table-09.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-09.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Heat-Rates/Table-09.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-09.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Heat-Rates/Table-09.txt"
)
- #
+ #
# Generator cycling and ramp rates
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-10.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Cycling-And-Ramp-Rates/Table-10.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-10.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Cycling-And-Ramp-Rates/Table-10.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-10.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Cycling-And-Ramp-Rates/Table-10.txt"
)
- #
+ #
# Emissions
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-11.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Emissions/Table-11.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-11.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Emissions/Table-11.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-11.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Emissions/Table-11.txt"
)
- #
+ #
# Branch data
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-12.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Branch-Data/Table-12.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-12.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Branch-Data/Table-12.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-12.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Branch-Data/Table-12.txt"
)
- #
+ #
# DC line data
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-13.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/DC-Line-Data/Table-13.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-13.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/DC-Line-Data/Table-13.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-13.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/DC-Line-Data/Table-13.txt"
)
- #
+ #
# Breaker reliability data
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-14.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Breaker-Reliability-Data/Table-14.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-14.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Breaker-Reliability-Data/Table-14.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-14.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Breaker-Reliability-Data/Table-14.txt"
)
- #
+ #
# Generator dynamic data
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-15.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Dynamic-Data/Table-15.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-15.wpd
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Dynamic-Data/Table-15.wpd"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/rts/rts96/Table-15.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/05-IEEE-Reliability_Test_Systems-RTS/1996-RTS/Generator-Dynamic-Data/Table-15.txt"
)
endif ()
# Voltage Collapse Sensitivities ###########################
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/06-IEEE-Voltage_Collapse_Sensitivities" )
# 118 bus test case
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/sensitivity/sensreadme.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/06-IEEE-Voltage_Collapse_Sensitivities/sensreadme.txt"
)
# k factor values
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/sensitivity/sensk.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/06-IEEE-Voltage_Collapse_Sensitivities/sensk.txt"
)
endif ()
-
+
# Edinburgh Dynamic Test Cases - Case 39 ###################
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/39_Bus_Case" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/39buscase/case39_RCost.m
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/39_Bus_Case/case39_RCost.m"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/39buscase/case39.pdf
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/39_Bus_Case/case39.pdf"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/39buscase/
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/39_Bus_Case/case39.webarchive"
)
endif ()
-
+
# Edinburgh Dynamic Test Cases - Iceland ###################
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Iceland" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/iceland/iceland.m
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Iceland/iceland.m"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/iceland/iceland.pdf
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Iceland/iceland.pdf"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/iceland/
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Iceland/iceland.webarchive"
)
endif ()
# Edinburgh Dynamic Test Cases - Reduced GB Network ########
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Reduced_GB_Network" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/reducedGB/GBreducednetwork.m
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Reduced_GB_Network/GBreducednetwork.m"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/reducedGB/GBreducednetwork.pdf
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Reduced_GB_Network/GBreducednetwork.pdf"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/reducedGB/
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/Reduced_GB_Network/reducedGB.webarchive"
)
endif ()
-
+
# Edinburgh Dynamic Test Cases - GB Network ################
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/GB_Network" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/fullGB/GBnetwork.m
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/GB_Network/GBnetwork.m"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/fullGB/GB_graph.pdf
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/GB_Network/GB_graph.pdf"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/fullGB/
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/GB_Network/fullGB.webarchive"
)
- #
- file ( DOWNLOAD
+ #
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/introduction.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/introduction.webarchive"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/dataformat.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/dataformat.webarchive"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/howtouse.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/HowToUseThisArchive.webarchive"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/submission.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/08-Edinburgh_Power_Flow_Test_Cases/submission.webarchive"
)
endif ()
-
+
# Edinburgh Dynamic Test Cases - Dynamic Iceland ###########
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/Iceland" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/icelandDyn/d_iceland.m
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/Iceland/d_iceland.m"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/icelandDyn/iceland.pdf
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/Iceland/iceland.pdf"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/icelandDyn/
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/Iceland/icelandDyn.webarchive"
)
- #
- file ( DOWNLOAD
+ #
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/introduction.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/introduction.webarchive"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/dataformat.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/dataformat.webarchive"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/howtouse.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/HowToUseThisArchive.webarchive"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://www.maths.ed.ac.uk/optenergy/NetworkData/submission.html
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/09-Edinburgh_Dynamic_Test_Cases/submission.webarchive"
)
endif ()
# Data Formats #############################################
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/18-IEEE-Data_Formats" )
# IEEE Common Data Format
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/cdf.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/18-IEEE-Data_Formats/cdf.txt"
)
# PTI Power Flow Data Format
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/pti.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/18-IEEE-Data_Formats/pti.txt"
)
# PECO PSAP Format
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/formats/psap.txt
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/18-IEEE-Data_Formats/psap.txt"
)
endif ()
-
+
# Power System Application Data Dictionary - PSADD #########
- #
+ #
if ( NOT EXISTS "${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/19-Power_System_Application_Data_Dictionary" )
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/psadd/psadd.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/19-Power_System_Application_Data_Dictionary/psadd.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/psadd/readme.doc
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/19-Power_System_Application_Data_Dictionary/readme.doc"
)
- file ( DOWNLOAD
+ file ( DOWNLOAD
https://labs.ece.uw.edu/pstca/psadd/pg_tcapsadd.htm
"${PROJECT_INCLUDE_DIR}/data/PowerGrids/IEEE/19-Power_System_Application_Data_Dictionary/pg_tcapsadd.webarchive"
)
@@ -915,13 +915,13 @@ endif ()
####################################################################
# Generated Wind Farm Data from ITI 2017 ###########################
####################################################################
-# Publication:
-#
+# Publication:
+#
# A Simulated-Annealing-Based Approach for Wind Farm Cabling
-#
-# e-Energy '17: Proceedings of the Eighth International Conference
+#
+# e-Energy '17: Proceedings of the Eighth International Conference
# on Future Energy Systems
-# 2017, Pages 203–215
+# 2017, Pages 203–215
# Website: https://doi.org/10.1145/3077839.3077843
####################################################################
@@ -930,8 +930,8 @@ file ( MAKE_DIRECTORY "${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks" )
if ( EGOA_DOWNLOAD_WINDFARM AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks/2017-iti-windfarm-benchmarksets" )
message( STATUS "${MY_SPACE}Download generated wind farm data (ITI 2017) from \"https://i11www.iti.kit.edu/_media/projects/windfarmcabling/windfarm-benchmarksets.zip\" into \"${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks/2017-iti-windfarm-benchmarksets/\".")
-
- file ( DOWNLOAD
+
+ file ( DOWNLOAD
https://i11www.iti.kit.edu/_media/projects/windfarmcabling/windfarm-benchmarksets.zip
"${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks/windfarm-benchmarksets.zip"
# URL_HASH SHA512=52eff0790e78e2718e81e4ee2e0fc965180900d236e05822501019c8148a249529f7194e616c28394960a3086911af361165073cdf24195c7e5f1d603e463112
@@ -939,7 +939,7 @@ if ( EGOA_DOWNLOAD_WINDFARM AND NOT EXISTS "${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/
)
execute_process (
- COMMAND ${CMAKE_COMMAND} -E tar xzf ${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks/windfarm-benchmarksets.zip
+ COMMAND ${CMAKE_COMMAND} -E tar xzf ${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks/windfarm-benchmarksets.zip
WORKING_DIRECTORY ${EGOA_DOWNLOAD_DIRECTORY_WINDFARM}/Networks/
)
diff --git a/cmake/FindBonmin.cmake b/cmake/FindBonmin.cmake
index f756f7d7..4678544c 100644
--- a/cmake/FindBonmin.cmake
+++ b/cmake/FindBonmin.cmake
@@ -1,11 +1,11 @@
# FindBonmin.cmake
-#
+#
# Created on: 30.01.2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_BONMIN is ON the script searches for Bonmin in given
# and standard location. If found it adds the library to the project.
-#
+#
####################################################################
# Unset ############################################################
@@ -29,7 +29,7 @@ message(STATUS "${MY_SPACE}BONMIN_ROOT_DIR:\t\t\t" ${BONMIN_ROOT_DIR})
# Bonmin Include Directory #########################################
####################################################################
find_path(BONMIN_INCLUDE_DIR
- NAMES BonTMINLP.hpp
+ NAMES BonTMINLP.hpp
HINTS /usr/local/include/coin
${BONMIN_ROOT_DIR}/include/coin
${BONMIN_ROOT_DIR}/include
@@ -40,14 +40,14 @@ message(STATUS "${MY_SPACE}BONMIN_INCLUDE_DIR:\t\t\t" ${BONMIN_INCLUDE_DIR})
# Bonmin Library Directory #########################################
####################################################################
find_path(BONMIN_LIBRARY_DIR
- NAMES libbonmin.a
+ NAMES libbonmin.a
HINTS /usr/local/lib
${BONMIN_ROOT_DIR}/lib
)
message(STATUS "${MY_SPACE}BONMIN_LIBRARY_DIR:\t\t\t" ${BONMIN_LIBRARY_DIR})
if(APPLE)
- find_library(BONMIN_LIBRARY
+ find_library(BONMIN_LIBRARY
NAMES libbonmin.a #.dylib #libCbcSolver.a libCbc.a libCgl.a libOsiClp.a libClpSolver.a libClp.a libcoinasl.a libOsi.a libCoinUtils.a libcoinmumps.a
HINTS /usr/local/lib
${BONMIN_ROOT_DIR}/lib
@@ -56,7 +56,7 @@ if(APPLE)
set(MAC_BONMIN_COMPILER_FLAGS "-fno-common -no-cpp-precomp -fexceptions -arch x86_64 -m64 -DBONMIN_BUILD")
elseif(UNIX)
- find_library(BONMIN_LIBRARY
+ find_library(BONMIN_LIBRARY
NAMES libbonmin.a #.so #libCbcSolver.a libCbc.a libCgl.a libOsiClp.a libClpSolver.a libClp.a libcoinasl.a libOsi.a libCoinUtils.a libcoinmumps.a
HINTS /usr/local/lib
${BONMIN_ROOT_DIR}/lib
@@ -110,8 +110,8 @@ mark_as_advanced(BONMIN_LIBRARY BONMIN_INCLUDE_DIR)
message(STATUS "")
if(EGOA_ENABLE_BONMIN AND NOT BONMIN_FOUND)
- message( FATAL_ERROR
+ message( FATAL_ERROR
"Bonmin is enabled, but not available on the system. Please, check the \
Bonmin installation, and cmake configuration for BONMIN_ROOT_DIR or \
disable Bonmin by setting EGOA_ENABLE_BONMIN to OFF." )
-endif(EGOA_ENABLE_BONMIN AND NOT BONMIN_FOUND)
\ No newline at end of file
+endif(EGOA_ENABLE_BONMIN AND NOT BONMIN_FOUND)
diff --git a/cmake/FindClangTidy.cmake b/cmake/FindClangTidy.cmake
index 53f65fc3..57b60f90 100644
--- a/cmake/FindClangTidy.cmake
+++ b/cmake/FindClangTidy.cmake
@@ -1,14 +1,14 @@
# FindClangTidy.cmake
-#
+#
# Created on: Dec 27, 2023
# Author: Franziska Wegner
-#
+#
# This file enables clang tidy for the project.
-#
+#
# Search for clang-tidy
-find_program(CLANG_TIDY_PROG
+find_program(CLANG_TIDY_PROG
HINTS "/opt/homebrew/opt/llvm/bin/"
"/usr/local/opt/llvm/bin/"
NAMES "clang-tidy"
diff --git a/cmake/FindCplex.cmake b/cmake/FindCplex.cmake
index dc8b9494..06c04ac5 100644
--- a/cmake/FindCplex.cmake
+++ b/cmake/FindCplex.cmake
@@ -1,13 +1,13 @@
# FindCplex.cmake
-#
+#
# Created on: May 11, 2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_CPLEX is ON the script searches for Cplex in given
# and standard location. If found it adds the library to the project.
-#
+#
-# Environment variable CPLEX_ROOT_DIR of CPLEX should be set, e.g., /Applications/CPLEX_Studio128
+# Environment variable CPLEX_ROOT_DIR of CPLEX should be set, e.g., /Applications/CPLEX_Studio128
set(CPLEX_HOME "${CPLEX_HOME}" CACHE PATH "Path to the Cplex home \
directory; default on MacOS \"/Applications/CPLEX_Studio\" \
use \"/Library\". You can find the current directory by using the \
@@ -30,7 +30,7 @@ unset(CPLEX_CONCERT_LIBRARY CACHE)
# Cplex Include Directory ##########################################
####################################################################
find_path(CPLEX_INCLUDE_DIR
- NAMES ilcplex/cplex.h
+ NAMES ilcplex/cplex.h
HINTS /usr/local/include
${CPLEX_HOME}/cplex/include
)
@@ -40,7 +40,7 @@ message(STATUS "${MY_SPACE}CPLEX_INCLUDE_DIR:\t\t\t" ${CPLEX_INCLUDE_DIR})
# Find path Cplex concert include directory ########################
####################################################################
find_path(CPLEX_CONCERT_INCLUDE_DIR
- NAMES ilconcert/ilobasic.h
+ NAMES ilconcert/ilobasic.h
HINTS /usr/local/include
/Applications/CPLEX_Studio128/concert/include
${CPLEX_HOME}/concert/include
@@ -54,52 +54,52 @@ if(CPLEX_HOME)
file(GLOB dirs ${CPLEX_HOME}*)
endif()
-find_path(CPLEX_LIBRARY_DIR
- libcplex.a libcplexdistmip.a
+find_path(CPLEX_LIBRARY_DIR
+ libcplex.a libcplexdistmip.a
HINTS /usr/local/lib
/Applications/CPLEX_Studio128/cplex/lib/x86-64_osx/static_pic
- ${CPLEX_HOME}/cplex/lib/x86-64_osx/static_pic
+ ${CPLEX_HOME}/cplex/lib/x86-64_osx/static_pic
${CPLEX_HOME}/cplex/lib/x86-64_darwin/static_pic
${CPLEX_HOME}/cplex/lib/x86-64_debian4.0_4.1/static_pic
- ${CPLEX_HOME}/cplex/lib/x86-64_sles10_4.1/static_pic
+ ${CPLEX_HOME}/cplex/lib/x86-64_sles10_4.1/static_pic
${CPLEX_HOME}/cplex/lib/x86-64_linux/static_pic
- ${CPLEX_HOME}/cplex/lib/${CPLEX_WIN_PLATFORM}
+ ${CPLEX_HOME}/cplex/lib/${CPLEX_WIN_PLATFORM}
)
message(STATUS "${MY_SPACE}CPLEX_LIBRARY_DIR:\t\t\t" ${CPLEX_LIBRARY_DIR})
####################################################################
# Find path Cplex concert library directory ########################
####################################################################
-find_path(CPLEX_CONCERT_LIBRARY_DIR
+find_path(CPLEX_CONCERT_LIBRARY_DIR
libconcert.a
HINTS /usr/local/lib
/Applications/CPLEX_Studio128/concert/lib/x86-64_osx/static_pic
- ${CPLEX_HOME}/concert/lib/x86-64_osx/static_pic
+ ${CPLEX_HOME}/concert/lib/x86-64_osx/static_pic
${CPLEX_HOME}/concert/lib/x86-64_darwin/static_pic
${CPLEX_HOME}/concert/lib/x86-64_debian4.0_4.1/static_pic
${CPLEX_HOME}/concert/lib/x86-64_sles10_4.1/static_pic
- ${CPLEX_HOME}/concert/lib/x86-64_linux/static_pic
- ${CPLEX_HOME}/concert/lib/${CPLEX_WIN_PLATFORM}
+ ${CPLEX_HOME}/concert/lib/x86-64_linux/static_pic
+ ${CPLEX_HOME}/concert/lib/${CPLEX_WIN_PLATFORM}
)
message(STATUS "${MY_SPACE}CPLEX_CONCERT_LIBRARY_DIR:\t" ${CPLEX_CONCERT_LIBRARY_DIR})
-find_library(CPLEX_LIBRARY
- NAMES cplex
+find_library(CPLEX_LIBRARY
+ NAMES cplex
HINTS /usr/local/lib
${CPLEX_LIBRARY_DIR}
)
-find_library(CPLEX_DISTMIP_LIBRARY
+find_library(CPLEX_DISTMIP_LIBRARY
NAMES cplexdistmip
HINTS /usr/local/lib
${CPLEX_LIBRARY_DIR}
)
-find_library(ILO_CPLEX_LIBRARY
- NAMES ilocplex
+find_library(ILO_CPLEX_LIBRARY
+ NAMES ilocplex
HINTS /usr/local/lib
${CPLEX_LIBRARY_DIR}
)
-find_library(CPLEX_CONCERT_LIBRARY
- NAMES concert
+find_library(CPLEX_CONCERT_LIBRARY
+ NAMES concert
HINTS /usr/local/lib
${CPLEX_CONCERT_LIBRARY_DIR}
)
@@ -112,17 +112,17 @@ message(STATUS "${MY_SPACE}CPLEX_CONCERT_LIBRARY_DIR:\t" ${CPLEX_CONCERT_LIBRARY
if(WIN32)
FIND_PATH(CPLEX_BIN_DIR
cplex${CPLEX_WIN_VERSION}.dll
- HINTS ${CPLEX_HOME}/cplex/bin/${CPLEX_WIN_PLATFORM}
+ HINTS ${CPLEX_HOME}/cplex/bin/${CPLEX_WIN_PLATFORM}
)
else()
FIND_PATH(CPLEX_BIN_DIR
- cplex
+ cplex
HINTS ${CPLEX_HOME}/cplex/bin/x86-64_osx
- ${CPLEX_HOME}/cplex/bin/x86-64_darwin
+ ${CPLEX_HOME}/cplex/bin/x86-64_darwin
${CPLEX_HOME}/cplex/bin/x86-64_sles10_4.1
- ${CPLEX_HOME}/cplex/bin/x86-64_debian4.0_4.1
+ ${CPLEX_HOME}/cplex/bin/x86-64_debian4.0_4.1
${CPLEX_HOME}/cplex/lib/x86-64_linux
-
+
)
endif()
@@ -134,7 +134,7 @@ find_package_handle_standard_args(CPLEX DEFAULT_MSG CPLEX_LIBRARY CPLEX_DISTMIP_
####################################################################
# Output Message ###################################################
####################################################################
-if(CPLEX_FOUND)
+if(CPLEX_FOUND)
set(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR} ${CPLEX_CONCERT_INCLUDE_DIR})
message(STATUS "TEST:${CPLEX_INCLUDE_DIRS}")
set(CPLEX_LIBRARIES ${CPLEX_LIBRARY} ${CPLEX_DISTMIP_LIBRARY} ${ILO_CPLEX_LIBRARY} ${CPLEX_CONCERT_LIBRARY})
@@ -150,7 +150,7 @@ mark_as_advanced(CPLEX_LIBRARY CPLEX_DISTMIP_LIBRARY ILO_CPLEX_LIBRARY CPLEX_CON
message(STATUS "")
if(EGOA_ENABLE_CPLEX AND NOT CPLEX_FOUND)
- message( FATAL_ERROR
+ message( FATAL_ERROR
"CPLEX is enabled, but not available on the system. Please, check the \
CPLEX installation, and cmake configuration or disable Cplex by \
setting EGOA_ENABLE_CPLEX to OFF." )
diff --git a/cmake/FindEigen.cmake b/cmake/FindEigen.cmake
index 4aa9b2b8..2e8a3418 100644
--- a/cmake/FindEigen.cmake
+++ b/cmake/FindEigen.cmake
@@ -1,12 +1,12 @@
# FindEigen.cmake
-#
+#
# Created on: Jan 26, 2020
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_EIGEN is ON the script searches for Eigen in given and
# standard location (see EGOA_DOWNLOAD_EIGEN). If found it adds the library to
# the project.
-#
+#
####################################################################
# Unset ############################################################
@@ -17,7 +17,7 @@ unset ( EIGEN_INCLUDE_DIR CACHE )
# Eigen include directory ##########################################
####################################################################
find_path ( EIGEN_INCLUDE_DIR
- NAMES Eigen/src/Core/Array.h
+ NAMES Eigen/src/Core/Array.h
HINTS ./external/Eigen
${EIGEN_ROOT_DIR}/Eigen/
${EIGEN_ROOT_DIR}
@@ -44,7 +44,7 @@ mark_as_advanced ( EIGEN_INCLUDE_DIR )
####################################################################
message ( STATUS "" )
if ( EGOA_ENABLE_EIGEN AND NOT EIGEN_FOUND )
- message( FATAL_ERROR
+ message( FATAL_ERROR
"Eigen is enabled, but not available on the system. Please, check the \
Eigen installation, and cmake configuration or disable Eigen by \
setting EGOA_ENABLE_EIGEN to OFF." )
diff --git a/cmake/FindGoogleTestFramework.cmake b/cmake/FindGoogleTestFramework.cmake
index 1d2ee518..24f848da 100644
--- a/cmake/FindGoogleTestFramework.cmake
+++ b/cmake/FindGoogleTestFramework.cmake
@@ -1,11 +1,11 @@
# FindGoogleTestFramework.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_TESTS is TRUE the necessary directories of the google test
# framework are added to the project such as the includes for gtest and gmock.
-#
+#
####################################################################
# Include test framework ###########################################
diff --git a/cmake/FindGoogleTestFrameworkOnlineVersion.cmake b/cmake/FindGoogleTestFrameworkOnlineVersion.cmake
index f2d84c49..9e26d799 100644
--- a/cmake/FindGoogleTestFrameworkOnlineVersion.cmake
+++ b/cmake/FindGoogleTestFrameworkOnlineVersion.cmake
@@ -1,21 +1,21 @@
# FindGoogleTestFrameworkOnlineVersion.cmake
-#
+#
# Created on: Jan 30, 2019
-# Source: https://github.com/google/googletest/tree/main/googletest
-#
-# Requirements
-# * CMake 2.8. or later due to the use of ExternalProject_Add().
-#
+# Source: https://github.com/google/googletest/tree/main/googletest
+#
+# Requirements
+# * CMake 2.8. or later due to the use of ExternalProject_Add().
+#
# CMake Warning (dev):
# * Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run
# "cmake --help-policy CMP0042" for policy details. Use the cmake_policy
# command to set the policy and suppress this warning. MACOSX_RPATH is not
# specified for the following targets: gtest_dll
# * This warning is for project developers. Use -Wno-dev to suppress it.
-#
+#
# If EGOA_ENABLE_TESTS is TRUE the necessary directories of the google test
# framework are added to the project such as the includes for gtest and gmock.
-#
+#
set(CMAKE_MACOSX_RPATH 1)
diff --git a/cmake/FindGurobi.cmake b/cmake/FindGurobi.cmake
index 63cc50a4..221d567f 100644
--- a/cmake/FindGurobi.cmake
+++ b/cmake/FindGurobi.cmake
@@ -1,11 +1,11 @@
# FindGurobi.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_GUROBI is ON the script searches for Gurobi in given
# and standard location. If found it adds the library to the project.
-#
+#
####################################################################
# Unset ############################################################
@@ -41,8 +41,8 @@ string(SUBSTRING ${GUROBI_VERSION} 0 2 GUROBI_VERSION_SHORT)
####################################################################
# Find gurobi include directory ####################################
####################################################################
-find_path(GUROBI_INCLUDE_DIR
- gurobi_c++.h
+find_path(GUROBI_INCLUDE_DIR
+ gurobi_c++.h
HINTS "${GUROBI_HOME}/include"
$ENV{GUROBI_HOME}/include
)
@@ -51,8 +51,8 @@ message(STATUS "${MY_SPACE}GUROBI_INCLUDE_DIR:\t\t\t" ${GUROBI_INCLUDE_DIR})
####################################################################
# Find Gurobi library directory ####################################
####################################################################
-find_path(GUROBI_LIBRARY_DIR
- libgurobi${GUROBI_VERSION_SHORT}.a libgurobi${GUROBI_VERSION_SHORT}.so
+find_path(GUROBI_LIBRARY_DIR
+ libgurobi${GUROBI_VERSION_SHORT}.a libgurobi${GUROBI_VERSION_SHORT}.so
HINTS ${GUROBI_HOME}/lib
$ENV{GUROBI_HOME}/lib
)
@@ -60,7 +60,7 @@ find_path(GUROBI_LIBRARY_DIR
####################################################################
# Find Gurobi library ##############################################
####################################################################
-find_library(GUROBI_LIBRARY
+find_library(GUROBI_LIBRARY
libgurobi${GUROBI_VERSION_SHORT}.a libgurobi${GUROBI_VERSION_SHORT}.so
HINTS ${GUROBI_HOME}/lib
$ENV{GUROBI_HOME}/lib
@@ -70,8 +70,8 @@ message(STATUS "${MY_SPACE}GUROBI_LIBRARY:\t\t\t\t" ${GUROBI_LIBRARY})
####################################################################
# Find Gurobi CPP library ##########################################
####################################################################
-find_library(GUROBI_CPP_LIBRARY
- libgurobi_c++.a libgurobi_c++.so
+find_library(GUROBI_CPP_LIBRARY
+ libgurobi_c++.a libgurobi_c++.so
HINTS ${GUROBI_HOME}/lib
$ENV{GUROBI_HOME}/lib
)
@@ -101,7 +101,7 @@ mark_as_advanced(GUROBI_LIBRARY GUROBI_CPP_LIBRARY GUROBI_INCLUDE_DIR)
message(STATUS "")
if(EGOA_ENABLE_GUROBI AND NOT GUROBI_FOUND)
- message( FATAL_ERROR
+ message( FATAL_ERROR
"Gurobi is enabled, but not available on the system. Please, check the \
Gurobi installation, and cmake configuration for GUROBI_HOME or disable \
Gurobi by setting EGOA_ENABLE_GUROBI to OFF." )
diff --git a/cmake/FindIpopt.cmake b/cmake/FindIpopt.cmake
index 79c3f517..98cec086 100644
--- a/cmake/FindIpopt.cmake
+++ b/cmake/FindIpopt.cmake
@@ -1,13 +1,13 @@
# FindIpopt.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_IPOPT is ON the script searches for Ipopt in given
# and standard location. If found it adds the library to the project.
-#
+#
-# Environment variable IPOPT_ROOT_DIR of IPOPT should be set, e.g., /Users//Documents/CoinIpopt/build
+# Environment variable IPOPT_ROOT_DIR of IPOPT should be set, e.g., /Users//Documents/CoinIpopt/build
set ( IPOPT_ROOT_DIR "$ENV{IPOPT_ROOT_DIR}" CACHE PATH "Ipopt root directory." )
get_filename_component ( PARENT_DIRECTORY ${PROJECT_SOURCE_DIR} DIRECTORY )
@@ -30,7 +30,7 @@ unset ( IPOPT_LIBRARY CACHE )
# Ipopt include directory ##########################################
####################################################################
find_path ( IPOPT_INCLUDE_DIR
- NAMES IpNLP.hpp
+ NAMES IpNLP.hpp
HINTS /usr/local/include/coin
${IPOPT_ROOT_DIR}/include/coin
${IPOPT_ROOT_DIR}/include
@@ -40,22 +40,22 @@ message ( STATUS "${MY_SPACE}IPOPT_INCLUDE_DIR:\t\t\t" ${IPOPT_INCLUDE_DIR} )
####################################################################
# Ipopt library directory ##########################################
####################################################################
-find_path ( IPOPT_LIBRARY_DIR
- libipopt.dylib libipopt.so
+find_path ( IPOPT_LIBRARY_DIR
+ libipopt.dylib libipopt.so
HINTS /usr/local/lib
${IPOPT_ROOT_DIR}/lib
)
message ( STATUS "${MY_SPACE}IPOPT_LIBRARY_DIR:\t\t\t" ${IPOPT_LIBRARY_DIR} )
if(APPLE)
- find_library(IPOPT_LIBRARY
+ find_library(IPOPT_LIBRARY
libipopt.dylib
HINTS /usr/local/lib
${IPOPT_ROOT_DIR}/lib
)
elseif(UNIX)
- find_library(IPOPT_LIBRARY
- libipopt.so
+ find_library(IPOPT_LIBRARY
+ libipopt.so
HINTS /usr/local/lib
${IPOPT_ROOT_DIR}/lib
)
@@ -84,8 +84,8 @@ mark_as_advanced ( IPOPT_LIBRARY IPOPT_INCLUDE_DIR IPOPT_LIBRARY_DIR )
####################################################################
message ( STATUS "" )
if ( EGOA_ENABLE_IPOPT AND NOT IPOPT_FOUND )
- message ( FATAL_ERROR
+ message ( FATAL_ERROR
"Ipopt is enabled, but not available on the system. Please, check the \
Ipopt installation, and cmake configuration or disable Ipopt by \
setting EGOA_ENABLE_IPOPT to OFF." )
-endif ( EGOA_ENABLE_IPOPT AND NOT IPOPT_FOUND )
\ No newline at end of file
+endif ( EGOA_ENABLE_IPOPT AND NOT IPOPT_FOUND )
diff --git a/cmake/FindOGDF.cmake b/cmake/FindOGDF.cmake
index a96b76a5..21a02b66 100644
--- a/cmake/FindOGDF.cmake
+++ b/cmake/FindOGDF.cmake
@@ -1,12 +1,12 @@
# FindOGDF.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_OGDF is ON the script searches for OGDF and COIN in given and
# standard location. If found it adds the library to the project by adding the
# include paths and libraries to the project.
-#
+#
set ( OGDF_LIBRARY_DIR ${OGDF_LIBRARY_DIR} CACHE FILEPATH "Path to the OGDF library directory including libOGDF.a or libOGDF.so; please use no snapshot higher than 23th of July 2017" )
set ( OGDF_INCLUDE_DIR ${OGDF_INCLUDE_DIR} CACHE FILEPATH "OGDF include directory" )
@@ -22,7 +22,7 @@ message(STATUS "OGDF:")
####################################################################
# find ODGF include directory if not given by input
if(NOT OGDF_INCLUDE_DIR)
-find_path( OGDF_INCLUDE_DIR
+find_path( OGDF_INCLUDE_DIR
NAMES ogdf/tree/LCA.h ogdf/basic/Graph.h
HINTS /opt/ogdf/include/
/usr/local/include
@@ -32,7 +32,7 @@ message(STATUS "${MY_SPACE}OGDF_INCLUDE_DIR:\t\t${OGDF_INCLUDE_DIR}")
# find ODGF automatically generated include directory if not given by input
if(NOT OGDF_AUTOGEN_INCLUDE_DIR)
-find_path( OGDF_AUTOGEN_INCLUDE_DIR
+find_path( OGDF_AUTOGEN_INCLUDE_DIR
NAMES ogdf/basic/internal/config_autogen.h
HINTS ${OGDF_INCLUDE_DIR}
${OGDF_LIBRARY_DIR}/include/
@@ -44,7 +44,7 @@ message(STATUS "${MY_SPACE}OGDF_AUTOGEN_INCLUDE_DIR:\t${OGDF_AUTOGEN_INCLUDE_DIR
# find COIN include directory if not given by input
if(NOT COIN_INCLUDE_DIR)
-find_path( COIN_INCLUDE_DIR
+find_path( COIN_INCLUDE_DIR
NAMES coin/ClpSimplexNonlinear.hpp
HINTS ${OGDF_INCLUDE_DIR}
/usr/local/lib/
@@ -58,7 +58,7 @@ message(STATUS "${MY_SPACE}COIN_INCLUDE_DIR: ${COIN_INCLUDE_DIR}")
####################################################################
# OGDF Library Directory ###########################################
####################################################################
-find_library(OGDF_LIBRARY
+find_library(OGDF_LIBRARY
libOGDF.a libOGDF.so
HINTS ${OGDF_LIBRARY_DIR}
/usr/local/lib/
@@ -70,7 +70,7 @@ message(STATUS "${MY_SPACE}OGDF_LIBRARY:\t\t\t${OGDF_LIBRARY}")
####################################################################
# COIN Library Directory ###########################################
####################################################################
-find_library(COIN_LIBRARY
+find_library(COIN_LIBRARY
libCOIN.a libCOIN.so
HINTS ${COIN_LIBRARY_DIR}
${OGDF_LIBRARY_DIR}
@@ -112,8 +112,8 @@ mark_as_advanced(OGDF_LIBRARY)
# Output Message ###################################################
####################################################################
message(STATUS "${MY_SPACE}OGDF_DEBUG:\t\t\t${OGDF_DEBUG}")
-if(EGOA_ENABLE_OGDF AND NOT OGDF_FOUND)
-message( FATAL_ERROR
+if(EGOA_ENABLE_OGDF AND NOT OGDF_FOUND)
+message( FATAL_ERROR
"OGDF is enabled, but either not available on the system or the \
installation is demaged. Please, check the installation of OGDF, the OGDF \
paths OGDF_AUTOGEN_INCLUDE_DIR, OGDF_INCLUDE_DIR, and OGDF_LIBRARY_DIR in \
diff --git a/cmake/HelperFunctions.cmake b/cmake/HelperFunctions.cmake
index 4cefe56b..07485412 100644
--- a/cmake/HelperFunctions.cmake
+++ b/cmake/HelperFunctions.cmake
@@ -1,10 +1,10 @@
# HelperFunctions.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# A collection of function that help to reduce the cmake complexity.
-#
+#
# Link Gurobi if available
function(add_gurobi_if_available varName)
diff --git a/cmake/InputProperties.cmake b/cmake/InputProperties.cmake
index 63af057b..be2462c4 100644
--- a/cmake/InputProperties.cmake
+++ b/cmake/InputProperties.cmake
@@ -1,11 +1,11 @@
# InputProperties.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# Create variables and their drop down menus, and mark some variables as
# advanced.
-#
+#
####################################################################
# Reset variables ##################################################
@@ -103,12 +103,12 @@ set ( EGOA_ENABLE_TESTS ON CACHE BOOL
"EGOA_ENABLE_TESTS enables the test framework" )
set_property ( CACHE EGOA_ENABLE_TESTS PROPERTY STRINGS ON OFF )
-# Property exception handling
+# Property exception handling
set ( EGOA_ENABLE_EXCEPTION_HANDLING ON CACHE BOOL
"EGOA_ENABLE_EXCEPTION_HANDLING enables exception handling in the framework" )
set_property ( CACHE EGOA_ENABLE_EXCEPTION_HANDLING PROPERTY STRINGS ON OFF )
-# Property exception handling
+# Property exception handling
set ( EGOA_ENABLE_ASSERTION ON CACHE BOOL
"EGOA_ENABLE_ASSERTION enables assertions in debug mode in the framework" )
set_property ( CACHE EGOA_ENABLE_ASSERTION PROPERTY STRINGS ON OFF )
diff --git a/cmake/OpenMP.cmake b/cmake/OpenMP.cmake
index 177601a5..0ceed0d5 100644
--- a/cmake/OpenMP.cmake
+++ b/cmake/OpenMP.cmake
@@ -1,18 +1,18 @@
# OpenMP.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
+#
# If EGOA_ENABLE_OPENMP is ON the script adds the target to use the
# header in the project.
-#
+#
# Installation of OpenMP
# * To install OpenMP on Mac use:
# * OPENMP: brew install llvm PATH: /usr/local/Cellar/llvm/5.0.1/bin/clang
-# * CPP = /usr/local/opt/llvm/bin/clang | CPPFLAGS = -I/usr/local/opt/llvm/include -fopenmp
+# * CPP = /usr/local/opt/llvm/bin/clang | CPPFLAGS = -I/usr/local/opt/llvm/include -fopenmp
# | LDFLAGS = -L/usr/local/opt/llvm/lib
-message(STATUS "OpenMP enabled: " ${EGOA_ENABLE_OPENMP})
+message(STATUS "OpenMP enabled: " ${EGOA_ENABLE_OPENMP})
# ${CMAKE_CXX_COMPILER} --- /usr/local/Cellar/llvm/9.0.0/bin/clang++
# /usr/local/opt/llvm@8/ or /usr/local/Cellar/llvm@8/8.0.1/bin/clang++
@@ -67,7 +67,7 @@ set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
# Output Message ###################################################
####################################################################
if(EGOA_ENABLE_OPENMP AND NOT OPENMP_FOUND)
- message( FATAL_ERROR
+ message( FATAL_ERROR
"OpenMP is enabled, but not available on the system. Please, check the \
specification of your compiler or disable OpenMP by setting \
EGOA_ENABLE_OPENMP to OFF." )
diff --git a/cmake/SetEnvironmentVariables.cmake b/cmake/SetEnvironmentVariables.cmake
index 4025a1b3..357c6c9d 100644
--- a/cmake/SetEnvironmentVariables.cmake
+++ b/cmake/SetEnvironmentVariables.cmake
@@ -1,17 +1,17 @@
# SetEnvironmentVariables.cmake
-#
+#
# Created on: Jan 30, 2019
# Author: Franziska Wegner
-#
-# Set environment variables that are used for, e.g.,
+#
+# Set environment variables that are used for, e.g.,
# - OpenMP
# - ...
-#
+#
# Set OpenMP variables
message( STATUS "Set OpenMP variables" )
-set(ENV{OMP_WAIT_POLICY} "ACTIVE")
+set(ENV{OMP_WAIT_POLICY} "ACTIVE")
message( STATUS "${MY_SPACE}OMP_WAIT_POLICY:\t\t\t" $ENV{OMP_WAIT_POLICY})
# Stack size of each OpenMP threads
@@ -46,4 +46,4 @@ if(NOT EGOA_THREAD_LIMIT EQUAL 0)
set(ENV{OMP_NUM_THREADS} ${EGOA_THREAD_LIMIT})
message( STATUS "${MY_SPACE}OMP_NUM_THREADS:\t\t\t" $ENV{OMP_NUM_THREADS} )
endif()
-message( STATUS )
\ No newline at end of file
+message( STATUS )
diff --git a/data/Windfarms/CableTypes/2017-iti-cable-types.json b/data/Windfarms/CableTypes/2017-iti-cable-types.json
index 41a8280d..0d1ef936 100755
--- a/data/Windfarms/CableTypes/2017-iti-cable-types.json
+++ b/data/Windfarms/CableTypes/2017-iti-cable-types.json
@@ -1,9 +1,24 @@
{
- "cableTypes": [
- { "cost": 20, "capacity": 5 },
- { "cost": 25, "capacity": 8 },
- { "cost": 27, "capacity": 12 },
- { "cost": 41, "capacity": 15 },
- { "cost": 10000, "capacity": 1000 }
- ]
+ "cableTypes": [
+ {
+ "capacity": 5,
+ "cost": 20
+ },
+ {
+ "capacity": 8,
+ "cost": 25
+ },
+ {
+ "capacity": 12,
+ "cost": 27
+ },
+ {
+ "capacity": 15,
+ "cost": 41
+ },
+ {
+ "capacity": 1000,
+ "cost": 10000
+ }
+ ]
}
diff --git a/documentation/includes/EGOA_Colors.tex b/documentation/includes/EGOA_Colors.tex
index ea89fca4..acc52a83 100644
--- a/documentation/includes/EGOA_Colors.tex
+++ b/documentation/includes/EGOA_Colors.tex
@@ -1,9 +1,9 @@
\usepackage{transparent}
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% KIT defined colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
% KIT green
\definecolor{KITgreen}{rgb}{0 0.588 0.509}
\definecolor{KITgreen70}{rgb}{0.3 0.711 0.656}
@@ -70,7 +70,7 @@
\definecolor{KITblack50}{rgb}{0.5,0.5,0.5}
\definecolor{KITblack30}{rgb}{0.7,0.7,0.7}
\definecolor{KITblack15}{rgb}{0.85,0.85,0.85}
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Power Grid Related Colors
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -126,9 +126,9 @@
\colorlet{ColorCircuitProblem} {KITgreen}
\colorlet{ColorSubstationProblem} {KITorange}
\colorlet{ColorFullWindFarm} {KITred}
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-% Other
+% Other
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% ACM already defined colors
\definecolor[named]{ACMBlue}{cmyk}{1,0.1,0,0.1}
@@ -147,4 +147,4 @@
\definecolor{orange}{rgb}{1,0.5,0}
\definecolor{orange}{RGB}{255,127,0}
\definecolor{figChar}{cmyk}{0,0.90,0.86,0}
-%
\ No newline at end of file
+%
diff --git a/documentation/includes/EGOA_DocumentationLatexPreamble.sty b/documentation/includes/EGOA_DocumentationLatexPreamble.sty
index 2fbaf359..04024467 100644
--- a/documentation/includes/EGOA_DocumentationLatexPreamble.sty
+++ b/documentation/includes/EGOA_DocumentationLatexPreamble.sty
@@ -1,13 +1,13 @@
-%
+%
% EGOA-Documentation-Latex-Preamble.sty
-%
+%
% Created on: Jan 30, 2019
% Author: Franziska Wegner
-%
+%
% Macros that are used within the papers and dissertation can used within the
% code documentation to provide the possibility to map the theoretical content
% with the code.
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Usepackages
@@ -39,10 +39,10 @@
\usepackage{tabularx,environ}
\usepackage{paralist}
\usepackage{caption,subcaption}
-\usepackage{float}
+\usepackage{float}
\usepackage{pifont}
\usepackage{flushend}
-\usepackage{xargs}
+\usepackage{xargs}
\usepackage{xspace}
\usepackage{textpos}
@@ -53,7 +53,7 @@
\newcommand{\overleftrightsmallarrow}{\mathpalette{\overarrowsmall@\leftrightarrowfill@}}
\newcommand{\overrightsmallarrow}{\mathpalette{\overarrowsmall@\rightarrowfill@}}
\newcommand{\overleftsmallarrow}{\mathpalette{\overarrowsmall@\leftarrowfill@}}
-%
+%
\newcommand{\overarrowsmall@}[3]{%
\vbox{%
\ialign{%
@@ -76,7 +76,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% New Theorem
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
\newtheorem{theorem}{Theorem}[section]
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{corollary}[theorem]{Corollary}
@@ -89,7 +89,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Color
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
% ACM defined colors
\definecolor[named]{ACMBlue}{cmyk}{1,0.1,0,0.1}
\definecolor[named]{ACMYellow}{cmyk}{0,0.16,1,0}
@@ -104,10 +104,10 @@
\definecolor{orange}{rgb}{1,0.5,0}
\definecolor{orange}{RGB}{255,127,0}
\definecolor{figChar}{cmyk}{0,0.90,0.86,0}
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% KIT defined colors
-%
+%
% KIT green
\definecolor{KITgreen}{rgb}{0 0.588 0.509}
\definecolor{KITgreen70}{rgb}{0.3 0.711 0.656}
@@ -212,7 +212,7 @@
% Edges
\newcommandx{\makeUndirected}[1]{\ensuremath{\overleftrightsmallarrow{#1}}\xspace}
-%
+%
\newcommand{\edges}{\ensuremath{E}\xspace}
\newcommandx{\foneToOneMap}[1]{\ensuremath{\mathrm{\mu}_{#1}}\xspace}
\newcommand{\oneToOneMap}{\ensuremath{\mathrm{\foneToOneMap{dual}}}\xspace}
@@ -233,7 +233,7 @@
\newcommand{\flowb}{\ensuremath{\flow_2}\xspace}
\newcommand{\netflow}{\ensuremath{\flow_{\mathrm{net}}}\xspace}
-% Others
+% Others
\newcommand{\partition}{\ensuremath{P}\xspace}
\newcommand{\neighbor}{\ensuremath{N}\xspace}
\newcommand{\inneighbor}{\ensuremath{N^+}\xspace}
@@ -254,7 +254,7 @@
\newcommand{\labnew}{\ensuremath{\lab_\mathrm{new}}\xspace}
\newcommand{\col}{\ensuremath{c}\xspace}
\newcommand{\colorlabels}{\ensuremath{C}\xspace}
-\newcommand{\orderedlist}[1]{\ensuremath{\langle #1\rangle}\xspace}
+\newcommand{\orderedlist}[1]{\ensuremath{\langle #1\rangle}\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Power Grid
@@ -287,13 +287,13 @@
}
\newcommand{\dcnetworktuple}{
\ensuremath{\network = (}
- \graph,
- \generators,
- \consumers,
+ \graph,
+ \generators,
+ \consumers,
\ensuremath{\capacity,}
\susceptance,
- \realpowergenerationmin,
- \realpowergenerationmax,
+ \realpowergenerationmin,
+ \realpowergenerationmax,
\realpowerdemandmin,
\realpowerdemandmax
\ensuremath{)}
@@ -301,12 +301,12 @@
}
\newcommand{\flownetworktuple}{
\ensuremath{\network = (}
- \graph,
- \source,
- \sink,
+ \graph,
+ \source,
+ \sink,
\ensuremath{\capacity,}
- \realpowergenerationmin,
- \realpowergenerationmax,
+ \realpowergenerationmin,
+ \realpowergenerationmax,
\realpowerdemandmin,
\realpowerdemandmax
\ensuremath{)}
@@ -339,7 +339,7 @@
% Branches
\newcommand{\factsedge}{\ensuremath{\edges_F}\xspace}
\newcommand{\factsbranch}{\ensuremath{\edges_F}\xspace}
-%
+%
\newcommand{\rectangulardissection}{\ensuremath{\mathcal{R}}\xspace}
% Resistance
@@ -479,7 +479,7 @@
\newcommand{\reactivepowersmax}{\ensuremath{\MAX{\reactivepowers}}\xspace}
\newcommand{\reactivepowerbase}{\ensuremath{\reactivepowers_{
\mathrm{base}}}\xspace}
-%
+%
\newcommand{\excess}{\ensuremath{x}\xspace}
\newcommand{\excessSet}{\ensuremath{X}\xspace}
\newcommand{\minexcess}{\ensuremath{\MIN{\excess}}\xspace}
@@ -529,7 +529,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\DeclareMathOperator{\len}{\ensuremath{len}\xspace}
\DeclareMathOperator{\costsubstation}{\ensuremath{\totalcost_\mathrm{sub}}\xspace} %csub
-\newcommand{\totalcost}{\ensuremath{c}\xspace}
+\newcommand{\totalcost}{\ensuremath{c}\xspace}
\DeclareMathOperator{\flowcost}{\ensuremath{cost}\xspace}
\DeclareMathOperator{\degree}{\ensuremath{deg}\xspace} % degree of a vertex
@@ -547,8 +547,8 @@
\newcommand{\problems}{\ensuremath{\mathcal{P}}\xspace}
% Economic Dispatch Problem (EDP)
-\newcommand{\edp}{EDP\xspace}
-\newcommand{\EDP}{\textsc{Economic Dispatch Problem}\xspace}
+\newcommand{\edp}{EDP\xspace}
+\newcommand{\EDP}{\textsc{Economic Dispatch Problem}\xspace}
% Alternating Current (AC)
\newcommand{\ac}{\ensuremath{\mathsf{AC}}\xspace}
@@ -597,7 +597,7 @@
\newcommand{\dcopf}{\ensuremath{\mathsf{\dc\opf}}\xspace}
\newcommand{\dcopfbf}{\ensuremath{\mathbfsf{DCOPF}}\xspace}
\newcommand{\DCOPF}{\textsc{\DC\ \OPF}\xspace}
-%
+%
\newcommand{\dfs}{\ensuremath{\mathsf{DFS}}\xspace}
% Dominating Theta Path (DTP)
@@ -614,7 +614,7 @@
\newcommand{\feasbf}{\ensuremath{\mathbfsf{FEAS}}\xspace}
\newcommand{\FEAS}{\textsc{Feasibility Problem}\xspace}
-% Concerning flows
+% Concerning flows
\newcommand{\flowvalue}{\ensuremath{F}\xspace}
\newcommand{\flowvaluebf}{\ensuremath{\mathbfsf{F}}\xspace}
@@ -649,32 +649,32 @@
% Minimum Cost Flow (MCF)
\newcommand{\mcf}{\ensuremath{\mathsf{MCF}}\xspace}
\newcommand{\mcfbf}{\ensuremath{\mathbfsf{MCF}}\xspace}
-\newcommand{\MCF}{\textsc{Minimum Cost Flow}\xspace}
+\newcommand{\MCF}{\textsc{Minimum Cost Flow}\xspace}
% Minimum Cost Flow Problem (MCFP)
\newcommand{\mcfp}{\ensuremath{\mathsf{MCFP}}\xspace}
\newcommand{\mcfpbf}{\ensuremath{\mathbfsf{MCFP}}\xspace}
-\newcommand{\MCFP}{\textsc{Minimum Cost Flow Problem}\xspace}
+\newcommand{\MCFP}{\textsc{Minimum Cost Flow Problem}\xspace}
% Maximum Flow (MF)
\newcommand{\mf}{\ensuremath{\mathsf{MF}}\xspace}
\newcommand{\mfbf}{\ensuremath{\mathbfsf{MF}}\xspace}
-\newcommand{\MF}{\text{maximum flow}\xspace}
+\newcommand{\MF}{\text{maximum flow}\xspace}
% Maximum Flow Problem (MFP)
\newcommand{\mfp}{\ensuremath{\mathsf{MFP}}\xspace}
\newcommand{\mfpbf}{\ensuremath{\mathbfsf{MFP}}\xspace}
-\newcommand{\MFP}{\textsc{Maximum Flow Problem}\xspace}
+\newcommand{\MFP}{\textsc{Maximum Flow Problem}\xspace}
% Minimum Cut (MC)
\newcommand{\mc}{\ensuremath{\mathsf{MC}}\xspace}
\newcommand{\mcbf}{\ensuremath{\mathbfsf{MC}}\xspace}
-\newcommand{\MC}{\text{minimum cut}\xspace}
+\newcommand{\MC}{\text{minimum cut}\xspace}
% Minimum Cut Problem (MCP)
\newcommand{\mcp}{\ensuremath{\mathsf{MCP}}\xspace}
\newcommand{\mcpbf}{\ensuremath{\mathbfsf{MCP}}\xspace}
-\newcommand{\MCP}{\textsc{Minimum Cut Problem}\xspace}
+\newcommand{\MCP}{\textsc{Minimum Cut Problem}\xspace}
% Mixed-integer Linear Program (MILP)
\newcommand{\milp}{\ensuremath{\mathsf{MILP}}\xspace}
@@ -715,7 +715,7 @@
\newcommand{\kmtsf}{\ensuremath{k}-\mtsf}
\newcommand{\kmtsfbf}{\ensuremath{k}-\mtsfbf}
\newcommand{\kMTSF}{\ensuremath{k}-\acrlong{mtsf}}
-%
+%
\newcommand{\kmtsfp}{\ensuremath{k}-\mtsfp}
\newcommand{\kmtsfpbf}{\ensuremath{k}-\mtsfpbf}
\newcommand{\kMTSFP}{\ensuremath{k}-\acrlong{mtsfp}}
@@ -870,7 +870,7 @@ Problem}\xspace}
% Transmission System Operators (TSO)
\newcommand{\tso}{TSO\xspace}
\newcommand{\TSO}{Transmission System Operators\xspace}
-%
+%
\newcommand{\twoapprox}{\ensuremath{\mathsf{2-approx}}\xspace}
\newcommand{\twoapproxbf}{\ensuremath{\mathbfsf{2-approx}}\xspace}
\newcommand{\TWOAPPROX}{\textsc{2-Approximation}\xspace}
@@ -879,17 +879,17 @@ Problem}\xspace}
\newcommand{\ucp}{\ensuremath{\mathsf{UCP}}\xspace}
\newcommand{\ucpbf}{\ensuremath{\mathbfsf{UCP}}\xspace}
\newcommand{\UCP}{\textsc{Unit Commitment Problem}\xspace}
-%
+%
\newcommand{\vc}{\ensuremath{\mathsf{VC}}\xspace}
\newcommand{\vcp}{\ensuremath{\mathsf{VCP}}\xspace}
\newcommand{\vcpbf}{\ensuremath{\mathbfsf{VCP}}\xspace}
\newcommand{\VCP}{\textsc{Vertex Cover Problem}\xspace}
-%
+%
\newcommand{\fvs}{\ensuremath{\mathsf{FVS}}\xspace}
\newcommand{\fvsp}{\ensuremath{\mathsf{FVSP}}\xspace}
\newcommand{\fvspbf}{\ensuremath{\mathbfsf{FVSP}}\xspace}
\newcommand{\FVSP}{\textsc{Feedback Vertex Set Problem}\xspace}
-%
+%
\newcommand{\partitionp}{\ensuremath{\mathsf{PP}}\xspace}
\newcommand{\partitionpbf}{\ensuremath{\mathbfsf{PP}}\xspace}
\newcommand{\PartitionP}{\textsc{Partition Problem}\xspace}
@@ -941,7 +941,7 @@ Problem}\xspace}
% Complex
\newcommand{\complexes}{\ensuremath{\mathbb{C}}\xspace}
\newcommand{\imgPart}{\ensuremath{\textbf{j}}\xspace}
-%
+%
\newcommand{\determinant}{\ensuremath{\mathrm{det}}\xspace}
\newcommandx{\fdeterminant}[1]{\ensuremath{\determinant\left(#1\right)}\xspace}
\newcommandx{\imaginary}[1]{\ensuremath{\mathcal{I}\!\!m\!\left
@@ -988,7 +988,7 @@ Problem}\xspace}
\newcommand{\locations}{\ensuremath{L}\xspace}
\newcommand{\temperature}{\ensuremath{T}}
-\newcommand{\energy}{\ensuremath{\totalcost}\xspace} %usually E for energy, but E is already used for the set of edges
+\newcommand{\energy}{\ensuremath{\totalcost}\xspace} %usually E for energy, but E is already used for the set of edges
% Solutions
\newcommand{\solutions}{\ensuremath{S}\xspace}
@@ -1012,7 +1012,7 @@ Problem}\xspace}
\newcommand{\activity}{\ensuremath{\mu}\xspace}
\newcommand{\activitythreshold}{\ensuremath{\overline{\mu}}\xspace}
-% Instances
+% Instances
\newcommand{\instances}{\ensuremath{\mathcal{I}}\xspace}
\newcommand{\instance}{\ensuremath{I}\xspace}
\newcommand{\instancea}{\ensuremath{\instance_1}\xspace}
@@ -1034,7 +1034,7 @@ Problem}\xspace}
\newcommand{\ifequals}[3]{\ifthenelse{\equal{#1}{#2}}{#3}{}}%
\newcommand{\case}[2]{#1 #2} % Dummy, so \renewcommand has something to overwrite...
\newenvironment{switchcase}[1]{\renewcommand{\case}{\ifequals{#1}}}{}%
-%
+%
% Example: Pick case by ID
\newcommand{\nestacase}[2]{%
\begin{switchcase}{#1}%
@@ -1069,7 +1069,7 @@ Problem}\xspace}
#2%
\end{switchcase}%
}
-%
+%
\newcommand{\tablecase}[1]{%
% \footnotesize
\begin{switchcase}{#1}%
@@ -1128,7 +1128,7 @@ Problem}\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Matrices
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
% Adjacency Matrix
\newcommand{\adjacencyMatrix}{\ensuremath{\mathbf{A}}\xspace}%A
\newcommand{\adjacencyMatrixVector}{\ensuremath{\mathbf{a}}\xspace}%A
@@ -1140,7 +1140,7 @@ Problem}\xspace}
\newcommand{\admittanceMatrixNode}{\ensuremath{\mathbf{Y_n}}\xspace}
\newcommandx{\admittanceMatrixEntry}[2]{\ensuremath{
\mathbf{\admittanceMatrix_{#1,#2}}}\xspace}
-%
+%
\newcommand{\polyhedron}{\ensuremath{P}\xspace}%P
\newcommand{\righthandsidevector}{\ensuremath{\realpower}\xspace}
\newcommandx{\frighthandsidevector}[1]{\ensuremath{\vv{\righthandsidevector_
@@ -1190,7 +1190,7 @@ Problem}\xspace}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Auxiliary
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
\newcommand{\plotscale}{0.8}
\newcommand{\plotscaleOne}{0.45}
\newcommand\plotsizeAppendix{0.89}
@@ -1234,7 +1234,7 @@ Problem}\xspace}
\newcommand{\inverse}{{\hspace{0.5pt}\protect\raisebox{0.5pt}{\protect\scalebox{0.6}[1.0]{$\scriptstyle-$}\hspace{-0.6pt}$\scriptscriptstyle1$}\hspace{-1pt}}}
\newcommandx{\transpose}[1]{\ensuremath{#1^\intercal}\xspace}
-% Others
+% Others
\newcommand{\distance}{\ensuremath{d}\xspace}
\newcommand{\algo}{\ensuremath{\mathcal{A}}\xspace}
\newcommand{\solutionmap}{\ensuremath{\mathtt{SolutionMap}}\xspace}
@@ -1243,4 +1243,4 @@ Problem}\xspace}
\newcommandx{\fmagnitude}[1]{\ensuremath{\lvert{#1}\rvert}\xspace}
\newcommand{\tmp}{\mathrm{tmp}}
\newcommand{\twodots}{\mathinner {\ldotp \ldotp}}
-\newcommand{\parent}{\ensuremath{\mathrm{parent}}}
\ No newline at end of file
+\newcommand{\parent}{\ensuremath{\mathrm{parent}}}
diff --git a/documentation/includes/EGOA_IpeLatexPreamble.tex b/documentation/includes/EGOA_IpeLatexPreamble.tex
index 3fbc3847..f2266bd3 100644
--- a/documentation/includes/EGOA_IpeLatexPreamble.tex
+++ b/documentation/includes/EGOA_IpeLatexPreamble.tex
@@ -1,11 +1,11 @@
%
% EGOA_IpeLatexPreamble.tex
-%
+%
% Created on: Nov 11, 2017
% Author: Franziska Wegner
-%
+%
% Usepackages and includes that are used for mainly all ipe presentations.
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Usepackages
@@ -26,7 +26,7 @@
\usepackage{paralist}
\DeclareMathOperator{\lef}{\ell}
-\DeclareMathOperator{\rig}{r}
+\DeclareMathOperator{\rig}{r}
\usepackage{amsopn}
\usepackage{xargs} % Use more than one optional parameter in a new commands
@@ -83,7 +83,7 @@
\newcommand{\overleftrightsmallarrow}{\mathpalette{\overarrowsmall@\leftrightarrowfill@}}
\newcommand{\overrightsmallarrow}{\mathpalette{\overarrowsmall@\rightarrowfill@}}
\newcommand{\overleftsmallarrow}{\mathpalette{\overarrowsmall@\leftarrowfill@}}
-%
+%
\newcommand{\overarrowsmall@}[3]{%
\vbox{%
\ialign{%
@@ -102,7 +102,7 @@
\fi
}
\makeatother
-%
+%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Includes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -115,7 +115,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Problem Environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
\makeatletter
% \renewcommand\arraystretch{1.5}
\newenvironment{problem}[2][]{%
@@ -161,7 +161,7 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Algorithm Environment
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%
+%
\usepackage[titlenumbered, ruled, vlined, linesnumbered,resetcount]
{algorithm2e}%, dotocloa
\SetKwComment{Comment}{\color{KITblack30}$\triangleright$\ }{}
diff --git a/include/Algorithms/Centralities/BetweennessCentrality.hpp b/include/Algorithms/Centralities/BetweennessCentrality.hpp
index e1e3483c..5409edf3 100644
--- a/include/Algorithms/Centralities/BetweennessCentrality.hpp
+++ b/include/Algorithms/Centralities/BetweennessCentrality.hpp
@@ -30,7 +30,7 @@ enum class CentralityCounter {
* @f$c_{\sbc}\colon\edges\to\posreals@f$ is defined by
* @f[
* c_{\sbc} := \frac{1}{m_B}\sum_{\source\in\vertices}\sum_{\sink\in\vertices\setminus\{\source\}} \frac{\sigma_{\dtp}(\source,\sink,\edge)}{\sigma_{\dtp}(\source,\sink)},
- * @f]
+ * @f]
* where @f$\sigma_{\dtp}(\source,\sink,\edge)@f$ is the number of
* @f$\dtp{s}@f$ between @f$\source@f$ and @f$\sink@f$ that use the edge
* @f$\edge@f$, @f$\sigma_{\dtp}(\source,\sink)@f$ is the total number of
@@ -40,7 +40,7 @@ enum class CentralityCounter {
*
* @pre The template parameter used for GraphType should have an
* interface similar to StaticGraph or DynamicGraph. However, the minimum
- * requirements on the graph type are
+ * requirements on the graph type are
* - @p for_all_vertex_identifiers, and
* - see the minimum requirement of the PathFindingAlgorithm, e.g.,
* DominatingThetaPath.
@@ -53,7 +53,7 @@ enum class CentralityCounter {
* such as IO::DtpRuntimeCollection.
* @tparam CentralityCounterType The centrality counter decides whether
* to count edges or vertices.
- *
+ *
* @see StaticGraph
* @see DominatingThetaPath
* @see IO::DtpRuntimeCollection
@@ -61,8 +61,8 @@ enum class CentralityCounter {
*/
template< typename GraphType = StaticGraph< Vertices::ElectricalProperties
, Edges::ElectricalProperties >
- , typename PathFindingAlgorithm = DominatingThetaPath
- , typename MeasurementCollection = IO::DtpRuntimeCollection
+ , typename PathFindingAlgorithm = DominatingThetaPath
+ , typename MeasurementCollection = IO::DtpRuntimeCollection
, CentralityCounter CentralityCounterType = CentralityCounter::counterAtEdges > /**< Distinguish between counting edges or vertices. */
class BetweennessCentrality {
public:
@@ -98,7 +98,7 @@ class BetweennessCentrality {
*
* @param graph The const graph.
*/
- BetweennessCentrality ( TGraph const & graph )
+ BetweennessCentrality ( TGraph const & graph )
: countersSize_(0)
, graph_( graph )
#if defined(OPENMP_AVAILABLE)
@@ -107,7 +107,7 @@ class BetweennessCentrality {
, algo_( graph_ )
#endif
{}
-
+
/**
* @brief Destroys the object.
*/
@@ -118,7 +118,7 @@ class BetweennessCentrality {
///@name Execute the Betweenness Centrality Algorithm
///@{
#pragma mark EXECUTE_ALGORITHM
-
+
/**
* @brief Run the betweenness centrality.
* @details If OpenMP is available this method will run in
@@ -130,7 +130,7 @@ class BetweennessCentrality {
* https://en.cppreference.com/w/cpp/container .
*/
inline void Run ()
- {
+ {
TNumberOfPaths numberOfPaths;
TRelativeNumberOfPaths relativeNumberOfPaths;
@@ -147,9 +147,9 @@ class BetweennessCentrality {
Algorithm()[omp_get_thread_num()].NumberOfLabels();
TotalNumberOfPaths( numberOfPaths, relativeNumberOfPaths );
#ifdef EGOA_ENABLE_STATISTIC_BETWEENNESS_CENTRALITY // COLLECT RUNTIME INFORMATION
- #pragma omp critical
- { // More information concerning standard container
- // concurrency under "Thread safety":
+ #pragma omp critical
+ { // More information concerning standard container
+ // concurrency under "Thread safety":
// https://en.cppreference.com/w/cpp/container
Collection() += Algorithm()[omp_get_thread_num()].Statistic();
}
@@ -208,7 +208,7 @@ class BetweennessCentrality {
*
* @return The algorithm.
*/
- inline TAlgoHandling & Algorithm ()
+ inline TAlgoHandling & Algorithm ()
{
return algo_;
}
@@ -228,9 +228,9 @@ class BetweennessCentrality {
*
* @return A vector of measurements.
*/
- inline TMeasurementCollection const & Collection () const
+ inline TMeasurementCollection const & Collection () const
{
- return collection_;
+ return collection_;
}
/**
@@ -238,7 +238,7 @@ class BetweennessCentrality {
*
* @return A vector of measurements.
*/
- inline TMeasurementCollection & Collection ()
+ inline TMeasurementCollection & Collection ()
{
return collection_;
}
@@ -251,11 +251,11 @@ class BetweennessCentrality {
/**
* @brief Clears the measurement collection.
*/
- inline void Clear ()
+ inline void Clear ()
{
collection_.Clear();
- if ( CentralityCounterType == CentralityCounter::counterAtEdges )
+ if ( CentralityCounterType == CentralityCounter::counterAtEdges )
{
countersSize_ = graph_.NumberOfEdges();
} else {
@@ -285,7 +285,7 @@ class BetweennessCentrality {
*/
inline void JoinThreadBasedResults ( TNumberOfPaths const & numberOfPaths
, TRelativeNumberOfPaths const & relativeNumberOfPaths
- , Types::real const & m_BNormalization )
+ , Types::real const & m_BNormalization )
{
#ifdef OPENMP_AVAILABLE
ESSENTIAL_ASSERT ( totalRelativeNumberOfPaths_.size() == countersSize_ );
@@ -297,7 +297,7 @@ class BetweennessCentrality {
for ( Types::count counterThreads = 0
; counterThreads < omp_get_max_threads()
- ; ++counterThreads )
+ ; ++counterThreads )
{
for ( Types::count counterEdgesOrVertices = 0
; counterEdgesOrVertices < countersSize_
@@ -343,7 +343,7 @@ class BetweennessCentrality {
, TRelativeNumberOfPaths & relativeNumberOfPaths )
{
#ifdef OPENMP_AVAILABLE
- if ( CentralityCounterType == CentralityCounter::counterAtEdges )
+ if ( CentralityCounterType == CentralityCounter::counterAtEdges )
{
Algorithm()[ omp_get_thread_num() ].TotalNumberOfPathsThroughEdge ( numberOfPaths[ omp_get_thread_num() ]
, relativeNumberOfPaths[ omp_get_thread_num() ] );
@@ -352,7 +352,7 @@ class BetweennessCentrality {
, relativeNumberOfPaths[ omp_get_thread_num() ] );
}
#else
- if ( CentralityCounterType == CentralityCounter::counterAtEdges )
+ if ( CentralityCounterType == CentralityCounter::counterAtEdges )
{
Algorithm().TotalNumberOfPathsThroughEdge ( numberOfPaths, relativeNumberOfPaths );
} else {
@@ -373,13 +373,13 @@ class BetweennessCentrality {
* @param relativeNumberOfPaths The relative number of paths.
*/
inline void Clear ( TNumberOfPaths & numberOfPaths
- , TRelativeNumberOfPaths & relativeNumberOfPaths )
+ , TRelativeNumberOfPaths & relativeNumberOfPaths )
{
Clear();
#ifdef OPENMP_AVAILABLE
numberOfPaths.assign ( omp_get_max_threads(), std::vector ( countersSize_, 0 ) );
relativeNumberOfPaths.assign ( omp_get_max_threads(), std::vector ( countersSize_, 0.0 ) );
-#else
+#else
numberOfPaths.assign ( countersSize_, 0 );
relativeNumberOfPaths.assign ( countersSize_, 0.0 );
#endif
@@ -392,7 +392,7 @@ class BetweennessCentrality {
TGraph const & graph_; /**< The graph @f$\graph = (\vertices,\edges)@f$ on which the DTP is calculated. */
TAlgoHandling algo_; /**< Multiple path finding algorithm are used for the parallelization. */
TMeasurementCollection collection_; /**< The collection of measurements. */
-
+
std::vector totalRelativeNumberOfPaths_; /**< */
std::vector totalNumberOfPaths_; /**< */
};
diff --git a/include/Algorithms/Centralities/GeneratorBasedBetweennessCentrality.hpp b/include/Algorithms/Centralities/GeneratorBasedBetweennessCentrality.hpp
index 66610a6d..2e538319 100644
--- a/include/Algorithms/Centralities/GeneratorBasedBetweennessCentrality.hpp
+++ b/include/Algorithms/Centralities/GeneratorBasedBetweennessCentrality.hpp
@@ -26,7 +26,7 @@ namespace egoa {
* @f$c_{\scu}\colon\edges\to\posreals@f$ is defined by
* @f[
* c_{\scu} := \frac{1}{m_B}\sum_{\source\in\generators}\sum_{\sink\in\consumers} \frac{\omega_{\dtp}(\source,\sink,\edge)}{\omega_{\dtp}(\source,\sink)},
- * @f]
+ * @f]
* where @f$\omega_{\dtp}(\source,\sink,\edge)@f$ is the number of
* @f$\dtp@f$-paths between @f$\source@f$ and @f$\sink@f$ that use the edge
* @f$\edge@f$, @f$\omega_{\dtp}(\source,\sink)@f$ is the total number of
@@ -36,7 +36,7 @@ namespace egoa {
*
* @pre The template parameter used for NetworkType should have an
* interface similar to the PowerGrid. However, the minimum
- * requirements on the network type are
+ * requirements on the network type are
* - for_all_generator_identifiers, and
* - for the included graph see the minimum requirement of the
* PathFindingAlgorithm, e.g., DominatingThetaPath.
@@ -49,7 +49,7 @@ namespace egoa {
* such as IO::DtpRuntimeCollection.
* @tparam CentralityCounterType The centrality counter decides whether
* to count edges or vertices.
- *
+ *
* @see BetweennessCentrality
* @see PowerGrid
* @see DominatingThetaPath
@@ -60,13 +60,13 @@ template< typename NetworkType = PowerGrid< StaticGraph< Ve
, Edges::ElectricalProperties >
, Vertices::GeneratorProperties<>
, Vertices::LoadProperties >
- , typename PathFindingAlgorithm = DominatingThetaPath
- , typename MeasurementCollection = IO::DtpRuntimeCollection
+ , typename PathFindingAlgorithm = DominatingThetaPath
+ , typename MeasurementCollection = IO::DtpRuntimeCollection
, CentralityCounter CentralityCounterType = CentralityCounter::counterAtEdges > /**< Distinguish between counting edges or vertices. */
class GeneratorBasedBetweennessCentrality final : public BetweennessCentrality < typename NetworkType::TGraph
, PathFindingAlgorithm
, MeasurementCollection
- , CentralityCounterType >
+ , CentralityCounterType >
{
public:
#pragma mark TYPE_ALIASING
@@ -84,11 +84,11 @@ class GeneratorBasedBetweennessCentrality final : public BetweennessCentrality <
///@name Constructors and Destructor
///@{
#pragma mark CONSTRUCTORS_AND_DESTRUCTORS
- GeneratorBasedBetweennessCentrality ( TNetwork const & network )
+ GeneratorBasedBetweennessCentrality ( TNetwork const & network )
: TBetweennessCentrality( network.Graph() )
, network_( network )
{}
-
+
/**
* @brief Destroys the object.
*/
@@ -99,7 +99,7 @@ class GeneratorBasedBetweennessCentrality final : public BetweennessCentrality <
///@name Execute the Betweenness Centrality Algorithm
///@{
#pragma mark EXECUTE_ALGORITHM
-
+
/**
* @brief Run the generator-based betweenness centrality.
* @details If OpenMP is available this method will run in
@@ -111,13 +111,13 @@ class GeneratorBasedBetweennessCentrality final : public BetweennessCentrality <
* https://en.cppreference.com/w/cpp/container .
*/
inline void Run ()
- {
+ {
TNumberOfPaths numberOfPaths;
TRelativeNumberOfPaths relativeNumberOfPaths;
this->Clear ( numberOfPaths, relativeNumberOfPaths );
- network_.template for_all_vertex_identifiers_with_generator ( [
+ network_.template for_all_vertex_identifiers_with_generator ( [
this
, & numberOfPaths
, & relativeNumberOfPaths ] ( TGeneratorId vertexId )
@@ -130,9 +130,9 @@ class GeneratorBasedBetweennessCentrality final : public BetweennessCentrality <
this->TotalNumberOfPaths( numberOfPaths, relativeNumberOfPaths );
#ifdef EGOA_ENABLE_STATISTIC_BETWEENNESS_CENTRALITY // COLLECT RUNTIME INFORMATION
- #pragma omp critical
- { // More information concerning standard container
- // concurrency under "Thread safety":
+ #pragma omp critical
+ { // More information concerning standard container
+ // concurrency under "Thread safety":
// https://en.cppreference.com/w/cpp/container
this->Algorithm()[omp_get_thread_num()].Statistic().NumberOfGenerators = network_.NumberOfGenerators();
this->Algorithm()[omp_get_thread_num()].Statistic().NumberOfLoads = network_.NumberOfLoads();
diff --git a/include/Algorithms/GraphTraversal/ArticulationVertexDetection.hpp b/include/Algorithms/GraphTraversal/ArticulationVertexDetection.hpp
index 60269504..7ad56bea 100644
--- a/include/Algorithms/GraphTraversal/ArticulationVertexDetection.hpp
+++ b/include/Algorithms/GraphTraversal/ArticulationVertexDetection.hpp
@@ -9,7 +9,7 @@
#include "Algorithms/GraphTraversal/DepthFirstSearch.hpp"
-namespace egoa {
+namespace egoa {
/**
* @brief Class to find articulation vertices.
@@ -66,7 +66,7 @@ class ArticulationVertexDetection : public DepthFirstSearchEntryTimeAt( vertex );
}
@@ -125,10 +125,10 @@ class ArticulationVertexDetection : public DepthFirstSearch 1);
@@ -151,7 +151,7 @@ class ArticulationVertexDetection : public DepthFirstSearch 1 ) {
// root articulation point
return true;
@@ -173,9 +173,9 @@ class ArticulationVertexDetection : public DepthFirstSearchParentOf ( vertex ) == OldestReachableAncestor ( vertex )
- && !IsRoot ( this->ParentOf( vertex ) )
- )
+ if ( this->ParentOf ( vertex ) == OldestReachableAncestor ( vertex )
+ && !IsRoot ( this->ParentOf( vertex ) )
+ )
{
return true;
}
@@ -198,7 +198,7 @@ class ArticulationVertexDetection : public DepthFirstSearch IsBridgeArticulationVertexAt ( TVertexId const vertex ) const {
if ( vertex == OldestReachableAncestor ( vertex ) ) {
- if ( TreeOutDegree ( vertex ) > 0 )
+ if ( TreeOutDegree ( vertex ) > 0 )
{ // The vertex is not a leaf
return std::make_pair(true,true);
}
@@ -235,7 +235,7 @@ class ArticulationVertexDetection : public DepthFirstSearch timeOfOldestReachableAncestor_; /**< Oldest reachable ancestor representing the vertex closest to the root */
std::vector treeOutDegree_; /**< Number of outgoing DFS tree edges per vertex */
std::vector isArticulationVertex_; /**< Whether the vertex is an articulation vertex */
diff --git a/include/Algorithms/GraphTraversal/BreadthFirstSearch.hpp b/include/Algorithms/GraphTraversal/BreadthFirstSearch.hpp
index e4710a07..6638d750 100644
--- a/include/Algorithms/GraphTraversal/BreadthFirstSearch.hpp
+++ b/include/Algorithms/GraphTraversal/BreadthFirstSearch.hpp
@@ -33,7 +33,7 @@ namespace egoa {
* @tparam IsDirected If @p true the graph is treated as a directed graph,
* if @p false the graph is treated as an undirected graph.
*/
-template< typename GraphType = StaticGraph,Edges::ElectricalProperties>
+template< typename GraphType = StaticGraph,Edges::ElectricalProperties>
, typename QueueType = StdQueue
, bool IsDirected= false >
class BFS final : Traversal {
@@ -56,7 +56,7 @@ class BFS final : Traversal {
*/
virtual inline void Run() {
ESSENTIAL_ASSERT ( queue_.Empty() );
-
+
EnqueueVertexWith ( source_ );
SetVertexVisitedAt ( source_ );
diff --git a/include/Algorithms/GraphTraversal/CycleDetection.hpp b/include/Algorithms/GraphTraversal/CycleDetection.hpp
index 53df45c3..afcb4772 100644
--- a/include/Algorithms/GraphTraversal/CycleDetection.hpp
+++ b/include/Algorithms/GraphTraversal/CycleDetection.hpp
@@ -9,7 +9,7 @@
#include "Algorithms/GraphTraversal/DepthFirstSearch.hpp"
-namespace egoa {
+namespace egoa {
/**
* @brief Class to detect a cycle in the graph.
@@ -45,7 +45,7 @@ class CycleDetection final : public DFS {
virtual inline void ProcessingEdgeWith ( TVertex const source
, TVertex const target ) override
{
- if ( source != ParentOf ( target ) ) {
+ if ( source != ParentOf ( target ) ) {
ExtractPath ( source, target );
SetTerminate();
}
diff --git a/include/Algorithms/GraphTraversal/DepthFirstSearch.hpp b/include/Algorithms/GraphTraversal/DepthFirstSearch.hpp
index 576bc142..f95d20a6 100644
--- a/include/Algorithms/GraphTraversal/DepthFirstSearch.hpp
+++ b/include/Algorithms/GraphTraversal/DepthFirstSearch.hpp
@@ -41,7 +41,7 @@ class DepthFirstSearch : public Traversal {
///@name Constructors and destructor
///@{
#pragma mark CONSTRUCTOR_AND_DESTRUCTOR
-
+
/**
* @brief Constructs a new DFS instance.
*
@@ -75,7 +75,7 @@ class DepthFirstSearch : public Traversal {
PreprocessingVertexWith ( source );
this->breakable_for_all_edges_at ( source,
- [source, &dfs, this]( typename GraphType::TEdge const & edge )
+ [source, &dfs, this]( typename GraphType::TEdge const & edge )
{
TVertexId target = edge.Other ( source );
@@ -84,11 +84,11 @@ class DepthFirstSearch : public Traversal {
bool targetVisited = this->VisitedVertexAt( target );
- if ( !targetVisited )
+ if ( !targetVisited )
{
this->ParentOf( target ) = source;
dfs ( target, dfs );
- } else /* not processed */
+ } else /* not processed */
{ // Cycle edge
ProcessingEdgeWith( source, target, edge.Identifier() );
}
@@ -121,35 +121,35 @@ class DepthFirstSearch : public Traversal {
* @param[in] target The target identifier.
*
* @return The DFS edge type.
- *
+ *
* @todo Cross edge is only possible in directed case -> check for graph type
*/
- inline DfsEdgeType TypifyEdge ( TVertexId source, TVertexId target )
+ inline DfsEdgeType TypifyEdge ( TVertexId source, TVertexId target )
{
// Tree edge
- if ( source == this->ParentOf ( target ) )
+ if ( source == this->ParentOf ( target ) )
{
return DfsEdgeType::tree;
}
-
+
// Backward edge
- if ( this->VisitedVertexAt ( target )
- && !this->ProcessedVertexAt ( target ) )
+ if ( this->VisitedVertexAt ( target )
+ && !this->ProcessedVertexAt ( target ) )
{
return DfsEdgeType::backward;
}
-
+
// Forward edge
- if ( this->ProcessedVertexAt ( target )
- && EntryTimeAt ( target ) > EntryTimeAt ( source ) )
+ if ( this->ProcessedVertexAt ( target )
+ && EntryTimeAt ( target ) > EntryTimeAt ( source ) )
{
return DfsEdgeType::forward;
}
-
+
// Cross edge
- if ( this->ProcessedVertexAt ( target )
+ if ( this->ProcessedVertexAt ( target )
&& EntryTimeAt ( target ) < EntryTimeAt ( source ) ) return DfsEdgeType::cross;
-
+
// None of them -> should not happening
ESSENTIAL_ASSERT( false && "DFS edge type is none." );
}
@@ -159,7 +159,7 @@ class DepthFirstSearch : public Traversal {
/**
* @brief Terminate the DFS
*
- * @return TRUE if the DFS
+ * @return TRUE if the DFS
*/
inline bool Terminate() const { return terminate_; }
inline void SetTerminate() { terminate_ = true; }
@@ -185,9 +185,9 @@ class DepthFirstSearch : public Traversal {
*
* @return { description_of_the_return_value }
*/
- inline TTime EntryTimeAt ( TVertexId vertexId ) const
- {
- return entryTime_[vertexId];
+ inline TTime EntryTimeAt ( TVertexId vertexId ) const
+ {
+ return entryTime_[vertexId];
}
/**
@@ -197,15 +197,15 @@ class DepthFirstSearch : public Traversal {
*
* @return The exit time for a vertex during the DFS.
*/
- inline TTime ExitTimeAt ( TVertexId const vertexId ) const
- {
- return exitTime_[vertexId];
+ inline TTime ExitTimeAt ( TVertexId const vertexId ) const
+ {
+ return exitTime_[vertexId];
}
//exact behavior of the Depth-First Search (DFS) depends on the processing methods
#pragma mark FURTHER_PROCESSING
-
+
/**
* @brief Preprocessing the vertex with @p vertexId.
*
@@ -218,9 +218,9 @@ class DepthFirstSearch : public Traversal {
*/
// template
virtual
- inline
+ inline
void PreprocessingVertexWith ( TVertexId vertexId
- // , FUNCTION function
+ // , FUNCTION function
)
{
// function ( vertexId );
@@ -238,22 +238,22 @@ class DepthFirstSearch : public Traversal {
*/
// template
virtual
- inline
+ inline
void PostprocessingVertexWith ( TVertexId vertexId
- // , FUNCTION function
- )
+ // , FUNCTION function
+ )
{
// function ( vertexId );
}
// template
virtual
- inline
+ inline
void ProcessingEdgeWith ( TVertexId source
, TVertexId target
- , Types::edgeId edgeId
- // , FUNCTION function
- )
+ , Types::edgeId edgeId
+ // , FUNCTION function
+ )
{
// function ( source, target, edgeId );
}
@@ -270,12 +270,12 @@ class DepthFirstSearch : public Traversal {
*/
// template
virtual
- inline
+ inline
void PostprocessingEdgeWith ( TVertexId source
, TVertexId target
- , Types::edgeId edgeId
- // , FUNCTION function
- )
+ , Types::edgeId edgeId
+ // , FUNCTION function
+ )
{
// function ( source, target, edgeId );
}
@@ -291,4 +291,4 @@ class DepthFirstSearch : public Traversal {
} // namespace egoa
-#endif // EGOA__ALGORITHMS__GRAPH_TRAVERSAL__DEPTH_FIRST_SEARCH__HPP
\ No newline at end of file
+#endif // EGOA__ALGORITHMS__GRAPH_TRAVERSAL__DEPTH_FIRST_SEARCH__HPP
diff --git a/include/Algorithms/GraphTraversal/Traversal.hpp b/include/Algorithms/GraphTraversal/Traversal.hpp
index 2a513cbf..4e9c66cb 100644
--- a/include/Algorithms/GraphTraversal/Traversal.hpp
+++ b/include/Algorithms/GraphTraversal/Traversal.hpp
@@ -31,7 +31,7 @@ class GraphTypeLoopDifferentiation;
* @tparam IsDirected If @p true the graph is treated as a directed graph,
* if @p false the graph is treated as an undirected graph.
*/
-template< typename GraphType,
+template< typename GraphType,
bool IsDirected = false >
class Traversal {
public:
@@ -41,7 +41,7 @@ class Traversal {
///@name Constructors and destructor
///@{
#pragma mark CONSTRUCTOR_AND_DESTRUCTOR
-
+
/**
* @brief Constructs a new instance.
*
@@ -70,7 +70,7 @@ class Traversal {
///@}
#pragma mark RESULT_EXTRACTION
- virtual inline void Result ( std::vector parent )
+ virtual inline void Result ( std::vector parent )
{
// @todo Implement, see MST
throw std::runtime_error("Not implemented yet!");
@@ -86,7 +86,7 @@ class Traversal {
*
* @param[in] vertexId The vertex identifier.
*/
- inline void SetVertexVisitedAt ( TVertexId vertexId )
+ inline void SetVertexVisitedAt ( TVertexId vertexId )
{
USAGE_ASSERT ( graph_.VertexExists ( vertexId ) );
visited_[vertexId] = true;
@@ -101,10 +101,10 @@ class Traversal {
*
* @return @p true if the vertex was visited, otherwise @p false.
*/
- inline bool VisitedVertexAt ( TVertexId vertexId ) const
+ inline bool VisitedVertexAt ( TVertexId vertexId ) const
{
USAGE_ASSERT ( graph_.VertexExists ( vertexId ) );
- return visited_[vertexId];
+ return visited_[vertexId];
}
///@}
@@ -116,7 +116,7 @@ class Traversal {
*
* @param[in] vertexId The vertex identifier.
*/
- inline void SetVertexProcessedAt ( TVertexId vertexId )
+ inline void SetVertexProcessedAt ( TVertexId vertexId )
{
USAGE_ASSERT ( graph_.VertexExists ( vertexId ) );
processed_[vertexId] = true;
@@ -132,10 +132,10 @@ class Traversal {
*
* @return @p true if the vertex is processed, otherwise @p false.
*/
- inline bool ProcessedVertexAt ( TVertexId vertexId ) const
+ inline bool ProcessedVertexAt ( TVertexId vertexId ) const
{
USAGE_ASSERT ( graph_.VertexExists ( vertexId ) );
- return processed_[vertexId];
+ return processed_[vertexId];
}
///@}
@@ -149,16 +149,16 @@ class Traversal {
* @return The vertex identifier of the parent.
*/
///@{
- inline TVertexId & ParentOf ( TVertexId vertexId )
+ inline TVertexId & ParentOf ( TVertexId vertexId )
{
USAGE_ASSERT ( graph_.VertexExists ( vertexId ) );
- return parent_[vertexId];
+ return parent_[vertexId];
}
- inline TVertexId ParentOf ( TVertexId vertexId ) const
+ inline TVertexId ParentOf ( TVertexId vertexId ) const
{
USAGE_ASSERT ( graph_.VertexExists ( vertexId ) );
- return parent_[vertexId];
+ return parent_[vertexId];
}
///@}
@@ -178,7 +178,7 @@ class Traversal {
/**
* @brief Clear and resize all vectors
*/
- inline void Clear ()
+ inline void Clear ()
{
visited_.clear ();
visited_.resize ( graph_.NumberOfVertices(), false );
@@ -190,12 +190,12 @@ class Traversal {
parent_.resize ( graph_.NumberOfVertices(), Const::NONE );
}
- inline bool VertexExists ( TVertexId vertexId )
+ inline bool VertexExists ( TVertexId vertexId )
{
return graph_.VertexExists ( vertexId );
}
- inline bool NumberOfVertices()
+ inline bool NumberOfVertices()
{
return graph_.NumberOfVertices ( );
}
@@ -217,8 +217,8 @@ class Traversal {
*
* @code{.cpp}
* breakable_for_all_edges_at(
- * []( TEdge const & edge )
- * {
+ * []( TEdge const & edge )
+ * {
* // Do something with the edge object.
* }
* );
@@ -240,16 +240,16 @@ class Traversal {
*
* @param vertexId The vertex identifier.
* @param[in] function The function
- *
+ *
* @code{.cpp}
* for_all_edges_at ( vertexId
- * , []( TEdge const & edge )
- * {
+ * , []( TEdge const & edge )
+ * {
* // Do something with the edge object.
* }
* );
* @endcode
- *
+ *
* @tparam FUNCTION The function object that is called for
* all incident (outgoing) edges at @p vertexId.
*/
@@ -288,19 +288,19 @@ class GraphTypeLoopDifferentiation< GraphType, true > {
public:
template
- static inline
+ static inline
void breakable_for_all_edges_at ( TGraph const & graph
, TVertexId const & vertex
- , FUNCTION function )
+ , FUNCTION function )
{
graph.template for_out_edges_at ( vertex, function );
}
template
- static inline
+ static inline
void for_all_edges_at ( TGraph const & graph
, TVertexId const & vertex
- , FUNCTION function )
+ , FUNCTION function )
{
graph.template for_out_edges_at ( vertex, function );
}
@@ -316,19 +316,19 @@ class GraphTypeLoopDifferentiation< GraphType, false > {
public:
template
- static inline
+ static inline
void breakable_for_all_edges_at ( TGraph const & graph
, TVertexId const & vertex
- , FUNCTION function )
+ , FUNCTION function )
{
graph.template for_all_edges_at ( vertex, function );
}
template
- static inline
+ static inline
void for_all_edges_at ( TGraph & graph
, TVertexId const & vertex
- , FUNCTION function )
+ , FUNCTION function )
{
graph.template for_all_edges_at ( vertex, function );
}
diff --git a/include/Algorithms/PathFinding/DominatingThetaPath.hpp b/include/Algorithms/PathFinding/DominatingThetaPath.hpp
index 1ecca995..15d44d8c 100644
--- a/include/Algorithms/PathFinding/DominatingThetaPath.hpp
+++ b/include/Algorithms/PathFinding/DominatingThetaPath.hpp
@@ -120,20 +120,20 @@ class DominatingThetaPath final {
Auxiliary::Timer dtpTime;
- while ( !QueueEmpty() )
+ while ( !QueueEmpty() )
{ // Q != {}
TLabel const label = QueueDeleteMinimum();
const TVertexId u = label.Vertex();
ESSENTIAL_ASSERT ( u < graph_.NumberOfVertices() );
// For all incident edges
- graph_.template for_all_edges_at( u,
- [&]( TEdge const & edge )
+ graph_.template for_all_edges_at( u,
+ [&]( TEdge const & edge )
{
ESSENTIAL_ASSERT ( u < graph_.NumberOfVertices() );
-
+
TVertexId v = edge.Other(u);
-
+
ESSENTIAL_ASSERT ( v < graph_.NumberOfVertices() );
#ifdef EGOA_ENABLE_STATISTIC_DTP // NUMBER OF SCANNED EDGES -> TOTAL NUMBER
@@ -142,7 +142,7 @@ class DominatingThetaPath final {
TLabel newlabel;
if ( ProduceCycle( newlabel, label + edge ) ) return;
- SetParentOf( newlabel, label );
+ SetParentOf( newlabel, label );
#ifdef EGOA_ENABLE_STATISTIC_DTP // NUMBER OF EDGES NOT PRODUCING A CYCLE
++dtpRuntimeRow_.NumberOfEdgesProducingNoCycle;
@@ -166,7 +166,7 @@ class DominatingThetaPath final {
// std::cout << std::endl << dtpRuntimeRow_ << std::endl;
std::cout << "Number of relaxed edges: " << dtpRuntimeRow_.NumberOfRelaxedEdges << std::endl;
std::cout << "Number of labels: " << dtpRuntimeRow_.NumberOfLabels << std::endl<< std::endl;
- // ESSENTIAL_ASSERT ( ( 1 + dtpRuntimeRow_.NumberOfRelaxedEdges )
+ // ESSENTIAL_ASSERT ( ( 1 + dtpRuntimeRow_.NumberOfRelaxedEdges )
// == dtpRuntimeRow_.NumberOfLabels );
#endif
}
@@ -213,22 +213,22 @@ class DominatingThetaPath final {
ESSENTIAL_ASSERT ( graph_.VertexExists( vertexId ) );
- if ( !isVertexInSubgraph[vertexId] )
+ if ( !isVertexInSubgraph[vertexId] )
{
isVertexInSubgraph[vertexId] = true;
vertices.push_back(vertexId);
}
- if ( label.PreviousVertex() != Const::NONE )
+ if ( label.PreviousVertex() != Const::NONE )
{ // @todo multiple edges? It would be easier if the labels stored edges
Types::edgeId edge = graph_.EdgeId ( vertexId, label.PreviousVertex() );
- if ( edge == Const::NONE )
+ if ( edge == Const::NONE )
{
edge = graph_.EdgeId ( label.PreviousVertex(), vertexId );
ESSENTIAL_ASSERT( edge != Const::NONE );
}
- if (!isEdgeInSubgraph[edge])
+ if (!isEdgeInSubgraph[edge])
{
isEdgeInSubgraph[edge] = true;
edges.push_back(edge);
@@ -258,9 +258,9 @@ class DominatingThetaPath final {
* @return The optimal value.
*/
inline Types::real Result ( std::vector> & parent
- , TVertexId const target )
+ , TVertexId const target )
{
- USAGE_ASSERT ( graph_.VertexExists( target ) );
+ USAGE_ASSERT ( graph_.VertexExists( target ) );
// Iterate over all optima
Types::real result = \
@@ -268,17 +268,17 @@ class DominatingThetaPath final {
{
// Add a row for another label path from target t
parent.emplace_back( std::vector() );
-
+
// Define function pointer for recursive call
std::function FindPath;
-
+
// Construct path from the source to the sink
- FindPath = [this, &FindPath, & parent = parent] ( TLabel const & label )
+ FindPath = [this, &FindPath, & parent = parent] ( TLabel const & label )
{
- if ( ( Const::NONE == label.PreviousVertex() ) )
+ if ( ( Const::NONE == label.PreviousVertex() ) )
{
parent.back().emplace_back ( label.Vertex() );
- } else
+ } else
{
TVertexId vertexId = label.Vertex();
@@ -293,15 +293,15 @@ class DominatingThetaPath final {
}
/**
- * @brief Current number of labels
+ * @brief Current number of labels
*
* @return Total number of labels
*/
- inline Types::count NumberOfLabels ()
+ inline Types::count NumberOfLabels ()
{
Types::count numberOfLabels = 0;
- for ( TLabelSet const & labelSet : labelSets_ )
+ for ( TLabelSet const & labelSet : labelSets_ )
{
numberOfLabels += labelSet.Size();
}
@@ -318,7 +318,7 @@ class DominatingThetaPath final {
*
* @param[in] source The source
*/
- inline void Source ( TVertexId source )
+ inline void Source ( TVertexId source )
{
USAGE_ASSERT ( source < labelSets_.size() );
Clear();
@@ -333,7 +333,7 @@ class DominatingThetaPath final {
/**
* @brief Clear all data structures.
*/
- inline void Clear()
+ inline void Clear()
{
labelSets_.clear();
labelSets_.assign( graph_.NumberOfVertices(), TLabelSet() );
@@ -349,7 +349,7 @@ class DominatingThetaPath final {
*
* @return The current statistic representing a row.
*/
- inline IO::DtpRuntimeRow & Statistic ()
+ inline IO::DtpRuntimeRow & Statistic ()
{
return dtpRuntimeRow_;
}
@@ -396,11 +396,11 @@ class DominatingThetaPath final {
* @param numberOfPaths The number of paths. (Note that this
* field will be resized to the number of vertices in the
* graph if not already done.)
- *
+ *
* @todo Use DAG property of label paths.
*/
inline void NumberOfPathsThroughVertex ( TVertexId target
- , std::vector & numberOfPathsPerVertex
+ , std::vector & numberOfPathsPerVertex
, std::vector & relativeNumberOfPathsPerVertex )
{
//@todo This is inefficient.
@@ -409,7 +409,7 @@ class DominatingThetaPath final {
numberOfPathsPerVertex.resize( graph_.NumberOfVertices(), 0 );
- labelSets_[target].for_all_optima (
+ labelSets_[target].for_all_optima (
[&]( TLabel const & optLabel )
{
Types::labelId labelId = optLabel.Index();
@@ -429,7 +429,7 @@ class DominatingThetaPath final {
vertexId = label.PreviousVertex();
labelId = label.PreviousLabel();
- } while ( labelId != Const::NONE
+ } while ( labelId != Const::NONE
&& vertexId != Const::NONE );
}
); // For all labels in DTP at target vertex
@@ -465,12 +465,12 @@ class DominatingThetaPath final {
* field will be resized).
* @param relativeNumberOfPathsPerEdge The edge score per thread (if we
* run the algorithm parallel).
- *
+ *
* @todo Use DAG property of label paths.
*/
inline void NumberOfPathsThroughEdge ( TVertexId target
, std::vector & numberOfPathsPerEdge
- , std::vector & relativeNumberOfPathsPerEdge )
+ , std::vector & relativeNumberOfPathsPerEdge )
{
//@todo This is inefficient.
Types::count numberOfOptimalLabels = LabelSetAt(target).Optima().size(); // Divide by this value
@@ -485,16 +485,16 @@ class DominatingThetaPath final {
TLabel & label = LabelAt( vertexId, labelId );
labelId = label.Index();
- if ( ( label.PreviousLabel() == Const::NONE )
- || ( label.PreviousVertex() == Const::NONE )
- || ( vertexId == Const::NONE )
+ if ( ( label.PreviousLabel() == Const::NONE )
+ || ( label.PreviousVertex() == Const::NONE )
+ || ( vertexId == Const::NONE )
) break; // Label is already on path
// Increase number of paths at "edgeId"
- TEdgeId edgeId = ( graph_.EdgeId( label.PreviousVertex(), vertexId ) != Const::NONE )
- ? graph_.EdgeId( label.PreviousVertex(), vertexId )
+ TEdgeId edgeId = ( graph_.EdgeId( label.PreviousVertex(), vertexId ) != Const::NONE )
+ ? graph_.EdgeId( label.PreviousVertex(), vertexId )
: graph_.EdgeId( vertexId, label.PreviousVertex() );
-
+
ESSENTIAL_ASSERT ( edgeId != Const::NONE );
++numberOfPathsPerEdge[edgeId];
@@ -505,12 +505,12 @@ class DominatingThetaPath final {
vertexId = label.PreviousVertex();
labelId = label.PreviousLabel();
- } while ( labelId != Const::NONE
+ } while ( labelId != Const::NONE
&& vertexId != Const::NONE );
}); // For all labels in DTP at target vertex
}
///@}
-
+
private:
///@name Accessors
///@{
@@ -523,12 +523,12 @@ class DominatingThetaPath final {
*
* @return The vertex identifier.
*/
- inline TVertexId VertexIdOf ( TLabel const & label ) const
- {
+ inline TVertexId VertexIdOf ( TLabel const & label ) const
+ {
USAGE_ASSERT ( !label.Empty() );
- return label.Vertex();
+ return label.Vertex();
}
-
+
/**
* @brief Getter for the set of labels @f$\labels(\vertex)@f$ of a vertex @f$\vertex@f$.
*
@@ -536,10 +536,10 @@ class DominatingThetaPath final {
*
* @return The set of labels @f$\labels(\vertex)@f$ for the @p vertex.
*/
- inline TLabelSet const & LabelSetAt ( TVertexId const vertexId ) const
- {
- USAGE_ASSERT ( vertexId < labelSets_.size() );
- return labelSets_[vertexId];
+ inline TLabelSet const & LabelSetAt ( TVertexId const vertexId ) const
+ {
+ USAGE_ASSERT ( vertexId < labelSets_.size() );
+ return labelSets_[vertexId];
}
/**
@@ -551,10 +551,10 @@ class DominatingThetaPath final {
* @return The set of labels @f$\labels(\vertex)@f$ for the @p
* vertex.
*/
- inline TLabelSet & LabelSetAt ( TVertexId const vertexId )
- {
- USAGE_ASSERT ( vertexId < labelSets_.size() );
- return labelSets_[vertexId];
+ inline TLabelSet & LabelSetAt ( TVertexId const vertexId )
+ {
+ USAGE_ASSERT ( vertexId < labelSets_.size() );
+ return labelSets_[vertexId];
}
/**
@@ -567,10 +567,10 @@ class DominatingThetaPath final {
* @return The label @f$\labelu@f$.
*/
inline TLabel & LabelAt ( TVertexId const vertexId
- , Types::labelId const labelId )
+ , Types::labelId const labelId )
{
- USAGE_ASSERT ( vertexId < labelSets_.size() );
- USAGE_ASSERT ( labelId < Const::NONE );
+ USAGE_ASSERT ( vertexId < labelSets_.size() );
+ USAGE_ASSERT ( labelId < Const::NONE );
return labelSets_[vertexId].ElementAt ( labelId );
}
@@ -585,23 +585,23 @@ class DominatingThetaPath final {
*
* @return @p True if the main queue is empty, @p False otherwise.
*/
- inline bool QueueEmpty() const
- {
- return queue_.Empty();
+ inline bool QueueEmpty() const
+ {
+ return queue_.Empty();
}
/**
* @brief Adds a label to the main queue.
- *
+ *
* @pre A precondition to that method is that the label set of
* the label's @p label vertex was updated. Thus, this method
* should only be called by #UpdateLabelSet() or #UpdateLabelSetAt().
*
* @param label The label.
*/
- inline void Insert( TLabel const & label )
- {
- queue_.Emplace( label.Vertex(), label );
+ inline void Insert( TLabel const & label )
+ {
+ queue_.Emplace( label.Vertex(), label );
}
/**
@@ -615,12 +615,12 @@ class DominatingThetaPath final {
*
* @param newLabel The new label @f$\labelu_{\mathrm{new}}@f$.
*/
- inline void UpdateQueueWith ( TLabel const & newLabel )
+ inline void UpdateQueueWith ( TLabel const & newLabel )
{
- if ( !queue_.HasKeyOf ( newLabel.Vertex() ) )
+ if ( !queue_.HasKeyOf ( newLabel.Vertex() ) )
{ // There is no label of vertex v in the queue
Insert ( newLabel );
- } else if ( queue_.KeyOf( newLabel.Vertex() ) > newLabel )
+ } else if ( queue_.KeyOf( newLabel.Vertex() ) > newLabel )
{ // The new label is better than the existing one
queue_.ChangeKey ( newLabel.Vertex(), newLabel );
}
@@ -633,23 +633,23 @@ class DominatingThetaPath final {
* the main queue).
*
* @return Label that has the minimum key
- *
+ *
* @see TQueue
*/
- inline TLabel QueueDeleteMinimum ()
- {
+ inline TLabel QueueDeleteMinimum ()
+ {
USAGE_ASSERT ( !queue_.Empty() );
TVertexId vertexId;
TLabel label;
- std::tie ( vertexId, label ) = queue_.DeleteTop();
-
+ std::tie ( vertexId, label ) = queue_.DeleteTop();
+
ESSENTIAL_ASSERT ( !LabelSetEmptyAt(vertexId) );
label.Index() = UpdateLabelSetAt ( vertexId );
- return label;
- }
+ return label;
+ }
/**
* @brief Check if a label set @f$\labels(\vertex)@f$ is
@@ -659,10 +659,10 @@ class DominatingThetaPath final {
*
* @return @p True if the label set is empty, @p False otherwise.
*/
- inline bool LabelSetEmptyAt( TVertexId const vertexId ) const
- {
- USAGE_ASSERT ( vertexId < labelSets_.size() );
- return labelSets_[vertexId].EmptyQueue();
+ inline bool LabelSetEmptyAt( TVertexId const vertexId ) const
+ {
+ USAGE_ASSERT ( vertexId < labelSets_.size() );
+ return labelSets_[vertexId].EmptyQueue();
}
/**
@@ -674,11 +674,11 @@ class DominatingThetaPath final {
* @return @p True if the label set @f$\labels(\vertex)@f$ is
* empty, @p False otherwise.
*/
- inline bool LabelSetEmptyAt( TLabel const & label ) const
- {
+ inline bool LabelSetEmptyAt( TLabel const & label ) const
+ {
USAGE_ASSERT ( !label.Empty() );
- return LabelSetEmptyAt( VertexIdOf ( label ) );
- }
+ return LabelSetEmptyAt( VertexIdOf ( label ) );
+ }
/**
* @brief Update a label set @f$\labels(\vertex)@f$ at a vertex @f$\vertex@f$.
@@ -687,19 +687,19 @@ class DominatingThetaPath final {
* update (#labelSet.Pop()) of the label set
* @f$\labels(\vertex)@f$ at a vertex
* @f$\vertex@f$.
- *
+ *
* @pre As a precondition #QueueDeleteMinimum() has to be
* called.
*
* @param labelSet The label set @f$\labels(\vertex)@f$ at a
* vertex @f$\vertex@f$.
*/
- inline Types::labelId UpdateLabelSet ( TLabelSet & labelSet )
- {
+ inline Types::labelId UpdateLabelSet ( TLabelSet & labelSet )
+ {
USAGE_ASSERT ( !labelSet.Empty() );
Types::labelId labelId = labelSet.Pop();
-
+
if ( ! labelSet.EmptyQueue() ) {
Insert ( labelSet.Top() );
}
@@ -713,17 +713,17 @@ class DominatingThetaPath final {
* vertex @f$\vertex@f$ from the queue has to trigger an
* update (#labelSet.Pop()) of the label bucket at vertex
* @f$\vertex@f$.
- *
+ *
* @pre As a precondition #QueueDeleteMinimum() has do be
* called.
*
* @param[in] vertexId The vertex identifier of vertex @f$\vertex@f$.
- *
+ *
* @see DominatingThetaPath#UpdateBucket
*/
- inline Types::labelId UpdateLabelSetAt ( TVertexId vertexId )
- {
- USAGE_ASSERT ( vertexId < labelSets_.size() );
+ inline Types::labelId UpdateLabelSetAt ( TVertexId vertexId )
+ {
+ USAGE_ASSERT ( vertexId < labelSets_.size() );
return UpdateLabelSet ( labelSets_[vertexId] );
}
///@}
@@ -740,7 +740,7 @@ class DominatingThetaPath final {
* @param previousLabel The previous label @f$\labelu_p@f$
*/
inline void SetParentOf ( TLabel & label
- , TLabel const & previousLabel )
+ , TLabel const & previousLabel )
{
label.PreviousVertex() = previousLabel.Vertex();
label.PreviousLabel() = previousLabel.Index();
@@ -763,7 +763,7 @@ class DominatingThetaPath final {
* @return @p True if the merging was successful, @p False otherwise.
*/
inline bool MergeLabelAt( TVertexId vertexId
- , TLabel & label )
+ , TLabel & label )
{
return labelSets_[vertexId].template Merge( label );
}
@@ -783,10 +783,10 @@ class DominatingThetaPath final {
* @return @p True if the new label produces a cycle, @p False otherwise.
*/
inline bool ProduceCycle ( TLabel & label
- , std::pair && pair )
+ , std::pair && pair )
{
label = std::get<0>(pair);
- return !( std::get<1>(pair) );
+ return !( std::get<1>(pair) );
}
///@}
diff --git a/include/Algorithms/SpanningTree/Kruskal.hpp b/include/Algorithms/SpanningTree/Kruskal.hpp
index ac637a94..ac89bb85 100644
--- a/include/Algorithms/SpanningTree/Kruskal.hpp
+++ b/include/Algorithms/SpanningTree/Kruskal.hpp
@@ -46,13 +46,13 @@ class Kruskal final : public MST {
* @details Kruskal's algorithm runs in O(|E| lg |V|) using binary
* heaps and calculates a MST. It uses techniques that are also
* common for connected component algorithms.
- *
+ *
* Steps:
* 1. Increases the MST by exactly one edge in each iteration
* 2. It starts with |V| components
* 3. In each iteration the number of connected components shrinks by 1
* 4. To manage the connected components it uses a disjoint-set data structure
- *
+ *
*/
virtual inline void Run() override {
UnionFind unionFind( this->Graph().NumberOfVertices() );
@@ -69,7 +69,7 @@ class Kruskal final : public MST {
std::vector spanningTreeEdges;
- for ( Types::edgeId edge : edges )
+ for ( Types::edgeId edge : edges )
{
Types::vertexId source = this->Graph().EdgeAt( edge ).Source();
Types::vertexId target = this->Graph().EdgeAt( edge ).Target();
@@ -85,4 +85,4 @@ class Kruskal final : public MST {
} // namespace egoa
-#endif // EGOA__ALGORITHMS__SPANNING_TREES__KRUSKAL_HPP
\ No newline at end of file
+#endif // EGOA__ALGORITHMS__SPANNING_TREES__KRUSKAL_HPP
diff --git a/include/Algorithms/SpanningTree/MST.hpp b/include/Algorithms/SpanningTree/MST.hpp
index 878138bb..90c7a25a 100644
--- a/include/Algorithms/SpanningTree/MST.hpp
+++ b/include/Algorithms/SpanningTree/MST.hpp
@@ -59,15 +59,15 @@ class MST {
*
* @return The subgraph representing the calculated spanning tree.
*/
- inline Subgraph const & Result() const
+ inline Subgraph const & Result() const
{
return spanningTree_;
}
- friend std::ostream & operator<<( std::ostream & os, MST const & rhs )
+ friend std::ostream & operator<<( std::ostream & os, MST const & rhs )
{
auto & graph = rhs.spanningTree_.Graph();
- for ( auto edgeId : rhs.spanningTree_.Edges() )
+ for ( auto edgeId : rhs.spanningTree_.Edges() )
{
auto & edge = graph.EdgeAt(edgeId);
os << "(" << edge.Source() << ", " << edge.Target() << ");\n";
@@ -83,11 +83,11 @@ class MST {
*
* @param edges The edges in the spanning tree.
*/
- void SetResult(std::vector && edges)
+ void SetResult(std::vector && edges)
{
std::vector vertices;
vertices.reserve(Graph().NumberOfVertices());
- Graph().template for_all_vertex_identifiers( [&vertices](Types::vertexId id)
+ Graph().template for_all_vertex_identifiers( [&vertices](Types::vertexId id)
{
vertices.push_back(id);
});
diff --git a/include/Algorithms/SpanningTree/Prim.hpp b/include/Algorithms/SpanningTree/Prim.hpp
index 8e2426fb..eea1e1fb 100644
--- a/include/Algorithms/SpanningTree/Prim.hpp
+++ b/include/Algorithms/SpanningTree/Prim.hpp
@@ -22,7 +22,7 @@ namespace egoa {
* prim.Run();
* Subgraph spanningTree = prim.Result();
* @endcode
- *
+ *
* @tparam GraphType The type of the graph.
* @tparam WeightType The type of the edge weights.
*/
@@ -48,12 +48,12 @@ class Prim final : public MST {
* algorithm. Prim runs in O(|E| log |V|) using binary heaps.
* While using Fibonacci heaps the running time is then in O(|E| +
* |V| log |V|). The latter is an improvement while |V| << |E|.
- *
+ *
* Steps:
* 1. While not all vertices are in the MST component
* 2. Relax the incident edges to u if necessary
- * 3. Choose the edge that has the minimum weight between
- * the grown MST component and the non-MST component, i.e.,
+ * 3. Choose the edge that has the minimum weight between
+ * the grown MST component and the non-MST component, i.e.,
* no cycle will be created
*
* @pre This algorithm assumes that the vertex identifiers all lie in
@@ -85,11 +85,11 @@ class Prim final : public MST {
// Ignore edges to vertices that have already been included in the MST
if (isVertexInMst[neighbor]) return;
- if (!visited[neighbor])
+ if (!visited[neighbor])
{ // The neighbor has not been visited before
heap.Insert(neighbor, edge.Identifier());
visited[neighbor] = true;
- } else if ( this->Comparator()( edge.Identifier(), heap.KeyOf(neighbor) ) )
+ } else if ( this->Comparator()( edge.Identifier(), heap.KeyOf(neighbor) ) )
{
// Better edge to neighbor has been found
heap.ChangeKey(neighbor, edge.Identifier());
diff --git a/include/Auxiliary/Auxiliary.hpp b/include/Auxiliary/Auxiliary.hpp
index e661ab27..19065d5c 100644
--- a/include/Auxiliary/Auxiliary.hpp
+++ b/include/Auxiliary/Auxiliary.hpp
@@ -24,7 +24,7 @@ namespace egoa::Auxiliary {
* @return The number of allowed threads.
*/
inline Types::count NumberOfThreads () { return omp_get_num_threads(); }
-
+
/**
* @brief Maximum number of possible threads.
*
@@ -71,7 +71,7 @@ namespace egoa::Auxiliary {
* http://realtimecollisiondetection.net/blog/?p=
* https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
* https://randomascii.wordpress.com/2012/06/26/doubles-are-not-floats-so-dont-compare-them/
- *
+ *
* The absolute tolerance test fails when x and y become large, and the
* relative tolerance test fails when they become small. It is therefore
* desired to combine these two tests together in a single test. Over the
@@ -86,7 +86,7 @@ namespace egoa::Auxiliary {
*
* @return TRUE if both doubles are equal with regards to the tolerance, FALSE otherwise.
*/
-inline bool EQ (double a, double b, double absTol = Const::EPSILON, double relTol = Const::EPSILON)
+inline bool EQ (double a, double b, double absTol = Const::EPSILON, double relTol = Const::EPSILON)
{
if ( fabs(a - b) <= absTol * std::max(1.0, ( relTol/absTol * std::max(fabs(a), fabs(b)) ) ) )
return true;
@@ -116,7 +116,7 @@ struct MatchPathSeparator
/**
* @brief Path separator in Windows systems
- *
+ *
* @param ch [description]
* @return [description]
*/
@@ -136,12 +136,12 @@ struct MatchPathSeparator
*
* @return The filename
*/
-inline Types::string Basename( Types::string const & pathname )
+inline Types::string Basename( Types::string const & pathname )
{
- return std::string(
- std::find_if( pathname.rbegin(),
+ return std::string(
+ std::find_if( pathname.rbegin(),
pathname.rend(),
- MatchPathSeparator()
+ MatchPathSeparator()
).base(),
pathname.end() );
}
@@ -153,7 +153,7 @@ inline Types::string Basename( Types::string const & pathname )
*
* @return The filename without the extension.
*/
-inline Types::string RemoveExtension( std::string const & filename )
+inline Types::string RemoveExtension( std::string const & filename )
{
std::string::const_reverse_iterator pivot = std::find( filename.rbegin(), filename.rend(), '.' );
return pivot == filename.rend() ? filename : std::string( filename.begin(), pivot.base() - 1 );
diff --git a/include/Auxiliary/Comparators.hpp b/include/Auxiliary/Comparators.hpp
index 12c2b20e..c977edea 100644
--- a/include/Auxiliary/Comparators.hpp
+++ b/include/Auxiliary/Comparators.hpp
@@ -34,7 +34,7 @@ class VectorBasedComparator {
comparator_(std::move(comparator))
{}
- bool operator()(Types::index lhs, Types::index rhs) const
+ bool operator()(Types::index lhs, Types::index rhs) const
{
return comparator_(weights_[lhs], weights_[rhs]);
}
diff --git a/include/Auxiliary/Constants.hpp b/include/Auxiliary/Constants.hpp
index 1027e579..a9e19f81 100644
--- a/include/Auxiliary/Constants.hpp
+++ b/include/Auxiliary/Constants.hpp
@@ -23,8 +23,8 @@ namespace egoa::Const {
// 1 ns (for nanosecond) correspond to 1,000,000,000 s (for seconds)
constexpr Types::count NSEC_PER_SEC = 1000000000; // pow(10,9)
// 1 ns (for nanosecond) correspond to 1,000,000 ms (for milliseconds)
- constexpr Types::count NSEC_PER_MILLISEC = 1000000;
- constexpr Types::count MILLISEC_PER_SEC = 1000;
+ constexpr Types::count NSEC_PER_MILLISEC = 1000000;
+ constexpr Types::count MILLISEC_PER_SEC = 1000;
constexpr Types::real EPSILON = std::numeric_limits::epsilon();
constexpr Types::index NONE = std::numeric_limits::max();
diff --git a/include/Auxiliary/ContainerLoop.hpp b/include/Auxiliary/ContainerLoop.hpp
index 8e7e3a1d..142583d4 100644
--- a/include/Auxiliary/ContainerLoop.hpp
+++ b/include/Auxiliary/ContainerLoop.hpp
@@ -44,7 +44,7 @@ struct ContainerLoop {
* @tparam FUNCTION The type of the function object.
*/
template
- static void for_each ( Container const & container, FUNCTION function )
+ static void for_each ( Container const & container, FUNCTION function )
{
using std::begin, std::end;
std::for_each(begin(container), end(container), function);
@@ -67,7 +67,7 @@ struct ContainerLoop {
* @tparam FUNCTION The type of the function object.
*/
template
- static void for_each ( Container const & container, FUNCTION function )
+ static void for_each ( Container const & container, FUNCTION function )
{
using std::begin, std::end;
@@ -75,7 +75,7 @@ struct ContainerLoop {
auto last = end(container);
for ( auto it = begin(container)
; toContinue && it != last
- ; ++it )
+ ; ++it )
{
toContinue = function(*it);
}
@@ -100,12 +100,12 @@ struct ContainerLoop {
* @tparam FUNCTION The type of the function object.
*/
template
- static void for_each ( Container const & container, FUNCTION function )
+ static void for_each ( Container const & container, FUNCTION function )
{
#pragma omp parallel for
for ( Types::index i = 0
; i < container.size()
- ; ++i )
+ ; ++i )
{
function(container[i]);
}
diff --git a/include/Auxiliary/ExecutionPolicy.hpp b/include/Auxiliary/ExecutionPolicy.hpp
index d3a784ca..a88f8aac 100644
--- a/include/Auxiliary/ExecutionPolicy.hpp
+++ b/include/Auxiliary/ExecutionPolicy.hpp
@@ -29,4 +29,4 @@ enum class ExecutionPolicy {
}
-#endif // EGOA__AUXILIARY__EXECUTION_POLICY_HPP
\ No newline at end of file
+#endif // EGOA__AUXILIARY__EXECUTION_POLICY_HPP
diff --git a/include/Auxiliary/Timer.hpp b/include/Auxiliary/Timer.hpp
index 6623999c..831a5065 100644
--- a/include/Auxiliary/Timer.hpp
+++ b/include/Auxiliary/Timer.hpp
@@ -3,7 +3,7 @@
*
* Created on: Jan 29, 2019
* Author: Franziska Wegner
- *
+ *
* Sources of discussion:
* * https://blog.habets.se/2010/09/gettimeofday-should-never-be-used-to-measure-time.html
* * https://linux.die.net/man/2/clock_gettime
@@ -20,7 +20,7 @@
#include "Types.hpp"
// Linux operation systems such as Debian, Ubuntu, Gentoo, Fedora, openSUSE, RedHat, or Centos
-#if defined (__linux__)
+#if defined (__linux__)
#include
#include
// Apple and iOS
@@ -34,23 +34,23 @@ namespace egoa::Auxiliary {
/**
* @class Timer
- *
+ *
* @details The timer class provides an interface to measure the
* performance of the code. If not other set/stated the interface provides
* the most robust and accurate timer for the underlying operation system.
- *
+ *
* @code{.cpp}
* #include // just for sleep
* #include // just for sleep
- *
+ *
* int main(int argc, char *argv[]) {
* egoa::Auxiliary::Timer timer = egoa::Auxiliary::Timer();
- *
+ *
* // Do something
* ...
* std::this_thread::sleep_for(std::chrono::milliseconds(9999)); // sleep 9999 ms
- *
- * std::cout << "Timer: " << timer.ElapsedMilliseconds() << std::endl;
+ *
+ * std::cout << "Timer: " << timer.ElapsedMilliseconds() << std::endl;
* }
* @endcode
*/
@@ -69,7 +69,7 @@ class Timer {
* To use linux specific clock measurements the system must be a linux system
* such as Debian, Ubuntu, Gentoo, Fedora, openSUSE, RedHat, or Centos.
*/
-#if defined (__linux__)
+#if defined (__linux__)
/**
* System-wide clock measuring the real time (wall-clock). However, note that
* this timer can be influenced by administrative clock changes, adjtime(), and NTP.
@@ -121,12 +121,12 @@ class Timer {
#elif defined(EGOA_TIMER_CLOCK_THREAD_CPUTIME_ID)
clockid_t linuxClockId = CLOCK_THREAD_CPUTIME_ID;
// inline void GetTime( struct timespec * ts ) {
- // clock_gettime(CLOCK_THREAD_CPUTIME_ID, ts);
+ // clock_gettime(CLOCK_THREAD_CPUTIME_ID, ts);
// }
#else
- clockid_t linuxClockId = CLOCK_MONOTONIC_RAW;
-#endif // Specified clock measurement
- struct timespec start_;
+ clockid_t linuxClockId = CLOCK_MONOTONIC_RAW;
+#endif // Specified clock measurement
+ struct timespec start_;
/**
* @brief Timestamp
@@ -147,7 +147,7 @@ class Timer {
/**
* @brief Elapsed time
- *
+ *
* @details Calculates the difference between the current time and
* start time that represents the duration.
*
@@ -161,7 +161,7 @@ class Timer {
/**
* @brief Elapsed time in milliseconds
- *
+ *
* @details Calculates the difference between the current time and
* start time that represents the duration.
*
@@ -176,7 +176,7 @@ class Timer {
/**
* @brief Gets the clock resolution representing the granularity.
* @details A possible output is
- * CLOCK_MONOTONIC has a resolution of 1ns, and
+ * CLOCK_MONOTONIC has a resolution of 1ns, and
* CLOCK_MONOTONIC_COARSE has a resolution of 999848ns (about 1ms).
*
* @return The clock resolution.
@@ -201,7 +201,7 @@ class Timer {
}
inline void TimespecToMilliseconds ( struct timespec * ts
- , Types::largeReal & milliseconds )
+ , Types::largeReal & milliseconds )
{
milliseconds = ts->tv_sec * Const::MILLISEC_PER_SEC;
milliseconds += static_cast( ts->tv_nsec ) / Const::NSEC_PER_MILLISEC;
@@ -211,9 +211,9 @@ class Timer {
return static_cast( ts->tv_sec * Const::MILLISEC_PER_SEC + ts->tv_nsec ) / Const::NSEC_PER_MILLISEC;
}
///@}
-// end of defined (__linux__)
+// end of defined (__linux__)
#elif defined(__APPLE__) && defined(__MACH__) // Apple and iOS
- Types::posInteger start_;
+ Types::posInteger start_;
/**
* @brief Timestamp
@@ -234,7 +234,7 @@ class Timer {
/**
* @brief Elapsed time
- *
+ *
* @details Calculates the difference between the current time and
* start time that represents the duration.
*
@@ -247,7 +247,7 @@ class Timer {
/**
* @brief Elapsed time in milliseconds
- *
+ *
* @details Calculates the difference between the current time and
* start time that represents the duration.
*
@@ -269,7 +269,7 @@ class Timer {
/**
* @brief Gets the clock resolution representing the granularity.
* @details A possible output is
- * CLOCK_MONOTONIC has a resolution of 1ns, and
+ * CLOCK_MONOTONIC has a resolution of 1ns, and
* CLOCK_MONOTONIC_COARSE has a resolution of 999848ns (about 1ms).
*
* @return The clock resolution.
@@ -287,4 +287,4 @@ class Timer {
} // namespace egoa::Auxiliary
-#endif // EGOA__AUXILIARY__TIMER_HPP
\ No newline at end of file
+#endif // EGOA__AUXILIARY__TIMER_HPP
diff --git a/include/Auxiliary/Types.hpp b/include/Auxiliary/Types.hpp
index 2ccc7d71..47810da8 100644
--- a/include/Auxiliary/Types.hpp
+++ b/include/Auxiliary/Types.hpp
@@ -40,7 +40,7 @@ namespace egoa::Types {
typedef double real; /**< */
typedef long double largeReal; /**< */
- // String
+ // String
typedef std::string string; /**< */
typedef std::string name; /**< */
@@ -49,7 +49,7 @@ namespace egoa::Types {
typedef real loadSnapshot; /**< */
typedef real weightSnapshot; /**< */
typedef string timestampSnapshot; /**< */
-
+
/**
* @brief Convert a string to a double
@@ -60,7 +60,7 @@ namespace egoa::Types {
*
* @return The converted double
*/
- inline real String2double( std::string str )
+ inline real String2double( std::string str )
{
QRegularExpression rx("(^-?[0-9]?\\d*(\\.\\d+)?)"); // Filter numbers only
QRegularExpressionMatchIterator i = rx.globalMatch(QString::fromStdString(str));
@@ -88,13 +88,13 @@ namespace egoa::Types {
*
* @return The converted integer
*/
- inline count String2integer( std::string str )
+ inline count String2integer( std::string str )
{
QRegularExpression rx("(^-?[0-9]?\\d*(\\.\\d+)?)"); // Filter numbers only
QRegularExpressionMatchIterator i = rx.globalMatch(QString::fromStdString(str));
QRegularExpressionMatch match = i.next();
QString t_string = match.captured(1);
-
+
// QString t_string(str.c_str());
bool ok; count number(0);
number = QString(t_string).toUInt(&ok);
diff --git a/include/DataStructures/Bound.hpp b/include/DataStructures/Bound.hpp
index 75a306c5..c4a73172 100644
--- a/include/DataStructures/Bound.hpp
+++ b/include/DataStructures/Bound.hpp
@@ -38,7 +38,7 @@ class Bound {
* @param[in] maximum The maximum representing the upper bound.
*/
Bound ( TBound const & minimum
- , TBound const & maximum )
+ , TBound const & maximum )
: minimum_(minimum)
, maximum_(maximum)
{
@@ -48,7 +48,7 @@ class Bound {
USAGE_ASSERT ( minimum_ <= maximum_ );
}
///@}
-
+
///@name Getter and Setter
///@{
#pragma mark GETTER_AND_SETTER
@@ -58,23 +58,23 @@ class Bound {
*
* @return The minimum of the bound, i.e., lower bound.
*/
- inline TBound Minimum () const
- {
- return minimum_;
+ inline TBound Minimum () const
+ {
+ return minimum_;
}
/**
* @brief Setter of the minimum of the bound.
- *
+ *
* @code{.cpp}
* someBound.Minimum() = 9;
* @endcode
*
* @return The minimum of the bound, i.e., lower bound.
*/
- inline TBound & Minimum ()
- {
- return minimum_;
+ inline TBound & Minimum ()
+ {
+ return minimum_;
}
/**
@@ -82,23 +82,23 @@ class Bound {
*
* @return The maximum of the bound, i.e., upper bound.
*/
- inline TBound Maximum() const
- {
- return maximum_;
+ inline TBound Maximum() const
+ {
+ return maximum_;
}
/**
* @brief Setter of the maximum of the bound.
- *
+ *
* @code{.cpp}
* someBound.Maximum() = 99;
* @endcode
*
* @return The maximum of the bound, i.e., upper bound.
*/
- inline TBound & Maximum()
- {
- return maximum_;
+ inline TBound & Maximum()
+ {
+ return maximum_;
}
///@}
@@ -113,7 +113,7 @@ class Bound {
* @param[in] maximum The maximum of the bound, i.e., upper bound.
*/
inline void Range ( TBound const & minimum
- , TBound const & maximum )
+ , TBound const & maximum )
{
#ifdef PGT_EXCEPTION_HANDLING
BoundMismatch::template Check(minimum, maximum);
@@ -134,7 +134,7 @@ class Bound {
* @brief Comparison operator.
*
* @param[in] rhs The right hand side Bound.
- *
+ *
* @code{.cpp}
* if ( Bound(0,0) == Bound(1,0) ) { }
* @endcode
diff --git a/include/DataStructures/Container/DominationCriterion.hpp b/include/DataStructures/Container/DominationCriterion.hpp
index fc1d19b3..d801eb1d 100644
--- a/include/DataStructures/Container/DominationCriterion.hpp
+++ b/include/DataStructures/Container/DominationCriterion.hpp
@@ -103,4 +103,3 @@ class DominationDifferentiation {
} // namespace egoa
#endif // EGOA__DATA_STRUCTURES__CONTAINER__DOMINATION_CRITERION_HPP
-
diff --git a/include/DataStructures/Container/Queues/BinaryHeap.hpp b/include/DataStructures/Container/Queues/BinaryHeap.hpp
index 03917830..ff098c7f 100644
--- a/include/DataStructures/Container/Queues/BinaryHeap.hpp
+++ b/include/DataStructures/Container/Queues/BinaryHeap.hpp
@@ -49,7 +49,7 @@ class BinaryHeapCheck;
* pointers such as std::function ( see
* https://stackoverflow.com/questions/14677997/stdfunction-vs-template
* for more information). This is the reason why the following code is not
- * used
+ * used
* inline void for_all_(std::function function) {}
*
* @tparam HeapType The type of the heap. If the heap type is const, const
@@ -134,7 +134,7 @@ class BinaryHeap {
*
* @return The element with minimum key according to the comparator.
*/
- inline TElement const & Top() const
+ inline TElement const & Top() const
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
USAGE_ASSERT ( !Empty() );
@@ -148,7 +148,7 @@ class BinaryHeap {
*
* @return Index of the element, or if not available Const::none.
*/
- inline Types::index Search ( TElement const & element ) const
+ inline Types::index Search ( TElement const & element ) const
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
@@ -171,7 +171,7 @@ class BinaryHeap {
*
* @return @p *this.
*/
- inline BinaryHeap & operator+= ( TElement const & rhs )
+ inline BinaryHeap & operator+= ( TElement const & rhs )
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
heap_.emplace_back(rhs);
@@ -187,7 +187,7 @@ class BinaryHeap {
*
* @return @p *this.
*/
- inline BinaryHeap & operator+= ( TElement && rhs )
+ inline BinaryHeap & operator+= ( TElement && rhs )
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
heap_.emplace_back(std::move(rhs));
@@ -201,7 +201,7 @@ class BinaryHeap {
*
* @param element The element.
*/
- inline void Insert ( TElement const & element )
+ inline void Insert ( TElement const & element )
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
*this += element;
@@ -212,7 +212,7 @@ class BinaryHeap {
*
* @param element The element.
*/
- inline void Insert ( TElement && element )
+ inline void Insert ( TElement && element )
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
*this += std::move(element);
@@ -228,12 +228,12 @@ class BinaryHeap {
* input iterators.
*/
template
- inline void Insert ( InputIt first, InputIt last)
+ inline void Insert ( InputIt first, InputIt last)
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
for ( InputIt it = first
; it != last
- ; ++it )
+ ; ++it )
{
*this += *it;
}
@@ -244,7 +244,7 @@ class BinaryHeap {
*
* @param elements The elements to insert
*/
- inline void Insert ( std::vector const & elements)
+ inline void Insert ( std::vector const & elements)
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
Insert(elements.begin(), elements.end());
@@ -256,7 +256,7 @@ class BinaryHeap {
* @param args The arguments of a constructor of @p TElement.
*/
template
- inline void Emplace ( Args&&... args )
+ inline void Emplace ( Args&&... args )
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
heap_.emplace_back ( std::forward(args)... );
@@ -271,7 +271,7 @@ class BinaryHeap {
*
* @param[in] elements The elements with which to build the heap
*/
- inline void BuildWith ( std::vector const & elements )
+ inline void BuildWith ( std::vector const & elements )
{
heap_ = elements;
MakeHeapProperty();
@@ -286,7 +286,7 @@ class BinaryHeap {
*
* @pre The heap is not empty.
*/
- inline void Pop()
+ inline void Pop()
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
USAGE_ASSERT ( Size() > 0 );
@@ -300,13 +300,13 @@ class BinaryHeap {
*
* @return The top element.
*/
- inline TElement DeleteTop()
+ inline TElement DeleteTop()
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
USAGE_ASSERT ( Size() > 0 );
TElement top = std::move( Front() );
- if ( Size() > 1 )
+ if ( Size() > 1 )
{
using std::swap; // enable ADL
swap ( Front(), Back() );
@@ -321,7 +321,7 @@ class BinaryHeap {
/**
* @brief Clears the heap.
*/
- inline void Clear()
+ inline void Clear()
{
heap_.clear();
}
@@ -341,7 +341,7 @@ class BinaryHeap {
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
USAGE_ASSERT ( index < Size() );
-
+
ElementAt( index ) = element;
SiftUp( index );
SiftDown( index );
@@ -361,7 +361,7 @@ class BinaryHeap {
* @param element The new element.
*/
inline void DecreaseKey ( Types::index index
- , TElement const & element )
+ , TElement const & element )
{
ESSENTIAL_ASSERT ( ComplyHeapProperty() );
USAGE_ASSERT ( index < Size() );
@@ -380,7 +380,7 @@ class BinaryHeap {
*
* @return TRUE if empty and FALSE otherwise.
*/
- inline bool Empty() const
+ inline bool Empty() const
{
return heap_.empty();
}
@@ -390,7 +390,7 @@ class BinaryHeap {
*
* @return The size of the heap
*/
- inline Types::count Size() const
+ inline Types::count Size() const
{
return heap_.size();
}
@@ -407,9 +407,9 @@ class BinaryHeap {
*/
inline std::function< bool ( TElement const &
, TElement const & ) >
- const & Comparator() const
+ const & Comparator() const
{
- return comparator_;
+ return comparator_;
}
/**
@@ -438,7 +438,7 @@ class BinaryHeap {
* @details The comparator is set to `std::greater()` and the heap
* is updated to respect the new comparator.
*/
- inline void Maximize()
+ inline void Maximize()
{
Comparator ( std::greater() );
}
@@ -448,7 +448,7 @@ class BinaryHeap {
* @details The comparator is set to `std::less()` and the heap
* is updated to respect the new comparator.
*/
- inline void Minimize()
+ inline void Minimize()
{
Comparator ( std::less() );
}
@@ -467,7 +467,7 @@ class BinaryHeap {
* @return @p true if the heaps are equivalent, @p false if they do not
* have the same element.
*/
- inline bool operator==( BinaryHeap const & rhs ) const
+ inline bool operator==( BinaryHeap const & rhs ) const
{
return IsEqualTo( rhs );
}
@@ -483,7 +483,7 @@ class BinaryHeap {
* @p false if they contain the same elements where the order
* does not matter.
*/
- inline bool operator!=( BinaryHeap const & rhs) const
+ inline bool operator!=( BinaryHeap const & rhs) const
{
return !(*this==rhs);
}
@@ -500,7 +500,7 @@ class BinaryHeap {
* @return @p true if equal to @p rhs, @p false otherwise.
*/
template
- inline bool IsEqualTo( BinaryHeap const & rhs ) const
+ inline bool IsEqualTo( BinaryHeap const & rhs ) const
{
return internal::BinaryHeapCheck
::IsEqualTo(*this, rhs);
@@ -512,7 +512,7 @@ class BinaryHeap {
* @param lhs The left hand side BinaryHeaps
* @param rhs The right hand side BinaryHeaps
*/
- friend void swap ( BinaryHeap & lhs, BinaryHeap & rhs )
+ friend void swap ( BinaryHeap & lhs, BinaryHeap & rhs )
{ // Necessary for the copy and swap idiom
using std::swap; // enable ADL
swap( lhs.heap_, rhs.heap_ );
@@ -624,7 +624,7 @@ class BinaryHeap {
*/
template
inline
- void for_all_elements ( FUNCTION function )
+ void for_all_elements ( FUNCTION function )
{
internal::BinaryHeapLoopDifferentiation
::for_all_elements ( *this, function);
@@ -645,7 +645,7 @@ class BinaryHeap {
*/
template
inline
- void for_all_elements ( FUNCTION function ) const
+ void for_all_elements ( FUNCTION function ) const
{
internal::BinaryHeapLoopDifferentiation
::for_all_elements ( *this, function);
@@ -681,7 +681,7 @@ class BinaryHeap {
*
* @return The top element, which is at the front of @p heap_.
*/
- inline TElement & Front()
+ inline TElement & Front()
{
ESSENTIAL_ASSERT( !Empty() );
return heap_.front();
@@ -692,7 +692,7 @@ class BinaryHeap {
*
* @return The top element, which is at the front of @p heap_.
*/
- inline TElement const & Front() const
+ inline TElement const & Front() const
{
ESSENTIAL_ASSERT( !Empty() );
return heap_.front();
@@ -703,7 +703,7 @@ class BinaryHeap {
*
* @return The last element, which is at the back of @p heap_.
*/
- inline TElement & Back()
+ inline TElement & Back()
{
ESSENTIAL_ASSERT( !Empty() );
return heap_.back();
@@ -714,7 +714,7 @@ class BinaryHeap {
*
* @return The last element, which is at the back of @p heap_.
*/
- inline TElement const & Back() const
+ inline TElement const & Back() const
{
ESSENTIAL_ASSERT( !Empty() );
return heap_.back();
@@ -725,7 +725,7 @@ class BinaryHeap {
*
* @return The maximum index.
*/
- inline Types::index MaximumIndex() const
+ inline Types::index MaximumIndex() const
{
ESSENTIAL_ASSERT( !Empty() );
return heap_.size() - 1;
@@ -748,7 +748,7 @@ class BinaryHeap {
* @f$2^{l-1}@f$. As we start at 0, the value has to
* be reduced by 1.
*/
- inline void MakeHeapProperty()
+ inline void MakeHeapProperty()
{
for ( Types::rcount counter = heap_.size() / 2 - 1
; counter >= 0
@@ -768,7 +768,7 @@ class BinaryHeap {
* @return @p true if the heap complies with the heap property
* at element @p index and @p false otherwise.
*/
- inline bool ComplyHeapProperty( Types::index index ) const
+ inline bool ComplyHeapProperty( Types::index index ) const
{
ESSENTIAL_ASSERT( index < Size() );
if ( !HasChildren( index ) ) return true;
@@ -783,13 +783,13 @@ class BinaryHeap {
* @return @p true if the heap complies the heap property, @p
* false otherwise.
*/
- inline bool ComplyHeapProperty() const
+ inline bool ComplyHeapProperty() const
{
for ( Types::count counter = 0
; counter < Size()
- ; ++counter )
+ ; ++counter )
{
- if ( !ComplyHeapProperty( counter ) )
+ if ( !ComplyHeapProperty( counter ) )
{
return false;
}
@@ -804,7 +804,7 @@ class BinaryHeap {
/**
* @brief Sift the last element up.
*/
- inline void SiftUp ()
+ inline void SiftUp ()
{
ESSENTIAL_ASSERT( !Empty() );
SiftUp( MaximumIndex() );
@@ -816,14 +816,14 @@ class BinaryHeap {
*
* @param[in] index The index of the element tha shall be sifted up.
*/
- inline void SiftUp ( Types::index index )
+ inline void SiftUp ( Types::index index )
{
ESSENTIAL_ASSERT( index < Size() );
if ( !HasParent(index) ) return;
Types::index parentIndex = ParentIdOf( index );
- while ( Comparator()( ElementAt( index ), ElementAt( parentIndex ) )
- && index != 0 )
+ while ( Comparator()( ElementAt( index ), ElementAt( parentIndex ) )
+ && index != 0 )
{
using std::swap; // enable ADL
swap( ElementAt( index ), ElementAt( parentIndex ) );
@@ -836,7 +836,7 @@ class BinaryHeap {
/**
* @brief Sift down the element at the root.
*/
- inline void SiftDown()
+ inline void SiftDown()
{
ESSENTIAL_ASSERT( !Empty() );
SiftDown( 0 );
@@ -848,7 +848,7 @@ class BinaryHeap {
*
* @param[in] index The index of the element that shall be sifted down.
*/
- inline void SiftDown( Types::index index )
+ inline void SiftDown( Types::index index )
{
ESSENTIAL_ASSERT( index < Size() );
@@ -856,8 +856,8 @@ class BinaryHeap {
if ( !HasChildren( index ) ) return;
childIndex = SelectSwappableChildAt ( index );
- while ( Comparator()( ElementAt(childIndex), ElementAt(index) )
- && childIndex < Size() )
+ while ( Comparator()( ElementAt(childIndex), ElementAt(index) )
+ && childIndex < Size() )
{
using std::swap;
swap( ElementAt(index), ElementAt(childIndex) );
@@ -881,16 +881,16 @@ class BinaryHeap {
*
* @return The index of the child that has the best key.
*/
- inline Types::index SelectSwappableChildAt ( Types::index index ) const
+ inline Types::index SelectSwappableChildAt ( Types::index index ) const
{
ESSENTIAL_ASSERT( HasChildren(index) );
- if ( !HasRightChild(index) )
+ if ( !HasRightChild(index) )
{
return LeftChildIdOf( index );
}
ESSENTIAL_ASSERT( HasRightChild(index) );
- if ( Comparator()( LeftElementAt( index ), RightElementAt( index )) )
+ if ( Comparator()( LeftElementAt( index ), RightElementAt( index )) )
{
return LeftChildIdOf( index );
}
@@ -918,11 +918,11 @@ namespace internal {
#pragma mark HEAPS_ARE_IDENTICAL_CHECK
template
class BinaryHeapCheck {
-
+
// Type aliasing
using TElement = Type;
using THeap = BinaryHeap;
-
+
public:
/**
* @brief Determines if equal---in sense of order---to the \rhs binary heap.
@@ -932,13 +932,13 @@ class BinaryHeapCheck {
* @return TRUE if the order of the elements are the same to the \p rhs, FALSE otherwise.
*/
static inline bool IsEqualTo ( THeap const & lhs
- , THeap const & rhs )
+ , THeap const & rhs )
{
if ( lhs.Size() != rhs.Size() ) return false;
for ( Types::count counter = 0
; counter < lhs.Size()
- ; ++counter )
- {
+ ; ++counter )
+ {
if ( lhs.ElementAt( counter ) != rhs.ElementAt( counter ) ) return false;
}
return true;
@@ -962,15 +962,15 @@ class BinaryHeapCheck {
* @return TRUE if it has the same elements as \p rhs, FALSE otherwise.
*/
static inline bool IsEqualTo ( THeap const & lhs
- , THeap const & rhs )
+ , THeap const & rhs )
{
if ( lhs.Size() != rhs.Size() ) return false;
THeap tempRhs = rhs; std::sort( tempRhs.heap_.begin(), tempRhs.heap_.end() );
THeap tempLhs = lhs; std::sort( tempLhs.heap_.begin(), tempLhs.heap_.end() );
for ( Types::count counter = 0
; counter < tempLhs.Size()
- ; ++counter )
- {
+ ; ++counter )
+ {
if ( tempLhs.ElementAt( counter ) != tempRhs.ElementAt( counter ) ) return false;
}
return true;
@@ -998,7 +998,7 @@ class BinaryHeapLoopDifferentiation {
* @code{.cpp}
* [](TElement element) { Do something with the element object }
* @endcode
- *
+ *
* @tparam FUNCTION Function
*/
template
@@ -1006,11 +1006,11 @@ class BinaryHeapLoopDifferentiation {
void for_all_elements ( THeap & heap
, FUNCTION function )
{
- for (auto & element : heap.heap_)
+ for (auto & element : heap.heap_)
{
function(element);
}
- if ( !heap.ComplyHeapProperty() )
+ if ( !heap.ComplyHeapProperty() )
{
heap.MakeHeapProperty();
}
@@ -1045,7 +1045,7 @@ class BinaryHeapLoopDifferentiation
void for_all_elements ( THeap & heap
, FUNCTION function )
{
- for (auto & element : heap.heap_)
+ for (auto & element : heap.heap_)
{
function(element);
}
@@ -1071,9 +1071,9 @@ class BinaryHeapLoopDifferentiation {
* @code{.cpp}
* [](TElement element) -> bool { Do something with the element object }
* @endcode
- *
+ *
* @note Heap property might be violated in the none const variant
- *
+ *
* @tparam FUNCTION Function
*/
template
@@ -1081,12 +1081,12 @@ class BinaryHeapLoopDifferentiation {
void for_all_elements ( THeap & heap
, FUNCTION function )
{
- for ( auto & element : heap.heap_ )
+ for ( auto & element : heap.heap_ )
{
bool toContinue = function(element);
if ( !toContinue ) break;
}
- if ( !heap.ComplyHeapProperty() )
+ if ( !heap.ComplyHeapProperty() )
{
heap.MakeHeapProperty();
}
@@ -1120,7 +1120,7 @@ class BinaryHeapLoopDifferentiation
void for_all_elements ( THeap & heap
, FUNCTION function )
{
- for ( auto & element : heap.heap_ )
+ for ( auto & element : heap.heap_ )
{
bool toContinue = function(element);
if ( !toContinue ) break;
@@ -1149,7 +1149,7 @@ class BinaryHeapLoopDifferentiation {
* @code{.cpp}
* [](TElement element) { Do something with the element object }
* @endcode
- *
+ *
* @tparam FUNCTION Function
*/
template
@@ -1160,11 +1160,11 @@ class BinaryHeapLoopDifferentiation {
#pragma omp parallel for
for ( Types::count counter = 0
; counter < heap.heap_.size()
- ; ++counter )
+ ; ++counter )
{
function ( heap.heap_[counter] );
}
- if ( !heap.ComplyHeapProperty() )
+ if ( !heap.ComplyHeapProperty() )
{
heap.MakeHeapProperty();
}
@@ -1198,7 +1198,7 @@ class BinaryHeapLoopDifferentiation {
#pragma omp parallel for
for ( Types::count counter = 0
; counter < heap.heap_.size()
- ; ++counter )
+ ; ++counter )
{
function ( heap.heap_[counter] );
}
diff --git a/include/DataStructures/Container/Queues/Bucket.hpp b/include/DataStructures/Container/Queues/Bucket.hpp
index bbd9cd83..4899aee3 100644
--- a/include/DataStructures/Container/Queues/Bucket.hpp
+++ b/include/DataStructures/Container/Queues/Bucket.hpp
@@ -35,7 +35,7 @@ class BucketLoopDifferentiation;
/**
* @brief Class for bucket data structure.
- *
+ *
* @code{.cpp}
* egoa::Bucket, int> bucket;
* @endcode
@@ -43,7 +43,7 @@ class BucketLoopDifferentiation;
* @tparam PriorityQueue Type of the priority queue used within the
* bucket, e.g., BinaryHeap. The PriorityQueue has to provide the
* following interface.
- *
+ *
* Function | Description
* ------------------------------|---------------------
* Top | Returns the top element.
@@ -89,45 +89,45 @@ class Bucket {
Comparator( std::less() );
}
///@}
-
+
/**
* @name Comparators for Unprocessed Bucket Elements
- *
+ *
* @param rhs The right hand side bucket.
- *
+ *
* @pre Neither of the bucket queues is allowed to be empty.
* Check status of the queue by using #EmptyQueue().
- *
+ *
* @return @p true if the element with an optimal key is <, >, <=, >= than
* the rhs bucket, @p false otherwise.
- *
+ *
* @see EmptyQueue()
*/
///@{
#pragma mark OPERATORS
- inline bool operator< ( TBucket const & rhs ) const
+ inline bool operator< ( TBucket const & rhs ) const
{
USAGE_ASSERT ( !EmptyQueue() );
USAGE_ASSERT ( !rhs.EmptyQueue() );
return ( Top() < rhs.Top() );
}
- inline bool operator> ( TBucket const & rhs ) const
+ inline bool operator> ( TBucket const & rhs ) const
{
USAGE_ASSERT ( !EmptyQueue() );
USAGE_ASSERT ( !rhs.EmptyQueue() );
return rhs < *this;
}
- inline bool operator<= ( TBucket const & rhs ) const
+ inline bool operator<= ( TBucket const & rhs ) const
{
USAGE_ASSERT ( !EmptyQueue() );
USAGE_ASSERT ( !rhs.EmptyQueue() );
return !(*this > rhs);
}
- inline bool operator>= ( TBucket const & rhs ) const
+ inline bool operator>= ( TBucket const & rhs ) const
{
USAGE_ASSERT ( !EmptyQueue() );
USAGE_ASSERT ( !rhs.EmptyQueue() );
@@ -146,20 +146,20 @@ class Bucket {
* @pre Note that the element will be moved if the return type is true.
*
* @tparam Domination The domination sense such as weak, strict, or none.
- *
+ *
* @return @p true if the @p newElement is added into the bucket,
* @p false otherwise (meaning it was dominated in some sense defined
* by @p Domination).
*/
///@{
#pragma mark MERGE_ELEMENTS
-
+
template
- inline bool Merge ( TElement && newElement )
+ inline bool Merge ( TElement && newElement )
{
newElement.Valid() = true;
for_all_elements(
- [&](TElement & element) -> bool
+ [&](TElement & element) -> bool
{
if ( internal::DominationDifferentiation
::Dominates( element, newElement, Comparator() ) ) {
@@ -172,11 +172,11 @@ class Bucket {
--numberOfValidUnprocessedElements_;
}
// also covers DominationCriterion::none
- return true;
+ return true;
}
);
- if ( !newElement.Valid() )
+ if ( !newElement.Valid() )
{
PopInvalidUnprocessedElements();
return false;
@@ -190,7 +190,7 @@ class Bucket {
}
template
- inline bool Merge ( TElement & newElement )
+ inline bool Merge ( TElement & newElement )
{
bool valid = Merge( TElement(newElement) );
newElement.Valid() = valid;
@@ -198,7 +198,7 @@ class Bucket {
}
template
- inline bool Merge( TElement const & newElement )
+ inline bool Merge( TElement const & newElement )
{
return Merge( TElement(newElement) );
}
@@ -206,15 +206,15 @@ class Bucket {
///@todo Think about it
inline bool HasElement ( TElement const & newElement
- , TElement & existingElement )
+ , TElement & existingElement )
{
bool hasElement = false;
- for_all_elements(
+ for_all_elements(
[ & newElement
, & existingElement
- , & hasElement](TElement & element) -> bool
+ , & hasElement](TElement & element) -> bool
{
- if ( newElement == element )
+ if ( newElement == element )
{
existingElement = element;
hasElement = true;
@@ -239,7 +239,7 @@ class Bucket {
* @return @p true if it has an element at that position, @p
* false otherwise.
*/
- inline bool HasElementAt ( Types::index index )
+ inline bool HasElementAt ( Types::index index )
{
USAGE_ASSERT ( index >= 0 );
return ( index < NumberOfProcessedElements() );
@@ -249,13 +249,13 @@ class Bucket {
* @brief Processed element at a certain position @a index.
*
* @param[in] index The position of a processed element.
- *
+ *
* @pre There are processed elements and #HasElementAt( index )
* is true.
*
* @return The processed element at the position @a index.
*/
- inline TElement & ElementAt ( Types::index index )
+ inline TElement & ElementAt ( Types::index index )
{
#ifdef PGT_EXCEPTION_HANDLING
throw_out_of_bound( index, NumberOfProcessedElements() );
@@ -268,13 +268,13 @@ class Bucket {
* @brief Processed element at a certain position @a index.
*
* @param[in] index The position of a processed element.
- *
+ *
* @pre There are processed elements and #HasElementAt( index )
* is true.
*
* @return The processed element at the position @a index.
*/
- inline TElement & operator[] ( Types::index index )
+ inline TElement & operator[] ( Types::index index )
{
#ifdef PGT_EXCEPTION_HANDLING
throw_out_of_bound( index, NumberOfProcessedElements() );
@@ -287,13 +287,13 @@ class Bucket {
* @brief Processed element at a certain position @a index.
*
* @param[in] index The position of a processed element.
- *
+ *
* @pre There are processed elements and #HasElementAt( index )
* is true.
*
* @return The processed element at the position @a index.
*/
- inline TElement & operator[] ( Types::index index ) const
+ inline TElement & operator[] ( Types::index index ) const
{
#ifdef PGT_EXCEPTION_HANDLING
throw_out_of_bound( index, NumberOfProcessedElements() );
@@ -307,12 +307,12 @@ class Bucket {
* @details Top returns an unprocessed element that has an optimal
* key (e.g. for VoltageAngleDifferenceLabel the key would be the
* susceptance norm).
- *
+ *
* @pre The queue is not empty meaning #EmptyQueue() is false.
*
* @return The element with an optimal key.
*/
- inline TElement const & Top () const
+ inline TElement const & Top () const
{
USAGE_ASSERT ( !EmptyQueue() );
ESSENTIAL_ASSERT( unprocessedElements_.Top().Valid() );
@@ -324,23 +324,23 @@ class Bucket {
* @details Get all elements that have an optimum value, e.g. for the
* VoltageAngleDifferenceLabel an optimum corresponds to the minimum
* delta theta value of the path.
- *
+ *
* @note This function does not change the bucket. All elements
* stay in the queue. The equality check depends on the element
* equality check.
- *
+ *
* @todo Is this loop sufficient for unprocessed labels only?
*
* @return Vector of elements with optimum value
*/
- inline std::vector Optima () const
+ inline std::vector Optima () const
{ //@todo This is a very bad implementation. Think about it again.
auto result = std::min_element( processedElements_.begin(), processedElements_.end(), [](TElement a, TElement b) { return a.Value() < b.Value(); } );
auto result2 = std::min_element( unprocessedElements_.begin(), unprocessedElements_.end(), [](TElement a, TElement b) { return a.Value() < b.Value(); } );
TElement minElement;
if ( result != processedElements_.end() )
{
- if ( result2 != unprocessedElements_.end() )
+ if ( result2 != unprocessedElements_.end() )
{
((*result)<(*result2))?(minElement = *result):(minElement = *result2);
} else {
@@ -352,12 +352,12 @@ class Bucket {
// Extract elements with the same optimum value
std::vector optima;
- for_all_elements (
+ for_all_elements (
[ & minElement
, & optima ]( TElement const & element )
{
- if ( element.Value() == minElement.Value() )
- {
+ if ( element.Value() == minElement.Value() )
+ {
optima.emplace_back( element );
}
}
@@ -379,10 +379,10 @@ class Bucket {
*
* @pre The queue---meaning the unprocessed items---is not
* allowed to be empty.
- *
+ *
* @return The element with a optimal key.
*/
- inline Types::index Pop ()
+ inline Types::index Pop ()
{
USAGE_ASSERT ( !EmptyQueue() );
@@ -401,13 +401,13 @@ class Bucket {
* label is the one with the smallest key (e.g. for
* VoltageAngleDifferenceLabel the key would be the susceptance
* norm times the minimum capacity).
- *
+ *
* @pre The queue---meaning the unprocessed items---is not
* allowed to be empty.
*
* @return The element with a optimal key.
*/
- inline std::pair DeleteTop ()
+ inline std::pair DeleteTop ()
{
USAGE_ASSERT ( !EmptyQueue() );
Types::index index = Pop();
@@ -420,7 +420,7 @@ class Bucket {
/**
* @brief Clear the bucket.
*/
- inline void Clear () noexcept
+ inline void Clear () noexcept
{
processedElements_.clear();
unprocessedElements_.Clear();
@@ -447,16 +447,16 @@ class Bucket {
#pragma mark COMPARATOR
inline std::function
- const & Comparator () const
- {
- return unprocessedElements_.Comparator();
+ , TElement const & ) >
+ const & Comparator () const
+ {
+ return unprocessedElements_.Comparator();
}
inline void Comparator( std::function comparator )
- {
- unprocessedElements_.Comparator ( comparator );
+ , TElement const & )> comparator )
+ {
+ unprocessedElements_.Comparator ( comparator );
}
///@}
@@ -466,7 +466,7 @@ class Bucket {
*
* @return @p true if empty, @p false otherwise.
*/
- inline bool Empty () const
+ inline bool Empty () const
{
return ( processedElements_.empty() && unprocessedElements_.Empty() );
}
@@ -476,12 +476,12 @@ class Bucket {
*
* @return @p true if empty, @p false otherwise.
*/
- inline bool EmptyQueue () const
+ inline bool EmptyQueue () const
{
return unprocessedElements_.Empty();
}
- inline Types::count Size () const
+ inline Types::count Size () const
{
return NumberOfProcessedElements() + NumberOfUnprocessedElements();
}
@@ -489,7 +489,7 @@ class Bucket {
///@name Element Loops
///@{
#pragma mark LOOPS
-
+
/**
* @brief The @c for loop @c over all elements in the bucket.
* @details Loop over all processed and unprocessed elements.
@@ -497,19 +497,19 @@ class Bucket {
* @param[in] function The function, e.g., lambda function.
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel using
* OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
inline
- void for_all_elements ( FUNCTION function )
+ void for_all_elements ( FUNCTION function )
{
internal::BucketLoopDifferentiation
::for_all_elements ( *this, function );
@@ -524,9 +524,9 @@ class Bucket {
* @param[in] function The function, e.g., lambda function.
*
* @code{.cpp}
- * []( TElement const & element )
- * {
- * // Do something with the element object.
+ * []( TElement const & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
*
@@ -535,8 +535,8 @@ class Bucket {
* @tparam FUNCTION The function pointer.
*/
template
- inline
- void for_all_elements ( FUNCTION function ) const
+ inline
+ void for_all_elements ( FUNCTION function ) const
{
internal::BucketLoopDifferentiation
::for_all_elements ( *this, function );
@@ -548,9 +548,9 @@ class Bucket {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
*
@@ -559,8 +559,8 @@ class Bucket {
* @tparam FUNCTION The function pointer.
*/
template
- inline
- void for_all_processed_elements ( FUNCTION function )
+ inline
+ void for_all_processed_elements ( FUNCTION function )
{
internal::BucketLoopDifferentiation
::for_all_processed_elements ( *this, function );
@@ -572,9 +572,9 @@ class Bucket {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement const & element )
- * {
- * Do something with the element object.
+ * []( TElement const & element )
+ * {
+ * Do something with the element object.
* }
* @endcode
*
@@ -584,7 +584,7 @@ class Bucket {
*/
template
inline
- void for_all_processed_elements ( FUNCTION function ) const
+ void for_all_processed_elements ( FUNCTION function ) const
{
internal::BucketLoopDifferentiation
::for_all_processed_elements ( *this, function );
@@ -599,19 +599,19 @@ class Bucket {
* @param[in] function The function, e.g., lambda function.
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel using
* OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
inline
- void for_all_unprocessed_elements ( FUNCTION function )
+ void for_all_unprocessed_elements ( FUNCTION function )
{
internal::BucketLoopDifferentiation
::for_all_unprocessed_elements ( *this, function );
@@ -627,19 +627,19 @@ class Bucket {
* @param[in] function The function, e.g., lambda function.
*
* @code{.cpp}
- * []( TElement const & element )
- * {
- * // Do something with the element object.
+ * []( TElement const & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel using
* OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
inline
- void for_all_unprocessed_elements ( FUNCTION function ) const
+ void for_all_unprocessed_elements ( FUNCTION function ) const
{
internal::BucketLoopDifferentiation
::for_all_unprocessed_elements ( *this, function );
@@ -652,19 +652,19 @@ class Bucket {
* @param[in] function The function, e.g., lambda function.
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel
* using OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
inline
- Types::real for_all_optima ( FUNCTION function )
+ Types::real for_all_optima ( FUNCTION function )
{
return internal::BucketLoopDifferentiation
::for_all_optima ( *this, function );
@@ -678,26 +678,26 @@ class Bucket {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement const & element )
- * {
- * // Do something with the element object.
+ * []( TElement const & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel
* using OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
inline
- Types::real for_all_optima ( FUNCTION function ) const
+ Types::real for_all_optima ( FUNCTION function ) const
{
return internal::BucketLoopDifferentiation
::for_all_optima ( *this, function );
}
///@}
- private:
+ private:
///@name Add an Element
///@{
#pragma mark ADD_ELEMENTS
@@ -711,7 +711,7 @@ class Bucket {
*
* @pre Function @see Pop().
*/
- inline Types::index MoveToProcessed ( TElement && element )
+ inline Types::index MoveToProcessed ( TElement && element )
{
processedElements_.push_back ( std::move(element) );
processedElements_.back().Index() = processedElements_.size() - 1;
@@ -719,7 +719,7 @@ class Bucket {
}
/**
- * @brief Insert an element
+ * @brief Insert an element
*
* @param element The element.
*/
@@ -737,9 +737,9 @@ class Bucket {
*
* @return The number of processed elements.
*/
- inline Types::count NumberOfProcessedElements() const noexcept
- {
- return processedElements_.size();
+ inline Types::count NumberOfProcessedElements() const noexcept
+ {
+ return processedElements_.size();
}
/**
@@ -767,7 +767,7 @@ class Bucket {
* @return @p true if the @p lhs dominates the @p rhs, @p false otherwise.
*/
template
- inline bool Dominates ( TElement const & lhs, TElement const & rhs ) const
+ inline bool Dominates ( TElement const & lhs, TElement const & rhs ) const
{
return internal::DominationDifferentiation
::Dominates( lhs, rhs, Comparator() );
@@ -782,10 +782,10 @@ class Bucket {
* @brief Pops invalid unprocessed elements until @p unprocessedElements_
* is empty or the top element is valid.
*/
- inline void PopInvalidUnprocessedElements()
+ inline void PopInvalidUnprocessedElements()
{
- while (!unprocessedElements_.Empty()
- && !unprocessedElements_.Top().Valid())
+ while (!unprocessedElements_.Empty()
+ && !unprocessedElements_.Top().Valid())
{
unprocessedElements_.Pop();
}
@@ -801,7 +801,7 @@ class Bucket {
friend internal::BucketLoopDifferentiation;
#pragma mark MEMBERS
- std::vector processedElements_; /**< The processed elements that do not change their status and stay valid */
+ std::vector processedElements_; /**< The processed elements that do not change their status and stay valid */
TPriorityQueue unprocessedElements_; /**< The unprocessed elements that might change their status, e.g., to invalid */
Types::count numberOfValidUnprocessedElements_; /**< The number of valid unprocessed elements. */
};
@@ -825,12 +825,12 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam FUNCTION The function pointer.
*/
template
@@ -848,9 +848,9 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function.
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
*
@@ -861,7 +861,7 @@ class BucketLoopDifferentiation {
void for_all_processed_elements ( BucketType & bucket
, FUNCTION function )
{
- for ( auto & element : bucket.processedElements_ )
+ for ( auto & element : bucket.processedElements_ )
{
function ( element );
}
@@ -873,9 +873,9 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
*
@@ -887,7 +887,7 @@ class BucketLoopDifferentiation {
, FUNCTION function )
{
bucket.unprocessedElements_.template for_all_elements(
- [&function]( auto & element )
+ [&function]( auto & element )
{
if (!element.Valid()) return;
function(element);
@@ -903,23 +903,23 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel
* using OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
Types::real for_all_optima ( BucketType & bucket
, FUNCTION function )
{
std::vector optima = bucket.Optima();
- for ( TElement const & element : optima )
+ for ( TElement const & element : optima )
{
function ( element );
}
@@ -937,11 +937,11 @@ class BucketLoopDifferentiation {
public:
template
- static inline
+ static inline
void for_all_elements ( BucketType & bucket
, FUNCTION function )
{
- for ( auto & element : bucket.processedElements_ )
+ for ( auto & element : bucket.processedElements_ )
{
bool toContinue = function( element );
if (!toContinue) return;
@@ -958,21 +958,21 @@ class BucketLoopDifferentiation {
* continued, if @p false this emulates a break.
*
* @code{.cpp}
- * []( TElement & element ) -> bool
- * {
- * // Do something with the element object.
+ * []( TElement & element ) -> bool
+ * {
+ * // Do something with the element object.
* }
* @endcode
*
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
void for_all_processed_elements ( BucketType & bucket
, FUNCTION function )
{
bool toContinue = true;
- for ( auto & element : bucket.processedElements_ )
+ for ( auto & element : bucket.processedElements_ )
{
toContinue = function ( element );
if ( !toContinue ) break;
@@ -987,21 +987,21 @@ class BucketLoopDifferentiation {
* continued, if @p false this emulates a break.
*
* @code{.cpp}
- * []( TElement & element ) -> bool
- * {
- * // Do something with the element object.
+ * []( TElement & element ) -> bool
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
void for_all_unprocessed_elements ( BucketType & bucket
, FUNCTION function )
{
bucket.unprocessedElements_.template for_all_elements(
- [&function](auto & element) -> bool
+ [&function](auto & element) -> bool
{
if (!element.Valid()) return true;
return function(element);
@@ -1010,12 +1010,12 @@ class BucketLoopDifferentiation {
}
template
- static inline
+ static inline
Types::real for_all_optima ( BucketType & bucket
, FUNCTION function )
{
std::vector optima = bucket.Optima();
- for ( TElement const & element : optima )
+ for ( TElement const & element : optima )
{
bool toContinue = function ( element );
if (!toContinue) break;
@@ -1047,16 +1047,16 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
void for_all_elements ( BucketType & bucket
, FUNCTION function )
{
@@ -1070,16 +1070,16 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
*
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
void for_all_processed_elements ( BucketType & bucket
, FUNCTION function )
{
@@ -1098,21 +1098,21 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
void for_all_unprocessed_elements ( BucketType & bucket
, FUNCTION function )
{
bucket.unprocessedElements_.template for_all_elements(
- [&function](auto & element)
+ [&function](auto & element)
{
if (!element.Valid()) return;
function(element);
@@ -1127,18 +1127,18 @@ class BucketLoopDifferentiation {
* @param[in] function The function, e.g., lambda function
*
* @code{.cpp}
- * []( TElement & element )
- * {
- * // Do something with the element object.
+ * []( TElement & element )
+ * {
+ * // Do something with the element object.
* }
* @endcode
- *
+ *
* @tparam Policy @p true if the loop is run in parallel
* using OpenMP, @p false otherwise.
* @tparam FUNCTION The function pointer.
*/
template
- static inline
+ static inline
Types::real for_all_optima ( BucketType & bucket
, FUNCTION function )
{
diff --git a/include/DataStructures/Container/Queues/PriorityQueue.hpp b/include/DataStructures/Container/Queues/PriorityQueue.hpp
index 63c58de0..f2293193 100644
--- a/include/DataStructures/Container/Queues/PriorityQueue.hpp
+++ b/include/DataStructures/Container/Queues/PriorityQueue.hpp
@@ -18,7 +18,7 @@ template
class PriorityQueue : public Queue {
// Type aliasing
using TElement = Type;
-
+
public:
#pragma mark CONSTRUCTORS_AND_DESTRUCTORS
PriorityQueue(){}
@@ -36,13 +36,13 @@ class PriorityQueue : public Queue {
virtual ~PriorityQueue() override {}
#pragma mark LOOPS
- template
+ template
inline void for_all_elements ( FUNCTION function ) {}
template
inline void for_all_elements ( FUNCTION function ) const {}
- template
+ template
inline void breakable_for_all_elements ( FUNCTION function ) {}
template
@@ -66,9 +66,9 @@ class PriorityQueue : public Queue {
virtual inline TElement DeleteMin () override = 0;
virtual inline void Clear () override = 0;
- virtual inline void ChangeKey ( Types::index index
+ virtual inline void ChangeKey ( Types::index index
, TElement const & element ) = 0;
- virtual inline void DecreaseKey ( Types::index index
+ virtual inline void DecreaseKey ( Types::index index
, TElement const & element ) = 0;
///@}
diff --git a/include/DataStructures/Container/Queues/Queue.hpp b/include/DataStructures/Container/Queues/Queue.hpp
index 2995f013..139a3cb4 100644
--- a/include/DataStructures/Container/Queues/Queue.hpp
+++ b/include/DataStructures/Container/Queues/Queue.hpp
@@ -30,15 +30,15 @@ class Queue {
Queue ( Compare const & compare, Container const & container ){}
virtual ~Queue() {}
-
+
#pragma mark LOOPS
- template
+ template
inline void for_all_elements ( FUNCTION function ) {}
template
inline void for_all_elements ( FUNCTION function ) const {}
- template
+ template
inline void breakable_for_all_elements ( FUNCTION function ) {}
template
diff --git a/include/DataStructures/Container/Queues/StdQueue.hpp b/include/DataStructures/Container/Queues/StdQueue.hpp
index eec8a3f2..56765cb0 100644
--- a/include/DataStructures/Container/Queues/StdQueue.hpp
+++ b/include/DataStructures/Container/Queues/StdQueue.hpp
@@ -47,7 +47,7 @@ class StdQueue {
}
virtual inline void Push ( TElement && element ) {
- queue_.push ( element );
+ queue_.push ( element );
}
//@todo
diff --git a/include/DataStructures/Container/UnionFind.hpp b/include/DataStructures/Container/UnionFind.hpp
index 4f332265..afcab43f 100644
--- a/include/DataStructures/Container/UnionFind.hpp
+++ b/include/DataStructures/Container/UnionFind.hpp
@@ -18,15 +18,15 @@ namespace egoa {
*/
class UnionFind {
public:
- UnionFind( Types::count numberOfVertices )
+ UnionFind( Types::count numberOfVertices )
: parent_( numberOfVertices, 0 )
- , numberOfVerticesInSubtree_( numberOfVertices, 1 )
+ , numberOfVerticesInSubtree_( numberOfVertices, 1 )
, numberOfVertices_( numberOfVertices )
{
// Every vertex has itself as parent
for ( Types::count counter = 0
; counter < NumberOfVertices()
- ; ++counter )
+ ; ++counter )
{
Parent ( counter ) = counter;
}
@@ -41,7 +41,7 @@ class UnionFind {
*
* @return The root's identifier.
*/
- inline Types::vertexId Find ( Types::vertexId vertex )
+ inline Types::vertexId Find ( Types::vertexId vertex )
{
if ( Parent(vertex) == vertex ) return vertex;
else return Find ( Parent(vertex) );
@@ -54,14 +54,14 @@ class UnionFind {
* @param[in] u The vertex u
* @param[in] v The vertex v
*/
- inline void Union ( Types::vertexId u, Types::vertexId v )
+ inline void Union ( Types::vertexId u, Types::vertexId v )
{
Types::vertexId root1 = Find(u);
Types::vertexId root2 = Find(v);
if ( root1 == root2 ) return;
- if ( SubtreeSize(root1) > SubtreeSize(root2) )
+ if ( SubtreeSize(root1) > SubtreeSize(root2) )
{
SubtreeSize(root1) += SubtreeSize(root2);
Parent(root2) = root1;
@@ -79,45 +79,45 @@ class UnionFind {
*
* @return If they are in the same component
*/
- inline bool InSameComponent ( Types::vertexId u, Types::vertexId v )
+ inline bool InSameComponent ( Types::vertexId u, Types::vertexId v )
{
- return Find(u) == Find(v);
+ return Find(u) == Find(v);
}
///@Name Getter and setter
///@{
- inline Types::count NumberOfVertices()
- {
- return numberOfVertices_;
+ inline Types::count NumberOfVertices()
+ {
+ return numberOfVertices_;
}
- inline Types::vertexId & Parent ( Types::vertexId vertex )
- {
- USAGE_ASSERT ( vertex < numberOfVertices_
+ inline Types::vertexId & Parent ( Types::vertexId vertex )
+ {
+ USAGE_ASSERT ( vertex < numberOfVertices_
|| vertex == Const::NONE );
- return parent_[vertex];
+ return parent_[vertex];
}
- inline Types::vertexId Parent ( Types::vertexId vertex ) const
- {
- USAGE_ASSERT ( vertex < numberOfVertices_
+ inline Types::vertexId Parent ( Types::vertexId vertex ) const
+ {
+ USAGE_ASSERT ( vertex < numberOfVertices_
|| vertex == Const::NONE );
- return parent_[vertex];
+ return parent_[vertex];
}
- inline Types::count & SubtreeSize ( Types::vertexId vertex )
+ inline Types::count & SubtreeSize ( Types::vertexId vertex )
{
USAGE_ASSERT ( vertex < numberOfVertices_ );
return numberOfVerticesInSubtree_[vertex];
}
- inline Types::count SubtreeSize ( Types::vertexId vertex ) const
+ inline Types::count SubtreeSize ( Types::vertexId vertex ) const
{
USAGE_ASSERT ( vertex < numberOfVertices_ );
return numberOfVerticesInSubtree_[vertex];
}
///@}
-
+
private:
std::vector parent_; /*< Parent pointer */
std::vector numberOfVerticesInSubtree_; /*< Number of vertices in subtree i */
@@ -126,4 +126,4 @@ class UnionFind {
} // namespace egoa
-#endif // EGOA__CONTAINER__UNION_FIND_HPP
\ No newline at end of file
+#endif // EGOA__CONTAINER__UNION_FIND_HPP
diff --git a/include/DataStructures/Graphs/BlockCutTree.hpp b/include/DataStructures/Graphs/BlockCutTree.hpp
index a7032317..c757037e 100644
--- a/include/DataStructures/Graphs/BlockCutTree.hpp
+++ b/include/DataStructures/Graphs/BlockCutTree.hpp
@@ -27,7 +27,7 @@ namespace egoa {
/// @defgroup bctree Block-cut tree related classes and functions
/// @details This module contains all functions and classes that are related
/// to block-cut trees.
-///
+///
/// To build a block-cut tree the functions
/// buildBlockCutTree(GraphType const &) or
/// BlockCutTree::Build(GraphType const &) can be used.
@@ -227,7 +227,7 @@ class BlockCutTree final {
/**
* @brief Whether the block is a bridge.
- *
+ *
* @details Bridges are blocks that consist of only one edge.
*
* @return @c true if the block represents a bridge, @c false otherwise.
@@ -311,7 +311,7 @@ class BlockCutTree final {
std::vector blocks_;
/**
* @brief The cut-vertices in the graph.
- *
+ *
* @details The cut-vertex with identifier @c id is at position @c id
* in the vector. The positions that do not correspond to
* cut-vertices contain empty objects.
diff --git a/include/DataStructures/Graphs/DynamicGraph.hpp b/include/DataStructures/Graphs/DynamicGraph.hpp
index 3ab14502..92e9695c 100644
--- a/include/DataStructures/Graphs/DynamicGraph.hpp
+++ b/include/DataStructures/Graphs/DynamicGraph.hpp
@@ -4,7 +4,7 @@
* Created on: Nov 04, 2018
* Author: Franziska Wegner, Matthias Wolf
*/
-
+
#ifndef EGOA__DATA_STRUCTURES__GRAPHS__DYNAMIC_GRAPH_HPP
#define EGOA__DATA_STRUCTURES__GRAPHS__DYNAMIC_GRAPH_HPP
@@ -106,7 +106,7 @@ class DynamicGraph {
* If the graph is destroyed, all views are invalid and calling
* member functions on them has undefined behavior.
*/
- inline TVerticesView Vertices()
+ inline TVerticesView Vertices()
{
return TVerticesView ( & vertices_
, & vertexExists_
@@ -123,7 +123,7 @@ class DynamicGraph {
* If the graph is destroyed, all views are invalid and calling
* member functions on them has undefined behavior.
*/
- inline TConstVerticesView Vertices() const
+ inline TConstVerticesView Vertices() const
{
return TConstVerticesView ( & vertices_
, & vertexExists_
@@ -138,7 +138,7 @@ class DynamicGraph {
* @return @p true if a vertex with identifier @p id exists,
* @p false otherwise.
*/
- inline bool VertexExists ( Types::vertexId id ) const
+ inline bool VertexExists ( Types::vertexId id ) const
{
return id < vertexExists_.size() && vertexExists_[id];
}
@@ -152,7 +152,7 @@ class DynamicGraph {
*
* @return The vertex object.
*/
- inline TVertex & VertexAt ( Types::vertexId id )
+ inline TVertex & VertexAt ( Types::vertexId id )
{
USAGE_ASSERT ( VertexExists(id) );
return vertices_[id];
@@ -167,7 +167,7 @@ class DynamicGraph {
*
* @return The vertex object.
*/
- inline TVertex const & VertexAt ( Types::vertexId id ) const
+ inline TVertex const & VertexAt ( Types::vertexId id ) const
{
USAGE_ASSERT ( VertexExists(id) );
return vertices_[id];
@@ -187,7 +187,7 @@ class DynamicGraph {
*
* @return The vertex identifier.
*/
- inline Types::vertexId VertexId ( TVertex const & vertex ) const
+ inline Types::vertexId VertexId ( TVertex const & vertex ) const
{
return vertex.Identifier();
}
@@ -201,7 +201,7 @@ class DynamicGraph {
*
* @return The identifier of the vertex.
*/
- inline Types::vertexId AddVertex ( TVertexProperties & properties )
+ inline Types::vertexId AddVertex ( TVertexProperties & properties )
{
return AddVertex ( TVertexProperties(properties) );
}
@@ -213,7 +213,7 @@ class DynamicGraph {
*
* @return The identifier of the vertex.
*/
- inline Types::vertexId AddVertex ( TVertexProperties const & properties )
+ inline Types::vertexId AddVertex ( TVertexProperties const & properties )
{
return AddVertex ( TVertexProperties(properties) );
}
@@ -225,7 +225,7 @@ class DynamicGraph {
*
* @return The identifier of the vertex.
*/
- inline Types::vertexId AddVertex ( TVertexProperties && properties )
+ inline Types::vertexId AddVertex ( TVertexProperties && properties )
{
// TODO: Find a free place in the vector if it exists.
auto id = vertices_.size();
@@ -250,7 +250,7 @@ class DynamicGraph {
*
* @param id The identifier of the vertex to remove.
*/
- inline void RemoveVertexAt ( Types::vertexId id )
+ inline void RemoveVertexAt ( Types::vertexId id )
{
USAGE_ASSERT ( VertexExists(id) );
@@ -275,13 +275,13 @@ class DynamicGraph {
*/
template
inline auto MapVertices ( FUNCTION function ) const
- -> std::vector(), std::declval()))>
+ -> std::vector(), std::declval()))>
{
using TResult = decltype(function(std::declval(), std::declval()));
std::vector result;
for_all_vertex_tuples(
- [&]( Types::vertexId id, TVertex const & vertex )
+ [&]( Types::vertexId id, TVertex const & vertex )
{
result.push_back ( function(id, vertex) );
}
@@ -302,7 +302,7 @@ class DynamicGraph {
*
* @return The vertex identifiers of all neighbors.
*/
- inline std::vector NeighborsOf ( Types::vertexId id ) const
+ inline std::vector NeighborsOf ( Types::vertexId id ) const
{
USAGE_ASSERT ( VertexExists(id) );
@@ -325,7 +325,7 @@ class DynamicGraph {
* neighbors are appended.
*/
inline void NeighborsOf ( Types::vertexId id
- , std::vector & vertexIds ) const
+ , std::vector & vertexIds ) const
{
USAGE_ASSERT ( VertexExists(id) );
@@ -356,7 +356,7 @@ class DynamicGraph {
*
* @return The number of incoming edges.
*/
- inline Types::count InDegreeAt ( Types::vertexId id ) const
+ inline Types::count InDegreeAt ( Types::vertexId id ) const
{
USAGE_ASSERT ( VertexExists(id) );
return InEdgeIdsAt(id).size();
@@ -371,7 +371,7 @@ class DynamicGraph {
*
* @return The number of outgoing edges.
*/
- inline Types::count OutDegreeAt ( Types::vertexId id ) const
+ inline Types::count OutDegreeAt ( Types::vertexId id ) const
{
USAGE_ASSERT ( VertexExists(id) );
return OutEdgeIdsAt(id).size();
@@ -386,7 +386,7 @@ class DynamicGraph {
*
* @return The number of incident edges.
*/
- inline Types::count DegreeAt ( Types::vertexId id ) const
+ inline Types::count DegreeAt ( Types::vertexId id ) const
{
USAGE_ASSERT ( VertexExists(id) );
return InDegreeAt(id) + OutDegreeAt(id);
@@ -401,7 +401,7 @@ class DynamicGraph {
*
* @return The identifiers of the incoming edges at vertex @p id.
*/
- inline std::vector const & InEdgeIdsAt ( Types::vertexId id ) const
+ inline std::vector