Sleipnir C++ API
Loading...
Searching...
No Matches
options.hpp
1// Copyright (c) Sleipnir contributors
2
3#pragma once
4
5#include <chrono>
6#include <cmath>
7#include <limits>
8
9namespace slp {
10
14template <typename Scalar>
15struct Options {
19 Scalar tolerance = [] {
20 using std::sqrt;
21 return sqrt(std::numeric_limits<Scalar>::epsilon());
22 }();
23
25 int max_iterations = 5000;
26
28 std::chrono::duration<double> timeout{
29 std::numeric_limits<double>::infinity()};
30
38 bool feasible_ipm = false;
39
44 bool diagnostics = false;
45};
46
47} // namespace slp
Definition options.hpp:15
Scalar tolerance
Definition options.hpp:19
std::chrono::duration< double > timeout
The maximum elapsed wall clock time before returning a solution.
Definition options.hpp:28
bool diagnostics
Definition options.hpp:44
int max_iterations
The maximum number of solver iterations before returning a solution.
Definition options.hpp:25
bool feasible_ipm
Definition options.hpp:38