MCPcopy Create free account
hub / github.com/cvanaret/Uno / define_Constants

Function define_Constants

interfaces/Python/python_modules/Constants.cpp:10–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8
9namespace uno {
10 void define_Constants(py::module& module) {
11 // Optimization sense
12 module.attr("MINIMIZE") = UNO_MINIMIZE;
13 module.attr("MAXIMIZE") = UNO_MAXIMIZE;
14
15 // Lagrange multiplier sign convention
16 module.attr("MULTIPLIER_POSITIVE") = UNO_MULTIPLIER_POSITIVE;
17 module.attr("MULTIPLIER_NEGATIVE") = UNO_MULTIPLIER_NEGATIVE;
18
19 // Problem type: "LP" = linear, "QP" = quadratic, "NLP" = nonlinear
20 module.attr("PROBLEM_LINEAR") = UNO_PROBLEM_LINEAR;
21 module.attr("PROBLEM_QUADRATIC") = UNO_PROBLEM_QUADRATIC;
22 module.attr("PROBLEM_NONLINEAR") = UNO_PROBLEM_NONLINEAR;
23
24 // Base indexing style: 0-based (C) or 1-based (Fortran)
25 module.attr("ZERO_BASED_INDEXING") = UNO_ZERO_BASED_INDEXING;
26 module.attr("ONE_BASED_INDEXING") = UNO_ONE_BASED_INDEXING;
27
28 // Triangular part: 'L' = lower, 'U' = upper
29 module.attr("LOWER_TRIANGLE") = UNO_LOWER_TRIANGLE;
30 module.attr("UPPER_TRIANGLE") = UNO_UPPER_TRIANGLE;
31
32 // Optimization status
33 module.attr("SUCCESS") = UNO_SUCCESS;
34 module.attr("ITERATION_LIMIT") = UNO_ITERATION_LIMIT;
35 module.attr("TIME_LIMIT") = UNO_TIME_LIMIT;
36 module.attr("EVALUATION_ERROR") = UNO_EVALUATION_ERROR;
37 module.attr("ALGORITHMIC_ERROR") = UNO_ALGORITHMIC_ERROR;
38
39 // Iterate status
40 module.attr("NOT_OPTIMAL") = UNO_NOT_OPTIMAL;
41 module.attr("FEASIBLE_KKT_POINT") = UNO_FEASIBLE_KKT_POINT;
42 module.attr("FEASIBLE_FJ_POINT") = UNO_FEASIBLE_FJ_POINT;
43 module.attr("INFEASIBLE_STATIONARY_POINT") = UNO_INFEASIBLE_STATIONARY_POINT;
44 module.attr("FEASIBLE_SMALL_STEP") = UNO_FEASIBLE_SMALL_STEP;
45 module.attr("INFEASIBLE_SMALL_STEP") = UNO_INFEASIBLE_SMALL_STEP;
46 module.attr("UNBOUNDED") = UNO_UNBOUNDED;
47
48 // current Uno version is 2.0.3
49 module.attr("VERSION_MAJOR") = UNO_VERSION_MAJOR;
50 module.attr("VERSION_MINOR") = UNO_VERSION_MINOR;
51 module.attr("VERSION_PATCH") = UNO_VERSION_PATCH;
52 }
53} // namespace

Callers 1

PYBIND11_MODULEFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected