Skip to content

Commit

Permalink
print info for tsp, make lines thinner
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathemalsky committed Aug 28, 2023
1 parent 51e6f10 commit 8fca218
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# BSTPP

This software contains the implementation of approximation algorithms for 3 variants of the bottleneck travelling salesman problem. Those are BTSP, BTSPP and BTSVPP.
This software contains the implementation of approximation algorithms for 3 variants of the bottleneck travelling salesman problem. Those are the bottleneck travelling salesman problem (BTSP), the bottleneck travelling salesman path problem (BTSPP) and the bottleneck travelling salesman variable path problem (BTSVPP).
In addition, methods to solve TSP, BTSP and BTSPP using a MILP solver are also included.
This program is part of my master thesis.

## Using the whole program

Expand All @@ -9,7 +11,7 @@ The whole program includes the visualisation for examples on euclidean graphs.
### Prerequisites
- [cmake](https://cmake.org/) version 3.20 or higher is required for compiling
- [dear imgui](https://github.com/ocornut/imgui) is used for graphical output. dear imgui is contained as git submodule, but it needs
- [glfw](https://www.glfw.org/) Can be installed using the following steps:
- [glfw](https://www.glfw.org/) can be installed using the following steps:
```
sudo apt-get install xorg-dev
sudo apt-get install libgl1-mesa-dev
Expand Down
10 changes: 6 additions & 4 deletions include/draw/definitions.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,16 @@ constexpr bool INITIAL_BTSVPP_DRAW_BICONNECTED_GRAPH = false;
constexpr bool INITIAL_BTSVPP_DRAW_HAMILTON_PATH = false;

constexpr std::array<float, static_cast<unsigned int>(ProblemType::NUMBER_OF_OPTIONS)> INITIAL_THICKNESS{
6.0f, // BTSP_approx
6.0f, // BTSPP_approx
4.0f, // BTSP_approx
4.0f, // BTSPP_approx
2.0f, // BTSVPP_approx
5.0f, // BTSP_exact
5.0f, // BTSPP_exact
2.0f, // BTSP_exact
3.0f, // BTSPP_exact
3.0f // TSP_exact
};

constexpr float THICKNESS_STEP = 0.5;

constexpr RGBA_COLOUR INITIAL_CLEAR_COLOUR = {0.19, 0.19, 0.25, 1.0};
constexpr RGBA_COLOUR INITIAL_VERTEX_COLOUR = {1.0f, 0.0f, 0.0f, 1.0f};
} // namespace drawing
Expand Down
1 change: 1 addition & 0 deletions src/draw/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ static void handleSlowEvents(std::shared_ptr<DrawData> drawData) {
solve::SOLVE[std::to_underlying(ProblemType::TSP_exact)] = false;
exactsolver::Result res = exactsolver::solve(drawing::EUCLIDEAN, ProblemType::TSP_exact);
drawData->vertexOrder.updateOrder(res.tour, ProblemType::TSP_exact);
exactsolver::printInfo(res, ProblemType::TSP_exact);
}
}

Expand Down

0 comments on commit 8fca218

Please sign in to comment.