Commit b2ce8850 authored by thillux's avatar thillux
Browse files

initial import

parents
Loading
Loading
Loading
Loading

.clang-format

0 → 100644
+57 −0
Original line number Diff line number Diff line
---
Language:        Cpp
# BasedOnStyle:  Chromium
AccessModifierOffset: -1
ConstructorInitializerIndentWidth: 4
AlignEscapedNewlinesLeft: true
AlignTrailingComments: true
AllowAllParametersOfDeclarationOnNextLine: false
AllowShortBlocksOnASingleLine: false
AllowShortIfStatementsOnASingleLine: false
AllowShortLoopsOnASingleLine: false
AllowShortFunctionsOnASingleLine: Inline
AlwaysBreakTemplateDeclarations: true
AlwaysBreakBeforeMultilineStrings: true
BreakBeforeBinaryOperators: false
BreakBeforeTernaryOperators: true
BreakConstructorInitializersBeforeComma: false
BinPackParameters: false
ColumnLimit:     120
ConstructorInitializerAllOnOneLineOrOnePerLine: true
DerivePointerAlignment: false
ExperimentalAutoDetectBinPacking: false
IndentCaseLabels: true
IndentWrappedFunctionNames: false
IndentFunctionDeclarationAfterType: false
MaxEmptyLinesToKeep: 1
KeepEmptyLinesAtTheStartOfBlocks: false
NamespaceIndentation: None
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: false
PenaltyBreakBeforeFirstCallParameter: 1
PenaltyBreakComment: 300
PenaltyBreakString: 1000
PenaltyBreakFirstLessLess: 120
PenaltyExcessCharacter: 1000000
PenaltyReturnTypeOnItsOwnLine: 200
PointerAlignment: Left
SpacesBeforeTrailingComments: 2
Cpp11BracedListStyle: true
Standard:        Cpp11
IndentWidth:     4
TabWidth:        4
UseTab:          Never
BreakBeforeBraces: Attach
SpacesInParentheses: false
SpacesInAngles:  false
SpaceInEmptyParentheses: false
SpacesInCStyleCastParentheses: false
SpacesInContainerLiterals: true
SpaceBeforeAssignmentOperators: true
ContinuationIndentWidth: 4
CommentPragmas:  '^ IWYU pragma:'
ForEachMacros:   [ foreach, Q_FOREACH, BOOST_FOREACH ]
SpaceBeforeParens: ControlStatements
DisableFormat:   false
...

CMakeLists.txt

0 → 100644
+44 −0
Original line number Diff line number Diff line
cmake_minimum_required(VERSION 2.8)
project(topoGen)

# The version number.
set (topoGen_VERSION_MAJOR 1)
set (topoGen_VERSION_MINOR 0)

#
# CONFIGURATION VARIABLES
#
set(CMAKE_BUILD_TYPE debug)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")

set(TOOL_NAME topoGen)
if (CMAKE_BUILD_TYPE STREQUAL debug)
  set(PREFIX ${PROJECT_SOURCE_DIR})
else(CMAKE_BUILD_TYPE STREQUAL debug)
  set(PREFIX ${PROJECT_SOURCE_DIR})
endif(CMAKE_BUILD_TYPE STREQUAL debug)

set(DATAROOTDIR ${PREFIX}/share)
set(BINDIR ${PREFIX}/bin)
set(SRCDIR ${PREFIX}/src)
set(CONFIGFILE ${DATAROOTDIR}/${PROJECT_NAME}/config.json)

# set configuration variables
configure_file(src/config/Defines.hpp.cmake
               src/config/Defines.hpp)

#
# COMPILER OPTIONS
#
set(CMAKE_CXX_FLAGS "-g -Wall -Wextra -march=native -O3 -std=c++11")
include_directories("${SRCDIR}" "${CMAKE_BINARY_DIR}/src" "/usr/local/include")
link_directories("/usr/local/lib")

#
# ADD SOURCES AND LINK LIBRARIES
#

add_subdirectory(src)

Doxyfile

0 → 100644
+0 −0

File added.

Preview size limit exceeded, changes collapsed.

LICENSE

0 → 100644
+32 −0
Original line number Diff line number Diff line
TopoGen is available for use under the following license, commonly known
as the 3-clause BSD license:

=========================================================================

Copyright (c) 2013-2014, Michael Grey and Markus Theil
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
   notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
   notice, this list of conditions and the following disclaimer in the
   documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its
   contributors may be used to endorse or promote products derived
   from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
THE POSSIBILITY OF SUCH DAMAGE.
 No newline at end of file

README.md

0 → 100644
+52 −0
Original line number Diff line number Diff line
# TopoGen

Creates worldwide underlay topologies and outputs them in the following formats:
* JSON
* nodes and edges in txt files
* KML for Google Earth

![image of example topology](https://raw.githubusercontent.com/thillux/TopoGen/master/img/exampleTopology.jpg)

## Dependencies

TopoGen is built via CMake and uses the following libraries:

* CGAL
* COIN-OR::LEMON
* GMP
* JsonCpp
* SQLite 3

## Bootstrapping

```bash
./bootstrap.sh
cmake .
make
```

## Running

1) create Google Earth KML
```bash
bin/topoGen --kml
```

2) create node and edge list
```bash
bin/topoGen --graph
```

3) create graph json
```bash
bin/topoGen --json
```

## Contributors

* Michael Grey
* Markus Theil

## Credits

This tool was created at [Ilmenau University of Technology](https://www.tu-ilmenau.de/en/international/).