sleipnirgroup-jormungandr 0.0.1.dev474__tar.gz → 0.0.1.dev475__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/CMakeLists.txt +15 -1
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/PKG-INFO +3 -2
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/README.md +2 -1
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/cmake/modules/Pybind11Mkdoc.cmake +10 -1
- {sleipnirgroup_jormungandr-0.0.1.dev474/src → sleipnirgroup_jormungandr-0.0.1.dev475/include}/.styleguide +1 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/adjoint_expression_graph.hpp +6 -5
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/expression.hpp +3 -2
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/expression_graph.hpp +7 -5
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/hessian.hpp +4 -4
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/jacobian.hpp +4 -4
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/variable.hpp +6 -6
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/variable_matrix.hpp +7 -6
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/multistart.hpp +4 -3
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/problem.hpp +5 -5
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/pool.hpp +4 -3
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/pyproject.toml +1 -1
- {sleipnirgroup_jormungandr-0.0.1.dev474/include → sleipnirgroup_jormungandr-0.0.1.dev475/src}/.styleguide +1 -4
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/problem.cpp +16 -15
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/interior_point.cpp +3 -3
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/newton.cpp +2 -1
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/sqp.cpp +3 -3
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/util/filter.hpp +2 -3
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/util/print_diagnostics.hpp +4 -4
- sleipnirgroup_jormungandr-0.0.1.dev474/include/sleipnir/util/small_vector.hpp +0 -4380
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/SleipnirConfig.cmake.in +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/cmake/modules/BuildTypes.cmake +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/cmake/modules/CompilerFlags.cmake +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/cmake/modules/SubdirList.cmake +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/expression_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/gradient.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/slice.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/autodiff/variable_block.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/control/ocp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/solver/interior_point.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/solver/newton.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/solver/options.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/optimization/solver/sqp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/assert.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/concepts.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/function_ref.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/print.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/spy.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/include/sleipnir/util/symbol_exports.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/autodiff/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/control/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_expression_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_variable.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_variable_block.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/autodiff/bind_variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/binders.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/control/bind_ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/docstrings.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/main.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/optimization/bind_equality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/optimization/bind_inequality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/optimization/bind_problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/optimization/solver/bind_exit_status.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/cpp/try_cast.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/optimization/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/autodiff/gradient_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/autodiff/hessian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/autodiff/jacobian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/autodiff/variable_matrix_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/autodiff/variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/cart_pole_util.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/control/cart_pole_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/control/differential_drive_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/control/flywheel_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/differential_drive_util.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/arm_on_elevator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/cart_pole_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/constraints_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/decision_variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/differential_drive_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/double_integrator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/exit_status_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/flywheel_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/linear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/multistart_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/nonlinear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/quadratic_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/optimization/trivial_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/jormungandr/test/rk4.py +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/autodiff/variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/inertia.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/regularized_ldlt.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/util/error_estimate.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/util/is_locally_infeasible.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/optimization/solver/util/kkt_error.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/util/pool.cpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/util/scope_exit.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/util/scoped_profiler.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/util/setup_profiler.hpp +0 -0
- {sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/src/util/solve_profiler.hpp +0 -0
{sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/CMakeLists.txt
RENAMED
@@ -120,6 +120,17 @@ endif()
|
|
120
120
|
|
121
121
|
target_link_libraries(Sleipnir PUBLIC Eigen3::Eigen)
|
122
122
|
|
123
|
+
# small_vector dependency
|
124
|
+
fetchcontent_declare(
|
125
|
+
small_vector
|
126
|
+
GIT_REPOSITORY https://github.com/gharveymn/small_vector.git
|
127
|
+
# main on 2025-05-15
|
128
|
+
GIT_TAG b19a9c477cad5e58f8aed59dbe9be1c30e4b9826
|
129
|
+
)
|
130
|
+
fetchcontent_makeavailable(small_vector)
|
131
|
+
|
132
|
+
target_link_libraries(Sleipnir PUBLIC small_vector)
|
133
|
+
|
123
134
|
if(BUILD_TESTING AND NOT CMAKE_CROSSCOMPILING)
|
124
135
|
# Catch2 dependency
|
125
136
|
fetchcontent_declare(
|
@@ -325,7 +336,10 @@ if(BUILD_PYTHON)
|
|
325
336
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
326
337
|
${CMAKE_CURRENT_SOURCE_DIR}/jormungandr/cpp
|
327
338
|
)
|
328
|
-
target_link_libraries(
|
339
|
+
target_link_libraries(
|
340
|
+
_jormungandr
|
341
|
+
PUBLIC Threads::Threads Eigen3::Eigen small_vector
|
342
|
+
)
|
329
343
|
|
330
344
|
# Suppress compiler warnings in nanobind
|
331
345
|
if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: sleipnirgroup-jormungandr
|
3
|
-
Version: 0.0.1.
|
3
|
+
Version: 0.0.1.dev475
|
4
4
|
Summary: A linearity-exploiting sparse nonlinear constrained optimization problem solver that uses the interior-point method.
|
5
5
|
License: Copyright (c) Sleipnir contributors
|
6
6
|
|
@@ -187,6 +187,7 @@ See the [examples](https://github.com/SleipnirGroup/Sleipnir/tree/main/examples)
|
|
187
187
|
* On Linux, install via `sudo apt install python`
|
188
188
|
* On macOS, install via `brew install python`
|
189
189
|
* [Eigen](https://gitlab.com/libeigen/eigen)
|
190
|
+
* [small_vector](https://github.com/gharveymn/small_vector)
|
190
191
|
* [nanobind](https://github.com/wjakob/nanobind) (build only)
|
191
192
|
* [Catch2](https://github.com/catchorg/Catch2) (tests only)
|
192
193
|
|
@@ -293,7 +294,7 @@ For quadratic problems, we compute the Lagrangian Hessian and constraint Jacobia
|
|
293
294
|
|
294
295
|
#### Use a performant linear algebra library with fast sparse solvers
|
295
296
|
|
296
|
-
[Eigen](https://gitlab.com/libeigen/eigen
|
297
|
+
[Eigen](https://gitlab.com/libeigen/eigen) provides these. It also has no required dependencies, which makes cross compilation much easier.
|
297
298
|
|
298
299
|
#### Use a pool allocator for autodiff expression nodes
|
299
300
|
|
@@ -165,6 +165,7 @@ See the [examples](https://github.com/SleipnirGroup/Sleipnir/tree/main/examples)
|
|
165
165
|
* On Linux, install via `sudo apt install python`
|
166
166
|
* On macOS, install via `brew install python`
|
167
167
|
* [Eigen](https://gitlab.com/libeigen/eigen)
|
168
|
+
* [small_vector](https://github.com/gharveymn/small_vector)
|
168
169
|
* [nanobind](https://github.com/wjakob/nanobind) (build only)
|
169
170
|
* [Catch2](https://github.com/catchorg/Catch2) (tests only)
|
170
171
|
|
@@ -271,7 +272,7 @@ For quadratic problems, we compute the Lagrangian Hessian and constraint Jacobia
|
|
271
272
|
|
272
273
|
#### Use a performant linear algebra library with fast sparse solvers
|
273
274
|
|
274
|
-
[Eigen](https://gitlab.com/libeigen/eigen
|
275
|
+
[Eigen](https://gitlab.com/libeigen/eigen) provides these. It also has no required dependencies, which makes cross compilation much easier.
|
275
276
|
|
276
277
|
#### Use a pool allocator for autodiff expression nodes
|
277
278
|
|
@@ -32,13 +32,22 @@ function(pybind11_mkdoc target headers)
|
|
32
32
|
list(FILTER eigen_dirs INCLUDE REGEX "\\$<BUILD_INTERFACE:.*>")
|
33
33
|
list(TRANSFORM eigen_dirs PREPEND "-I")
|
34
34
|
|
35
|
+
get_target_property(
|
36
|
+
small_vector_dirs
|
37
|
+
small_vector
|
38
|
+
INTERFACE_INCLUDE_DIRECTORIES
|
39
|
+
)
|
40
|
+
list(FILTER small_vector_dirs INCLUDE REGEX "\\$<BUILD_INTERFACE:.*>")
|
41
|
+
list(TRANSFORM small_vector_dirs PREPEND "-I")
|
42
|
+
|
35
43
|
add_custom_command(
|
36
44
|
OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/jormungandr/cpp/docstrings.hpp
|
37
45
|
COMMAND
|
38
46
|
${env_vars} ${Python3_EXECUTABLE} -m pybind11_mkdoc ${headers} -o
|
39
47
|
${CMAKE_CURRENT_SOURCE_DIR}/jormungandr/cpp/docstrings.hpp
|
40
48
|
-I/usr/lib/clang/`clang++ --version | grep -E -o '[0-9]+' | head
|
41
|
-
-1`/include ${target_dirs} ${eigen_dirs}
|
49
|
+
-1`/include ${target_dirs} ${eigen_dirs} ${small_vector_dirs}
|
50
|
+
-std=c++23
|
42
51
|
DEPENDS ${headers}
|
43
52
|
USES_TERMINAL
|
44
53
|
)
|
@@ -6,11 +6,11 @@
|
|
6
6
|
#include <utility>
|
7
7
|
|
8
8
|
#include <Eigen/SparseCore>
|
9
|
+
#include <gch/small_vector.hpp>
|
9
10
|
|
10
11
|
#include "sleipnir/autodiff/expression_graph.hpp"
|
11
12
|
#include "sleipnir/autodiff/variable.hpp"
|
12
13
|
#include "sleipnir/autodiff/variable_matrix.hpp"
|
13
|
-
#include "sleipnir/util/small_vector.hpp"
|
14
14
|
|
15
15
|
namespace slp::detail {
|
16
16
|
|
@@ -101,8 +101,9 @@ class AdjointExpressionGraph {
|
|
101
101
|
* @param wrt Vector of variables with respect to which to compute the
|
102
102
|
* Jacobian.
|
103
103
|
*/
|
104
|
-
void append_adjoint_triplets(
|
105
|
-
|
104
|
+
void append_adjoint_triplets(
|
105
|
+
gch::small_vector<Eigen::Triplet<double>>& triplets, int row,
|
106
|
+
const VariableMatrix& wrt) const {
|
106
107
|
// Read docs/algorithms.md#Reverse_accumulation_automatic_differentiation
|
107
108
|
// for background on reverse accumulation automatic differentiation.
|
108
109
|
|
@@ -165,10 +166,10 @@ class AdjointExpressionGraph {
|
|
165
166
|
|
166
167
|
private:
|
167
168
|
// Topological sort of graph from parent to child
|
168
|
-
small_vector<Expression*> m_top_list;
|
169
|
+
gch::small_vector<Expression*> m_top_list;
|
169
170
|
|
170
171
|
// List that maps nodes to their respective column
|
171
|
-
small_vector<int> m_col_list;
|
172
|
+
gch::small_vector<int> m_col_list;
|
172
173
|
};
|
173
174
|
|
174
175
|
} // namespace slp::detail
|
@@ -11,10 +11,11 @@
|
|
11
11
|
#include <numbers>
|
12
12
|
#include <utility>
|
13
13
|
|
14
|
+
#include <gch/small_vector.hpp>
|
15
|
+
|
14
16
|
#include "sleipnir/autodiff/expression_type.hpp"
|
15
17
|
#include "sleipnir/util/intrusive_shared_ptr.hpp"
|
16
18
|
#include "sleipnir/util/pool.hpp"
|
17
|
-
#include "sleipnir/util/small_vector.hpp"
|
18
19
|
|
19
20
|
namespace slp::detail {
|
20
21
|
|
@@ -694,7 +695,7 @@ inline constexpr void dec_ref_count(Expression* expr) {
|
|
694
695
|
// Expression destructor when expr's refcount reaches zero can cause a stack
|
695
696
|
// overflow. Instead, we iterate over its children to decrement their
|
696
697
|
// refcounts and deallocate them.
|
697
|
-
small_vector<Expression*> stack;
|
698
|
+
gch::small_vector<Expression*> stack;
|
698
699
|
stack.emplace_back(expr);
|
699
700
|
|
700
701
|
while (!stack.empty()) {
|
@@ -4,8 +4,9 @@
|
|
4
4
|
|
5
5
|
#include <ranges>
|
6
6
|
|
7
|
+
#include <gch/small_vector.hpp>
|
8
|
+
|
7
9
|
#include "sleipnir/autodiff/expression.hpp"
|
8
|
-
#include "sleipnir/util/small_vector.hpp"
|
9
10
|
|
10
11
|
namespace slp::detail {
|
11
12
|
|
@@ -16,8 +17,9 @@ namespace slp::detail {
|
|
16
17
|
*
|
17
18
|
* @param root The root node of the expression.
|
18
19
|
*/
|
19
|
-
inline small_vector<Expression*> topological_sort(
|
20
|
-
|
20
|
+
inline gch::small_vector<Expression*> topological_sort(
|
21
|
+
const ExpressionPtr& root) {
|
22
|
+
gch::small_vector<Expression*> list;
|
21
23
|
|
22
24
|
// If the root type is a constant, Update() is a no-op, so there's no work
|
23
25
|
// to do
|
@@ -26,7 +28,7 @@ inline small_vector<Expression*> topological_sort(const ExpressionPtr& root) {
|
|
26
28
|
}
|
27
29
|
|
28
30
|
// Stack of nodes to explore
|
29
|
-
small_vector<Expression*> stack;
|
31
|
+
gch::small_vector<Expression*> stack;
|
30
32
|
|
31
33
|
// Enumerate incoming edges for each node via depth-first search
|
32
34
|
stack.emplace_back(root.get());
|
@@ -73,7 +75,7 @@ inline small_vector<Expression*> topological_sort(const ExpressionPtr& root) {
|
|
73
75
|
*
|
74
76
|
* @param list Topological sort of graph from parent to child.
|
75
77
|
*/
|
76
|
-
inline void update_values(const small_vector<Expression*>& list) {
|
78
|
+
inline void update_values(const gch::small_vector<Expression*>& list) {
|
77
79
|
// Traverse graph from child to parent and update values
|
78
80
|
for (auto& node : list | std::views::reverse) {
|
79
81
|
auto& lhs = node->args[0];
|
@@ -5,12 +5,12 @@
|
|
5
5
|
#include <utility>
|
6
6
|
|
7
7
|
#include <Eigen/SparseCore>
|
8
|
+
#include <gch/small_vector.hpp>
|
8
9
|
|
9
10
|
#include "sleipnir/autodiff/adjoint_expression_graph.hpp"
|
10
11
|
#include "sleipnir/autodiff/variable.hpp"
|
11
12
|
#include "sleipnir/autodiff/variable_matrix.hpp"
|
12
13
|
#include "sleipnir/util/concepts.hpp"
|
13
|
-
#include "sleipnir/util/small_vector.hpp"
|
14
14
|
#include "sleipnir/util/symbol_exports.hpp"
|
15
15
|
|
16
16
|
namespace slp {
|
@@ -154,16 +154,16 @@ class SLEIPNIR_DLLEXPORT Hessian {
|
|
154
154
|
VariableMatrix m_variables;
|
155
155
|
VariableMatrix m_wrt;
|
156
156
|
|
157
|
-
small_vector<detail::AdjointExpressionGraph> m_graphs;
|
157
|
+
gch::small_vector<detail::AdjointExpressionGraph> m_graphs;
|
158
158
|
|
159
159
|
Eigen::SparseMatrix<double> m_H{m_variables.rows(), m_wrt.rows()};
|
160
160
|
|
161
161
|
// Cached triplets for gradients of linear rows
|
162
|
-
small_vector<Eigen::Triplet<double>> m_cached_triplets;
|
162
|
+
gch::small_vector<Eigen::Triplet<double>> m_cached_triplets;
|
163
163
|
|
164
164
|
// List of row indices for nonlinear rows whose graients will be computed in
|
165
165
|
// Value()
|
166
|
-
small_vector<int> m_nonlinear_rows;
|
166
|
+
gch::small_vector<int> m_nonlinear_rows;
|
167
167
|
};
|
168
168
|
|
169
169
|
} // namespace slp
|
@@ -5,12 +5,12 @@
|
|
5
5
|
#include <utility>
|
6
6
|
|
7
7
|
#include <Eigen/SparseCore>
|
8
|
+
#include <gch/small_vector.hpp>
|
8
9
|
|
9
10
|
#include "sleipnir/autodiff/adjoint_expression_graph.hpp"
|
10
11
|
#include "sleipnir/autodiff/variable.hpp"
|
11
12
|
#include "sleipnir/autodiff/variable_matrix.hpp"
|
12
13
|
#include "sleipnir/util/concepts.hpp"
|
13
|
-
#include "sleipnir/util/small_vector.hpp"
|
14
14
|
#include "sleipnir/util/symbol_exports.hpp"
|
15
15
|
|
16
16
|
namespace slp {
|
@@ -143,16 +143,16 @@ class SLEIPNIR_DLLEXPORT Jacobian {
|
|
143
143
|
VariableMatrix m_variables;
|
144
144
|
VariableMatrix m_wrt;
|
145
145
|
|
146
|
-
small_vector<detail::AdjointExpressionGraph> m_graphs;
|
146
|
+
gch::small_vector<detail::AdjointExpressionGraph> m_graphs;
|
147
147
|
|
148
148
|
Eigen::SparseMatrix<double> m_J{m_variables.rows(), m_wrt.rows()};
|
149
149
|
|
150
150
|
// Cached triplets for gradients of linear rows
|
151
|
-
small_vector<Eigen::Triplet<double>> m_cached_triplets;
|
151
|
+
gch::small_vector<Eigen::Triplet<double>> m_cached_triplets;
|
152
152
|
|
153
153
|
// List of row indices for nonlinear rows whose graients will be computed in
|
154
154
|
// Value()
|
155
|
-
small_vector<int> m_nonlinear_rows;
|
155
|
+
gch::small_vector<int> m_nonlinear_rows;
|
156
156
|
};
|
157
157
|
|
158
158
|
} // namespace slp
|
@@ -11,12 +11,12 @@
|
|
11
11
|
#include <vector>
|
12
12
|
|
13
13
|
#include <Eigen/Core>
|
14
|
+
#include <gch/small_vector.hpp>
|
14
15
|
|
15
16
|
#include "sleipnir/autodiff/expression.hpp"
|
16
17
|
#include "sleipnir/autodiff/expression_graph.hpp"
|
17
18
|
#include "sleipnir/util/assert.hpp"
|
18
19
|
#include "sleipnir/util/concepts.hpp"
|
19
|
-
#include "sleipnir/util/small_vector.hpp"
|
20
20
|
#include "sleipnir/util/symbol_exports.hpp"
|
21
21
|
|
22
22
|
#ifndef SLEIPNIR_DISABLE_DIAGNOSTICS
|
@@ -256,7 +256,7 @@ class SLEIPNIR_DLLEXPORT Variable {
|
|
256
256
|
|
257
257
|
/// Used to update the value of this variable based on the values of its
|
258
258
|
/// dependent variables
|
259
|
-
small_vector<detail::Expression*> m_graph;
|
259
|
+
gch::small_vector<detail::Expression*> m_graph;
|
260
260
|
|
261
261
|
/// Used for lazy initialization of m_graph
|
262
262
|
bool m_graph_initialized = false;
|
@@ -495,8 +495,8 @@ template <typename LHS, typename RHS>
|
|
495
495
|
requires(ScalarLike<LHS> || MatrixLike<LHS>) &&
|
496
496
|
(ScalarLike<RHS> || MatrixLike<RHS>) &&
|
497
497
|
(SleipnirType<LHS> || SleipnirType<RHS>)
|
498
|
-
small_vector<Variable> make_constraints(LHS&& lhs, RHS&& rhs) {
|
499
|
-
small_vector<Variable> constraints;
|
498
|
+
gch::small_vector<Variable> make_constraints(LHS&& lhs, RHS&& rhs) {
|
499
|
+
gch::small_vector<Variable> constraints;
|
500
500
|
|
501
501
|
if constexpr (ScalarLike<LHS> && ScalarLike<RHS>) {
|
502
502
|
constraints.emplace_back(lhs - rhs);
|
@@ -558,7 +558,7 @@ small_vector<Variable> make_constraints(LHS&& lhs, RHS&& rhs) {
|
|
558
558
|
*/
|
559
559
|
struct SLEIPNIR_DLLEXPORT EqualityConstraints {
|
560
560
|
/// A vector of scalar equality constraints.
|
561
|
-
small_vector<Variable> constraints;
|
561
|
+
gch::small_vector<Variable> constraints;
|
562
562
|
|
563
563
|
/**
|
564
564
|
* Concatenates multiple equality constraints.
|
@@ -619,7 +619,7 @@ struct SLEIPNIR_DLLEXPORT EqualityConstraints {
|
|
619
619
|
*/
|
620
620
|
struct SLEIPNIR_DLLEXPORT InequalityConstraints {
|
621
621
|
/// A vector of scalar inequality constraints.
|
622
|
-
small_vector<Variable> constraints;
|
622
|
+
gch::small_vector<Variable> constraints;
|
623
623
|
|
624
624
|
/**
|
625
625
|
* Concatenates multiple inequality constraints.
|
@@ -11,6 +11,7 @@
|
|
11
11
|
#include <vector>
|
12
12
|
|
13
13
|
#include <Eigen/Core>
|
14
|
+
#include <gch/small_vector.hpp>
|
14
15
|
|
15
16
|
#include "sleipnir/autodiff/slice.hpp"
|
16
17
|
#include "sleipnir/autodiff/variable.hpp"
|
@@ -18,7 +19,6 @@
|
|
18
19
|
#include "sleipnir/util/assert.hpp"
|
19
20
|
#include "sleipnir/util/concepts.hpp"
|
20
21
|
#include "sleipnir/util/function_ref.hpp"
|
21
|
-
#include "sleipnir/util/small_vector.hpp"
|
22
22
|
#include "sleipnir/util/symbol_exports.hpp"
|
23
23
|
|
24
24
|
namespace slp {
|
@@ -1029,7 +1029,8 @@ class SLEIPNIR_DLLEXPORT VariableMatrix {
|
|
1029
1029
|
|
1030
1030
|
constexpr iterator() noexcept = default;
|
1031
1031
|
|
1032
|
-
explicit constexpr iterator(
|
1032
|
+
explicit constexpr iterator(
|
1033
|
+
gch::small_vector<Variable>::iterator it) noexcept
|
1033
1034
|
: m_it{it} {}
|
1034
1035
|
|
1035
1036
|
constexpr iterator& operator++() noexcept {
|
@@ -1048,7 +1049,7 @@ class SLEIPNIR_DLLEXPORT VariableMatrix {
|
|
1048
1049
|
constexpr reference operator*() const noexcept { return *m_it; }
|
1049
1050
|
|
1050
1051
|
private:
|
1051
|
-
small_vector<Variable>::iterator m_it;
|
1052
|
+
gch::small_vector<Variable>::iterator m_it;
|
1052
1053
|
};
|
1053
1054
|
|
1054
1055
|
class const_iterator {
|
@@ -1062,7 +1063,7 @@ class SLEIPNIR_DLLEXPORT VariableMatrix {
|
|
1062
1063
|
constexpr const_iterator() noexcept = default;
|
1063
1064
|
|
1064
1065
|
explicit constexpr const_iterator(
|
1065
|
-
small_vector<Variable>::const_iterator it) noexcept
|
1066
|
+
gch::small_vector<Variable>::const_iterator it) noexcept
|
1066
1067
|
: m_it{it} {}
|
1067
1068
|
|
1068
1069
|
constexpr const_iterator& operator++() noexcept {
|
@@ -1081,7 +1082,7 @@ class SLEIPNIR_DLLEXPORT VariableMatrix {
|
|
1081
1082
|
constexpr const_reference operator*() const noexcept { return *m_it; }
|
1082
1083
|
|
1083
1084
|
private:
|
1084
|
-
small_vector<Variable>::const_iterator m_it;
|
1085
|
+
gch::small_vector<Variable>::const_iterator m_it;
|
1085
1086
|
};
|
1086
1087
|
|
1087
1088
|
#endif // DOXYGEN_SHOULD_SKIP_THIS
|
@@ -1170,7 +1171,7 @@ class SLEIPNIR_DLLEXPORT VariableMatrix {
|
|
1170
1171
|
}
|
1171
1172
|
|
1172
1173
|
private:
|
1173
|
-
small_vector<Variable> m_storage;
|
1174
|
+
gch::small_vector<Variable> m_storage;
|
1174
1175
|
int m_rows = 0;
|
1175
1176
|
int m_cols = 0;
|
1176
1177
|
};
|
@@ -6,9 +6,10 @@
|
|
6
6
|
#include <future>
|
7
7
|
#include <span>
|
8
8
|
|
9
|
+
#include <gch/small_vector.hpp>
|
10
|
+
|
9
11
|
#include "sleipnir/optimization/solver/exit_status.hpp"
|
10
12
|
#include "sleipnir/util/function_ref.hpp"
|
11
|
-
#include "sleipnir/util/small_vector.hpp"
|
12
13
|
|
13
14
|
namespace slp {
|
14
15
|
|
@@ -48,14 +49,14 @@ MultistartResult<DecisionVariables> Multistart(
|
|
48
49
|
const DecisionVariables& initial_guess)>
|
49
50
|
solve,
|
50
51
|
std::span<const DecisionVariables> initial_guesses) {
|
51
|
-
small_vector<std::future<MultistartResult<DecisionVariables>>> futures;
|
52
|
+
gch::small_vector<std::future<MultistartResult<DecisionVariables>>> futures;
|
52
53
|
futures.reserve(initial_guesses.size());
|
53
54
|
|
54
55
|
for (const auto& initial_guess : initial_guesses) {
|
55
56
|
futures.emplace_back(std::async(std::launch::async, solve, initial_guess));
|
56
57
|
}
|
57
58
|
|
58
|
-
small_vector<MultistartResult<DecisionVariables>> results;
|
59
|
+
gch::small_vector<MultistartResult<DecisionVariables>> results;
|
59
60
|
results.reserve(futures.size());
|
60
61
|
|
61
62
|
for (auto& future : futures) {
|
@@ -11,6 +11,7 @@
|
|
11
11
|
#include <utility>
|
12
12
|
|
13
13
|
#include <Eigen/Core>
|
14
|
+
#include <gch/small_vector.hpp>
|
14
15
|
|
15
16
|
#include "sleipnir/autodiff/expression_type.hpp"
|
16
17
|
#include "sleipnir/autodiff/variable.hpp"
|
@@ -18,7 +19,6 @@
|
|
18
19
|
#include "sleipnir/optimization/solver/exit_status.hpp"
|
19
20
|
#include "sleipnir/optimization/solver/iteration_info.hpp"
|
20
21
|
#include "sleipnir/optimization/solver/options.hpp"
|
21
|
-
#include "sleipnir/util/small_vector.hpp"
|
22
22
|
#include "sleipnir/util/symbol_exports.hpp"
|
23
23
|
|
24
24
|
namespace slp {
|
@@ -320,19 +320,19 @@ class SLEIPNIR_DLLEXPORT Problem {
|
|
320
320
|
private:
|
321
321
|
// The list of decision variables, which are the root of the problem's
|
322
322
|
// expression tree
|
323
|
-
small_vector<Variable> m_decision_variables;
|
323
|
+
gch::small_vector<Variable> m_decision_variables;
|
324
324
|
|
325
325
|
// The cost function: f(x)
|
326
326
|
std::optional<Variable> m_f;
|
327
327
|
|
328
328
|
// The list of equality constraints: cₑ(x) = 0
|
329
|
-
small_vector<Variable> m_equality_constraints;
|
329
|
+
gch::small_vector<Variable> m_equality_constraints;
|
330
330
|
|
331
331
|
// The list of inequality constraints: cᵢ(x) ≥ 0
|
332
|
-
small_vector<Variable> m_inequality_constraints;
|
332
|
+
gch::small_vector<Variable> m_inequality_constraints;
|
333
333
|
|
334
334
|
// The iteration callbacks
|
335
|
-
small_vector<std::function<bool(const IterationInfo& info)>>
|
335
|
+
gch::small_vector<std::function<bool(const IterationInfo& info)>>
|
336
336
|
m_iteration_callbacks;
|
337
337
|
|
338
338
|
void print_exit_conditions([[maybe_unused]] const Options& options);
|
@@ -5,7 +5,8 @@
|
|
5
5
|
#include <cstddef>
|
6
6
|
#include <memory>
|
7
7
|
|
8
|
-
#include
|
8
|
+
#include <gch/small_vector.hpp>
|
9
|
+
|
9
10
|
#include "sleipnir/util/symbol_exports.hpp"
|
10
11
|
|
11
12
|
namespace slp {
|
@@ -103,8 +104,8 @@ class SLEIPNIR_DLLEXPORT PoolResource {
|
|
103
104
|
}
|
104
105
|
|
105
106
|
private:
|
106
|
-
small_vector<std::unique_ptr<std::byte[]>> m_buffer;
|
107
|
-
small_vector<void*> m_free_list;
|
107
|
+
gch::small_vector<std::unique_ptr<std::byte[]>> m_buffer;
|
108
|
+
gch::small_vector<void*> m_free_list;
|
108
109
|
size_t blocks_per_chunk;
|
109
110
|
|
110
111
|
/**
|
{sleipnirgroup_jormungandr-0.0.1.dev474 → sleipnirgroup_jormungandr-0.0.1.dev475}/pyproject.toml
RENAMED
@@ -1,7 +1,7 @@
|
|
1
1
|
[project]
|
2
2
|
name = "sleipnirgroup-jormungandr"
|
3
3
|
description = "A linearity-exploiting sparse nonlinear constrained optimization problem solver that uses the interior-point method."
|
4
|
-
version = "0.0.1.
|
4
|
+
version = "0.0.1.dev475"
|
5
5
|
readme = "README.md"
|
6
6
|
requires-python = ">=3.9"
|
7
7
|
dependencies = [ "matplotlib", "numpy", "scipy" ]
|
@@ -11,6 +11,7 @@
|
|
11
11
|
|
12
12
|
#include <Eigen/Core>
|
13
13
|
#include <Eigen/SparseCore>
|
14
|
+
#include <gch/small_vector.hpp>
|
14
15
|
|
15
16
|
#include "sleipnir/autodiff/expression_type.hpp"
|
16
17
|
#include "sleipnir/autodiff/gradient.hpp"
|
@@ -24,7 +25,6 @@
|
|
24
25
|
#include "sleipnir/optimization/solver/options.hpp"
|
25
26
|
#include "sleipnir/optimization/solver/sqp.hpp"
|
26
27
|
#include "sleipnir/util/print.hpp"
|
27
|
-
#include "sleipnir/util/small_vector.hpp"
|
28
28
|
#include "sleipnir/util/spy.hpp"
|
29
29
|
#include "util/print_diagnostics.hpp"
|
30
30
|
#include "util/setup_profiler.hpp"
|
@@ -60,7 +60,7 @@ ExitStatus Problem::solve(const Options& options, [[maybe_unused]] bool spy) {
|
|
60
60
|
return ExitStatus::SUCCESS;
|
61
61
|
}
|
62
62
|
|
63
|
-
small_vector<SetupProfiler> ad_setup_profilers;
|
63
|
+
gch::small_vector<SetupProfiler> ad_setup_profilers;
|
64
64
|
ad_setup_profilers.emplace_back("setup").start();
|
65
65
|
|
66
66
|
VariableMatrix x_ad{m_decision_variables};
|
@@ -340,19 +340,20 @@ void Problem::print_problem_analysis() {
|
|
340
340
|
slp::print("\n{} decision variables\n", m_decision_variables.size());
|
341
341
|
}
|
342
342
|
|
343
|
-
auto print_constraint_types =
|
344
|
-
|
345
|
-
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
343
|
+
auto print_constraint_types =
|
344
|
+
[](const gch::small_vector<Variable>& constraints) {
|
345
|
+
std::array<size_t, 5> counts{};
|
346
|
+
for (const auto& constraint : constraints) {
|
347
|
+
++counts[std::to_underlying(constraint.type())];
|
348
|
+
}
|
349
|
+
for (const auto& [count, name] :
|
350
|
+
std::views::zip(counts, std::array{"empty", "constant", "linear",
|
351
|
+
"quadratic", "nonlinear"})) {
|
352
|
+
if (count > 0) {
|
353
|
+
slp::println(" ↳ {} {}", count, name);
|
354
|
+
}
|
355
|
+
}
|
356
|
+
};
|
356
357
|
|
357
358
|
// Print constraint types
|
358
359
|
if (m_equality_constraints.size() == 1) {
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
#include <Eigen/Core>
|
12
12
|
#include <Eigen/SparseCore>
|
13
|
+
#include <gch/small_vector.hpp>
|
13
14
|
|
14
15
|
#include "optimization/regularized_ldlt.hpp"
|
15
16
|
#include "optimization/solver/util/error_estimate.hpp"
|
@@ -21,7 +22,6 @@
|
|
21
22
|
#include "sleipnir/optimization/solver/iteration_info.hpp"
|
22
23
|
#include "sleipnir/optimization/solver/options.hpp"
|
23
24
|
#include "sleipnir/util/assert.hpp"
|
24
|
-
#include "sleipnir/util/small_vector.hpp"
|
25
25
|
#include "util/print_diagnostics.hpp"
|
26
26
|
#include "util/scope_exit.hpp"
|
27
27
|
#include "util/scoped_profiler.hpp"
|
@@ -59,7 +59,7 @@ ExitStatus interior_point(
|
|
59
59
|
const Options& options, Eigen::VectorXd& x) {
|
60
60
|
const auto solve_start_time = std::chrono::steady_clock::now();
|
61
61
|
|
62
|
-
small_vector<SolveProfiler> solve_profilers;
|
62
|
+
gch::small_vector<SolveProfiler> solve_profilers;
|
63
63
|
solve_profilers.emplace_back("solver");
|
64
64
|
solve_profilers.emplace_back(" ↳ setup");
|
65
65
|
solve_profilers.emplace_back(" ↳ iteration");
|
@@ -224,7 +224,7 @@ ExitStatus interior_point(
|
|
224
224
|
};
|
225
225
|
|
226
226
|
// Kept outside the loop so its storage can be reused
|
227
|
-
small_vector<Eigen::Triplet<double>> triplets;
|
227
|
+
gch::small_vector<Eigen::Triplet<double>> triplets;
|
228
228
|
|
229
229
|
RegularizedLDLT solver{num_decision_variables, num_equality_constraints};
|
230
230
|
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
#include <Eigen/Core>
|
12
12
|
#include <Eigen/SparseCore>
|
13
|
+
#include <gch/small_vector.hpp>
|
13
14
|
|
14
15
|
#include "optimization/regularized_ldlt.hpp"
|
15
16
|
#include "optimization/solver/util/error_estimate.hpp"
|
@@ -34,7 +35,7 @@ ExitStatus newton(const NewtonMatrixCallbacks& matrix_callbacks,
|
|
34
35
|
const Options& options, Eigen::VectorXd& x) {
|
35
36
|
const auto solve_start_time = std::chrono::steady_clock::now();
|
36
37
|
|
37
|
-
small_vector<SolveProfiler> solve_profilers;
|
38
|
+
gch::small_vector<SolveProfiler> solve_profilers;
|
38
39
|
solve_profilers.emplace_back("solver");
|
39
40
|
solve_profilers.emplace_back(" ↳ setup");
|
40
41
|
solve_profilers.emplace_back(" ↳ iteration");
|
@@ -10,6 +10,7 @@
|
|
10
10
|
|
11
11
|
#include <Eigen/Core>
|
12
12
|
#include <Eigen/SparseCore>
|
13
|
+
#include <gch/small_vector.hpp>
|
13
14
|
|
14
15
|
#include "optimization/regularized_ldlt.hpp"
|
15
16
|
#include "optimization/solver/util/error_estimate.hpp"
|
@@ -20,7 +21,6 @@
|
|
20
21
|
#include "sleipnir/optimization/solver/iteration_info.hpp"
|
21
22
|
#include "sleipnir/optimization/solver/options.hpp"
|
22
23
|
#include "sleipnir/util/assert.hpp"
|
23
|
-
#include "sleipnir/util/small_vector.hpp"
|
24
24
|
#include "util/print_diagnostics.hpp"
|
25
25
|
#include "util/scope_exit.hpp"
|
26
26
|
#include "util/scoped_profiler.hpp"
|
@@ -50,7 +50,7 @@ ExitStatus sqp(const SQPMatrixCallbacks& matrix_callbacks,
|
|
50
50
|
const Options& options, Eigen::VectorXd& x) {
|
51
51
|
const auto solve_start_time = std::chrono::steady_clock::now();
|
52
52
|
|
53
|
-
small_vector<SolveProfiler> solve_profilers;
|
53
|
+
gch::small_vector<SolveProfiler> solve_profilers;
|
54
54
|
solve_profilers.emplace_back("solver");
|
55
55
|
solve_profilers.emplace_back(" ↳ setup");
|
56
56
|
solve_profilers.emplace_back(" ↳ iteration");
|
@@ -156,7 +156,7 @@ ExitStatus sqp(const SQPMatrixCallbacks& matrix_callbacks,
|
|
156
156
|
Filter filter;
|
157
157
|
|
158
158
|
// Kept outside the loop so its storage can be reused
|
159
|
-
small_vector<Eigen::Triplet<double>> triplets;
|
159
|
+
gch::small_vector<Eigen::Triplet<double>> triplets;
|
160
160
|
|
161
161
|
RegularizedLDLT solver{num_decision_variables, num_equality_constraints};
|
162
162
|
|