/qtm-calc-shared

Queueing theory tool as a CMake submodule

Primary LanguageC++MIT LicenseMIT

qtm-calc-shared

Build License: MIT

qtm-calc-shared is a shared version of qtm-calc intended for use via CMake.

Build

  1. First of all make sure you have the Boost library installed on your system (see more Boost installation on Windows or Boost installation on *nix);

  2. Clone this project and then cd to the project folder;

  3. Configure the project using CMake:

$ cmake -B ./build -G <preferred generator> -DCMAKE_BUILD_TYPE=<Debug|Release>
  1. Then run build command:
$ cmake --build ./build --config <Debug|Release>
  1. You've done! The builded binary file available in the build directory.

Usage

In your CMakelists.txt:

cmake_minimum_required(VERSION 3.12)

project(project_name LANGUAGES CXX)

add_subdirectory(/path/to/qtm-calc/dir EXCLUDE_FROM_ALL)
add_executable(executable_name main.cpp)
target_link_libraries(executable_name PRIVATE libqtmcalc)

In your sources:

#include <qtm-calc/core.hpp>
#include <qtm-calc/data.hpp>

// somewhere in code
qtm::qtm x(10, 1, 1.5, 0.7, 0, -1);
if (x.is_fs_outdated()) {
  x.calc_final_states();
}
std::cout << x.final_states();

// ...

License

This project is licensed under the MIT License.

Dependents

This project is used by gw-dss-cpp - predict tool based on queuing theory.

Credits

My thanks to the developers of the Boost C++ Libraries and pybind11.

Especial thanks to IceArrow256 and Vemestael for help in writing computing algorithms and code structuring.