sleipnirgroup-jormungandr 0.5.4.dev3__tar.gz → 0.5.4.dev5__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.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/PKG-INFO +1 -1
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/interior_point.hpp +39 -37
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/newton.hpp +13 -9
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/sqp.hpp +16 -13
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/src/sleipnir/__init__.py +1 -1
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/solver/exit_status_test.py +5 -2
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/CMakeLists.txt +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/README.md +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/SleipnirConfig.cmake.in +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/BuildTypes.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/CompilerFlags.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/Pybind11Mkdoc.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/SubdirList.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/arm-none-eabi.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/expression.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/expression_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/gradient.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/gradient_expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/hessian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/jacobian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/slice.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/variable.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/variable_block.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/variable_matrix.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/multistart.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/problem.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/interior_point_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/options.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/filter.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/inertia.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/is_locally_infeasible.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/lagrange_multiplier_estimate.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/regularized_ldlt.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/assert.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/concepts.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/empty.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/function_ref.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/pool.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/print.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/print_diagnostics.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/profiler.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/scope_exit.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/spy.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/symbol_exports.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/pyproject.toml +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_variable.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_variable_block.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/binders.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/docstrings.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/for_each_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/main.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/try_cast.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/src/sleipnir/autodiff/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/src/sleipnir/optimization/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/gradient_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/hessian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/jacobian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/variable_matrix_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/cart_pole_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/cart_pole_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/cart_pole_util.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/constraints_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/decision_variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/differential_drive_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/differential_drive_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/differential_drive_util.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/double_integrator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/flywheel_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/flywheel_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/linear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/multistart_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/nonlinear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/problem_spy_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/quadratic_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/rk4.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/trivial_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/solver/interior_point.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/solver/newton.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/solver/sqp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/util/pool.cpp +0 -0
|
@@ -6,7 +6,6 @@
|
|
|
6
6
|
#include <chrono>
|
|
7
7
|
#include <cmath>
|
|
8
8
|
#include <functional>
|
|
9
|
-
#include <limits>
|
|
10
9
|
#include <span>
|
|
11
10
|
|
|
12
11
|
#include <Eigen/Core>
|
|
@@ -259,6 +258,15 @@ ExitStatus interior_point(
|
|
|
259
258
|
slp_assert(A_i.rows() == matrices.num_inequality_constraints);
|
|
260
259
|
slp_assert(A_i.cols() == matrices.num_decision_variables);
|
|
261
260
|
|
|
261
|
+
DenseVector trial_x;
|
|
262
|
+
DenseVector trial_s;
|
|
263
|
+
DenseVector trial_y;
|
|
264
|
+
DenseVector trial_z;
|
|
265
|
+
|
|
266
|
+
Scalar trial_f;
|
|
267
|
+
DenseVector trial_c_e;
|
|
268
|
+
DenseVector trial_c_i;
|
|
269
|
+
|
|
262
270
|
// Check for overconstrained problem
|
|
263
271
|
if (matrices.num_equality_constraints > matrices.num_decision_variables) {
|
|
264
272
|
if (options.diagnostics) {
|
|
@@ -338,7 +346,8 @@ ExitStatus interior_point(
|
|
|
338
346
|
int full_step_rejected_counter = 0;
|
|
339
347
|
|
|
340
348
|
// Error
|
|
341
|
-
Scalar E_0 =
|
|
349
|
+
Scalar E_0 = kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
350
|
+
g, A_e, c_e, A_i, c_i, s, y, z, Scalar(0));
|
|
342
351
|
|
|
343
352
|
setup_prof.stop();
|
|
344
353
|
|
|
@@ -479,13 +488,22 @@ ExitStatus interior_point(
|
|
|
479
488
|
|
|
480
489
|
// Loop until a step is accepted
|
|
481
490
|
while (1) {
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
491
|
+
trial_x = x + α * step.p_x;
|
|
492
|
+
if (options.feasible_ipm && c_i.cwiseGreater(Scalar(0)).all()) {
|
|
493
|
+
// If the inequality constraints are all feasible, prevent them from
|
|
494
|
+
// becoming infeasible again.
|
|
495
|
+
//
|
|
496
|
+
// See equation (19.30) in [1].
|
|
497
|
+
trial_s = trial_c_i;
|
|
498
|
+
} else {
|
|
499
|
+
trial_s = s + α * step.p_s;
|
|
500
|
+
}
|
|
501
|
+
trial_y = y + α_z * step.p_y;
|
|
502
|
+
trial_z = z + α_z * step.p_z;
|
|
485
503
|
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
504
|
+
trial_f = matrices.f(trial_x);
|
|
505
|
+
trial_c_e = matrices.c_e(trial_x);
|
|
506
|
+
trial_c_i = matrices.c_i(trial_x);
|
|
489
507
|
|
|
490
508
|
// If f(xₖ + αpₖˣ), cₑ(xₖ + αpₖˣ), or cᵢ(xₖ + αpₖˣ) aren't finite, reduce
|
|
491
509
|
// step size immediately
|
|
@@ -501,17 +519,6 @@ ExitStatus interior_point(
|
|
|
501
519
|
continue;
|
|
502
520
|
}
|
|
503
521
|
|
|
504
|
-
DenseVector trial_s;
|
|
505
|
-
if (options.feasible_ipm && c_i.cwiseGreater(Scalar(0)).all()) {
|
|
506
|
-
// If the inequality constraints are all feasible, prevent them from
|
|
507
|
-
// becoming infeasible again.
|
|
508
|
-
//
|
|
509
|
-
// See equation (19.30) in [1].
|
|
510
|
-
trial_s = trial_c_i;
|
|
511
|
-
} else {
|
|
512
|
-
trial_s = s + α * step.p_s;
|
|
513
|
-
}
|
|
514
|
-
|
|
515
522
|
// Check whether filter accepts trial iterate
|
|
516
523
|
FilterEntry trial_entry{trial_f, trial_s, trial_c_e, trial_c_i, μ};
|
|
517
524
|
if (filter.try_add(current_entry, trial_entry, step.p_x, g, α)) {
|
|
@@ -576,12 +583,12 @@ ExitStatus interior_point(
|
|
|
576
583
|
compute_step(soc_step);
|
|
577
584
|
|
|
578
585
|
// αˢᵒᶜ = max(α ∈ (0, 1] : sₖ + αpₖˢ ≥ (1−τⱼ)sₖ)
|
|
586
|
+
// αₖᶻˢᵒᶜ = max(α ∈ (0, 1] : zₖ + αpₖᶻ ≥ (1−τⱼ)zₖ)
|
|
579
587
|
α_soc = fraction_to_the_boundary_rule<Scalar>(s, soc_step.p_s, τ);
|
|
588
|
+
α_z_soc = fraction_to_the_boundary_rule<Scalar>(z, soc_step.p_z, τ);
|
|
589
|
+
|
|
580
590
|
trial_x = x + α_soc * soc_step.p_x;
|
|
581
591
|
trial_s = s + α_soc * soc_step.p_s;
|
|
582
|
-
|
|
583
|
-
// αₖᶻ = max(α ∈ (0, 1] : zₖ + αpₖᶻ ≥ (1−τⱼ)zₖ)
|
|
584
|
-
α_z_soc = fraction_to_the_boundary_rule<Scalar>(z, soc_step.p_z, τ);
|
|
585
592
|
trial_y = y + α_z_soc * soc_step.p_y;
|
|
586
593
|
trial_z = z + α_z_soc * soc_step.p_z;
|
|
587
594
|
|
|
@@ -648,21 +655,19 @@ ExitStatus interior_point(
|
|
|
648
655
|
|
|
649
656
|
trial_x = x + α_max * step.p_x;
|
|
650
657
|
trial_s = s + α_max * step.p_s;
|
|
651
|
-
|
|
652
658
|
trial_y = y + α_z * step.p_y;
|
|
653
659
|
trial_z = z + α_z * step.p_z;
|
|
654
660
|
|
|
661
|
+
trial_f = matrices.f(trial_x);
|
|
655
662
|
trial_c_e = matrices.c_e(trial_x);
|
|
656
663
|
trial_c_i = matrices.c_i(trial_x);
|
|
657
664
|
|
|
658
665
|
Scalar next_kkt_error = kkt_error<Scalar, KKTErrorType::ONE_NORM>(
|
|
659
|
-
matrices.g(trial_x), matrices.A_e(trial_x),
|
|
666
|
+
matrices.g(trial_x), matrices.A_e(trial_x), trial_c_e,
|
|
660
667
|
matrices.A_i(trial_x), trial_c_i, trial_s, trial_y, trial_z, μ);
|
|
661
668
|
|
|
662
669
|
// If the step using αᵐᵃˣ reduced the KKT error, accept it anyway
|
|
663
670
|
if (next_kkt_error <= Scalar(0.999) * current_kkt_error) {
|
|
664
|
-
α = α_max;
|
|
665
|
-
|
|
666
671
|
// Accept step
|
|
667
672
|
break;
|
|
668
673
|
}
|
|
@@ -718,14 +723,11 @@ ExitStatus interior_point(
|
|
|
718
723
|
full_step_rejected_counter = 0;
|
|
719
724
|
}
|
|
720
725
|
|
|
721
|
-
//
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
s += α * step.p_s;
|
|
727
|
-
y += α_z * step.p_y;
|
|
728
|
-
z += α_z * step.p_z;
|
|
726
|
+
// Update iterates
|
|
727
|
+
x = trial_x;
|
|
728
|
+
s = trial_s;
|
|
729
|
+
y = trial_y;
|
|
730
|
+
z = trial_z;
|
|
729
731
|
|
|
730
732
|
// A requirement for the convergence proof is that the primal-dual barrier
|
|
731
733
|
// term Hessian Σₖ₊₁ does not deviate arbitrarily much from the primal
|
|
@@ -748,7 +750,6 @@ ExitStatus interior_point(
|
|
|
748
750
|
}
|
|
749
751
|
|
|
750
752
|
// Update autodiff for Jacobians and Hessian
|
|
751
|
-
f = matrices.f(x);
|
|
752
753
|
A_e = matrices.A_e(x);
|
|
753
754
|
A_i = matrices.A_i(x);
|
|
754
755
|
g = matrices.g(x);
|
|
@@ -756,8 +757,9 @@ ExitStatus interior_point(
|
|
|
756
757
|
|
|
757
758
|
ScopedProfiler next_iter_prep_profiler{next_iter_prep_prof};
|
|
758
759
|
|
|
759
|
-
|
|
760
|
-
|
|
760
|
+
f = trial_f;
|
|
761
|
+
c_e = trial_c_e;
|
|
762
|
+
c_i = trial_c_i;
|
|
761
763
|
|
|
762
764
|
// Update the error
|
|
763
765
|
E_0 = kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
#include <chrono>
|
|
6
6
|
#include <cmath>
|
|
7
7
|
#include <functional>
|
|
8
|
-
#include <limits>
|
|
9
8
|
#include <span>
|
|
10
9
|
|
|
11
10
|
#include <Eigen/Core>
|
|
@@ -122,6 +121,10 @@ ExitStatus newton(
|
|
|
122
121
|
slp_assert(H.rows() == matrices.num_decision_variables);
|
|
123
122
|
slp_assert(H.cols() == matrices.num_decision_variables);
|
|
124
123
|
|
|
124
|
+
DenseVector trial_x;
|
|
125
|
+
|
|
126
|
+
Scalar trial_f;
|
|
127
|
+
|
|
125
128
|
// Check whether initial guess has finite cost and derivatives
|
|
126
129
|
if (!isfinite(f) || !all_finite(g) || !all_finite(H)) {
|
|
127
130
|
return ExitStatus::NONFINITE_INITIAL_GUESS;
|
|
@@ -138,7 +141,7 @@ ExitStatus newton(
|
|
|
138
141
|
constexpr Scalar α_min(1e-20);
|
|
139
142
|
|
|
140
143
|
// Error
|
|
141
|
-
Scalar E_0 =
|
|
144
|
+
Scalar E_0 = kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(g);
|
|
142
145
|
|
|
143
146
|
setup_prof.stop();
|
|
144
147
|
|
|
@@ -194,9 +197,9 @@ ExitStatus newton(
|
|
|
194
197
|
// Loop until a step is accepted. If a step becomes acceptable, the loop
|
|
195
198
|
// will exit early.
|
|
196
199
|
while (1) {
|
|
197
|
-
|
|
200
|
+
trial_x = x + α * p_x;
|
|
198
201
|
|
|
199
|
-
|
|
202
|
+
trial_f = matrices.f(trial_x);
|
|
200
203
|
|
|
201
204
|
// If f(xₖ + αpₖˣ) isn't finite, reduce step size immediately
|
|
202
205
|
if (!isfinite(trial_f)) {
|
|
@@ -223,14 +226,14 @@ ExitStatus newton(
|
|
|
223
226
|
if (α < α_min) {
|
|
224
227
|
Scalar current_kkt_error = kkt_error<Scalar, KKTErrorType::ONE_NORM>(g);
|
|
225
228
|
|
|
226
|
-
|
|
229
|
+
trial_x = x + α_max * p_x;
|
|
227
230
|
|
|
228
231
|
Scalar next_kkt_error =
|
|
229
232
|
kkt_error<Scalar, KKTErrorType::ONE_NORM>(matrices.g(trial_x));
|
|
230
233
|
|
|
231
234
|
// If the step using αᵐᵃˣ reduced the KKT error, accept it anyway
|
|
232
235
|
if (next_kkt_error <= Scalar(0.999) * current_kkt_error) {
|
|
233
|
-
|
|
236
|
+
trial_f = matrices.f(trial_x);
|
|
234
237
|
|
|
235
238
|
// Accept step
|
|
236
239
|
break;
|
|
@@ -242,16 +245,17 @@ ExitStatus newton(
|
|
|
242
245
|
|
|
243
246
|
line_search_profiler.stop();
|
|
244
247
|
|
|
245
|
-
//
|
|
246
|
-
x
|
|
248
|
+
// Update iterates
|
|
249
|
+
x = trial_x;
|
|
247
250
|
|
|
248
251
|
// Update autodiff for Hessian
|
|
249
|
-
f = matrices.f(x);
|
|
250
252
|
g = matrices.g(x);
|
|
251
253
|
H = matrices.H(x);
|
|
252
254
|
|
|
253
255
|
ScopedProfiler next_iter_prep_profiler{next_iter_prep_prof};
|
|
254
256
|
|
|
257
|
+
f = trial_f;
|
|
258
|
+
|
|
255
259
|
// Update the error
|
|
256
260
|
E_0 = kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(g);
|
|
257
261
|
|
|
@@ -5,7 +5,6 @@
|
|
|
5
5
|
#include <chrono>
|
|
6
6
|
#include <cmath>
|
|
7
7
|
#include <functional>
|
|
8
|
-
#include <limits>
|
|
9
8
|
#include <span>
|
|
10
9
|
|
|
11
10
|
#include <Eigen/Core>
|
|
@@ -198,6 +197,12 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
198
197
|
slp_assert(A_e.rows() == matrices.num_equality_constraints);
|
|
199
198
|
slp_assert(A_e.cols() == matrices.num_decision_variables);
|
|
200
199
|
|
|
200
|
+
DenseVector trial_x;
|
|
201
|
+
DenseVector trial_y;
|
|
202
|
+
|
|
203
|
+
Scalar trial_f;
|
|
204
|
+
DenseVector trial_c_e;
|
|
205
|
+
|
|
201
206
|
// Check for overconstrained problem
|
|
202
207
|
if (matrices.num_equality_constraints > matrices.num_decision_variables) {
|
|
203
208
|
if (options.diagnostics) {
|
|
@@ -230,7 +235,7 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
230
235
|
int full_step_rejected_counter = 0;
|
|
231
236
|
|
|
232
237
|
// Error
|
|
233
|
-
Scalar E_0 =
|
|
238
|
+
Scalar E_0 = kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(g, A_e, c_e, y);
|
|
234
239
|
|
|
235
240
|
setup_prof.stop();
|
|
236
241
|
|
|
@@ -331,11 +336,11 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
331
336
|
|
|
332
337
|
// Loop until a step is accepted
|
|
333
338
|
while (1) {
|
|
334
|
-
|
|
335
|
-
|
|
339
|
+
trial_x = x + α * step.p_x;
|
|
340
|
+
trial_y = y + α * step.p_y;
|
|
336
341
|
|
|
337
|
-
|
|
338
|
-
|
|
342
|
+
trial_f = matrices.f(trial_x);
|
|
343
|
+
trial_c_e = matrices.c_e(trial_x);
|
|
339
344
|
|
|
340
345
|
// If f(xₖ + αpₖˣ) or cₑ(xₖ + αpₖˣ) aren't finite, reduce step size
|
|
341
346
|
// immediately
|
|
@@ -469,6 +474,7 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
469
474
|
trial_x = x + α_max * step.p_x;
|
|
470
475
|
trial_y = y + α_max * step.p_y;
|
|
471
476
|
|
|
477
|
+
trial_f = matrices.f(trial_x);
|
|
472
478
|
trial_c_e = matrices.c_e(trial_x);
|
|
473
479
|
|
|
474
480
|
Scalar next_kkt_error = kkt_error<Scalar, KKTErrorType::ONE_NORM>(
|
|
@@ -476,8 +482,6 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
476
482
|
|
|
477
483
|
// If the step using αᵐᵃˣ reduced the KKT error, accept it anyway
|
|
478
484
|
if (next_kkt_error <= Scalar(0.999) * current_kkt_error) {
|
|
479
|
-
α = α_max;
|
|
480
|
-
|
|
481
485
|
// Accept step
|
|
482
486
|
break;
|
|
483
487
|
}
|
|
@@ -525,20 +529,19 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
525
529
|
full_step_rejected_counter = 0;
|
|
526
530
|
}
|
|
527
531
|
|
|
528
|
-
//
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
y += α * step.p_y;
|
|
532
|
+
// Update iterates
|
|
533
|
+
x = trial_x;
|
|
534
|
+
y = trial_y;
|
|
532
535
|
}
|
|
533
536
|
|
|
534
537
|
// Update autodiff for Jacobians and Hessian
|
|
535
|
-
f = matrices.f(x);
|
|
536
538
|
A_e = matrices.A_e(x);
|
|
537
539
|
g = matrices.g(x);
|
|
538
540
|
H = matrices.H(x, y);
|
|
539
541
|
|
|
540
542
|
ScopedProfiler next_iter_prep_profiler{next_iter_prep_prof};
|
|
541
543
|
|
|
544
|
+
f = trial_f;
|
|
542
545
|
c_e = matrices.c_e(x);
|
|
543
546
|
|
|
544
547
|
// Update the error
|
|
@@ -6,19 +6,20 @@ from sleipnir.optimization import ExitStatus, Problem
|
|
|
6
6
|
|
|
7
7
|
def test_callback_requested_stop():
|
|
8
8
|
problem = Problem()
|
|
9
|
-
|
|
10
9
|
x = problem.decision_variable()
|
|
11
|
-
|
|
12
10
|
problem.minimize(x * x)
|
|
13
11
|
|
|
14
12
|
problem.add_callback(lambda info: False)
|
|
13
|
+
x.set_value(1)
|
|
15
14
|
assert problem.solve(diagnostics=True) == ExitStatus.SUCCESS
|
|
16
15
|
|
|
17
16
|
problem.add_callback(lambda info: True)
|
|
17
|
+
x.set_value(1)
|
|
18
18
|
assert problem.solve(diagnostics=True) == ExitStatus.CALLBACK_REQUESTED_STOP
|
|
19
19
|
|
|
20
20
|
problem.clear_callbacks()
|
|
21
21
|
problem.add_callback(lambda info: False)
|
|
22
|
+
x.set_value(1)
|
|
22
23
|
assert problem.solve(diagnostics=True) == ExitStatus.SUCCESS
|
|
23
24
|
|
|
24
25
|
|
|
@@ -137,6 +138,7 @@ def test_max_iterations_exceeded():
|
|
|
137
138
|
problem = Problem()
|
|
138
139
|
|
|
139
140
|
x = problem.decision_variable()
|
|
141
|
+
x.set_value(1)
|
|
140
142
|
|
|
141
143
|
problem.minimize(x * x)
|
|
142
144
|
|
|
@@ -154,6 +156,7 @@ def test_timeout():
|
|
|
154
156
|
problem = Problem()
|
|
155
157
|
|
|
156
158
|
x = problem.decision_variable()
|
|
159
|
+
x.set_value(1)
|
|
157
160
|
|
|
158
161
|
problem.minimize(x * x)
|
|
159
162
|
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/CMakeLists.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/BuildTypes.cmake
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/SubdirList.cmake
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/pyproject.toml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/binders.hpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/main.cpp
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/util/pool.cpp
RENAMED
|
File without changes
|