sleipnirgroup-jormungandr 0.5.6.dev6__tar.gz → 0.5.6.dev8__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.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/PKG-INFO +1 -1
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/problem.hpp +45 -24
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/interior_point.hpp +12 -10
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/interior_point_matrix_callbacks.hpp +6 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/newton.hpp +6 -3
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +6 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/sqp.hpp +6 -3
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +6 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +19 -2
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/is_locally_infeasible.hpp +4 -8
- sleipnirgroup_jormungandr-0.5.6.dev8/include/sleipnir/optimization/solver/util/kkt_error.hpp +253 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/lagrange_multiplier_estimate.hpp +5 -8
- sleipnirgroup_jormungandr-0.5.6.dev8/include/sleipnir/optimization/solver/util/problem_scaling.hpp +116 -0
- sleipnirgroup_jormungandr-0.5.6.dev8/include/sleipnir/optimization/solver/util/sparse_inf_norms.hpp +34 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/src/sleipnir/__init__.py +1 -1
- sleipnirgroup_jormungandr-0.5.6.dev6/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -152
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/CMakeLists.txt +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/README.md +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/SleipnirConfig.cmake.in +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/cmake/BuildTypes.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/cmake/CompilerFlags.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/cmake/Pybind11Mkdoc.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/cmake/SubdirList.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/cmake/arm-none-eabi.cmake +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/expression.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/expression_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/gradient.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/gradient_expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/hessian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/jacobian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/slice.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/variable.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/variable_block.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/autodiff/variable_matrix.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/multistart.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/ocp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/options.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/dense_regularized_ldlt.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/filter.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/inertia.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/regularized_ldlt.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/optimization/solver/util/sparse_regularized_ldlt.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/assert.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/concepts.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/empty.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/function_ref.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/pool.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/print.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/print_diagnostics.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/profiler.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/scope_exit.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/spy.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/include/sleipnir/util/symbol_exports.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/pyproject.toml +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_variable.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_variable_block.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/autodiff/bind_variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/binders.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/docstrings.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/for_each_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/main.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/bind_ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/bind_problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/cpp/try_cast.hpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/src/sleipnir/autodiff/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/src/sleipnir/optimization/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/autodiff/gradient_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/autodiff/hessian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/autodiff/jacobian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/autodiff/variable_matrix_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/autodiff/variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/cart_pole_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/cart_pole_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/cart_pole_util.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/constraints_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/decision_variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/differential_drive_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/differential_drive_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/differential_drive_util.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/double_integrator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/flywheel_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/flywheel_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/linear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/multistart_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/nonlinear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/problem_spy_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/quadratic_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/rk4.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/solver/exit_status_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/python/test/optimization/trivial_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/autodiff/gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/autodiff/hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/autodiff/jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/autodiff/variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/optimization/ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/optimization/problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/optimization/solver/interior_point.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/optimization/solver/newton.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/optimization/solver/sqp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.5.6.dev6 → sleipnirgroup_jormungandr-0.5.6.dev8}/src/util/pool.cpp +0 -0
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
#include "sleipnir/optimization/solver/options.hpp"
|
|
31
31
|
#include "sleipnir/optimization/solver/sqp.hpp"
|
|
32
32
|
#include "sleipnir/optimization/solver/util/bounds.hpp"
|
|
33
|
+
#include "sleipnir/optimization/solver/util/problem_scaling.hpp"
|
|
33
34
|
#include "sleipnir/util/empty.hpp"
|
|
34
35
|
#include "sleipnir/util/print.hpp"
|
|
35
36
|
#include "sleipnir/util/print_diagnostics.hpp"
|
|
@@ -375,20 +376,26 @@ class Problem {
|
|
|
375
376
|
}
|
|
376
377
|
#endif
|
|
377
378
|
|
|
379
|
+
// Automatically scale the cost. The problem scaling procedure is
|
|
380
|
+
// described in more detail in docs/algorithms.md#problem-scaling.
|
|
381
|
+
x_ad.set_value(x);
|
|
382
|
+
const ProblemScaling<Scalar> scaling{g.value()};
|
|
383
|
+
|
|
378
384
|
NewtonMatrixCallbacks<Scalar> matrix_callbacks{
|
|
379
385
|
num_decision_variables,
|
|
380
386
|
[&](const DenseVector& x) -> Scalar {
|
|
381
387
|
x_ad.set_value(x);
|
|
382
|
-
return f.value();
|
|
388
|
+
return scaling.f * f.value();
|
|
383
389
|
},
|
|
384
390
|
[&](const DenseVector& x) -> SparseVector {
|
|
385
391
|
x_ad.set_value(x);
|
|
386
|
-
return g.value();
|
|
392
|
+
return scaling.f * g.value();
|
|
387
393
|
},
|
|
388
394
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
389
395
|
x_ad.set_value(x);
|
|
390
|
-
return H.value();
|
|
391
|
-
}
|
|
396
|
+
return scaling.f * H.value();
|
|
397
|
+
},
|
|
398
|
+
scaling};
|
|
392
399
|
|
|
393
400
|
// Invoke Newton solver
|
|
394
401
|
status =
|
|
@@ -463,35 +470,42 @@ class Problem {
|
|
|
463
470
|
}
|
|
464
471
|
#endif
|
|
465
472
|
|
|
473
|
+
// Automatically scale the cost and constraints. The problem scaling
|
|
474
|
+
// procedure is described in more detail in
|
|
475
|
+
// docs/algorithms.md#problem-scaling.
|
|
476
|
+
x_ad.set_value(x);
|
|
477
|
+
const ProblemScaling<Scalar> scaling{g.value(), A_e.value()};
|
|
478
|
+
|
|
466
479
|
SQPMatrixCallbacks<Scalar> matrix_callbacks{
|
|
467
480
|
num_decision_variables,
|
|
468
481
|
num_equality_constraints,
|
|
469
482
|
[&](const DenseVector& x) -> Scalar {
|
|
470
483
|
x_ad.set_value(x);
|
|
471
|
-
return f.value();
|
|
484
|
+
return scaling.f * f.value();
|
|
472
485
|
},
|
|
473
486
|
[&](const DenseVector& x) -> SparseVector {
|
|
474
487
|
x_ad.set_value(x);
|
|
475
|
-
return g.value();
|
|
488
|
+
return scaling.f * g.value();
|
|
476
489
|
},
|
|
477
490
|
[&](const DenseVector& x, const DenseVector& y) -> SparseMatrix {
|
|
478
491
|
x_ad.set_value(x);
|
|
479
|
-
y_ad.set_value(y);
|
|
480
|
-
return H_f.value() + H_c.value();
|
|
492
|
+
y_ad.set_value(scaling.c_e.cwiseProduct(y));
|
|
493
|
+
return scaling.f * H_f.value() + H_c.value();
|
|
481
494
|
},
|
|
482
495
|
[&](const DenseVector& x, const DenseVector& y) -> SparseMatrix {
|
|
483
496
|
x_ad.set_value(x);
|
|
484
|
-
y_ad.set_value(y);
|
|
497
|
+
y_ad.set_value(scaling.c_e.cwiseProduct(y));
|
|
485
498
|
return H_c.value();
|
|
486
499
|
},
|
|
487
500
|
[&](const DenseVector& x) -> DenseVector {
|
|
488
501
|
x_ad.set_value(x);
|
|
489
|
-
return c_e_ad.value();
|
|
502
|
+
return scaling.c_e.cwiseProduct(c_e_ad.value());
|
|
490
503
|
},
|
|
491
504
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
492
505
|
x_ad.set_value(x);
|
|
493
|
-
return A_e.value();
|
|
494
|
-
}
|
|
506
|
+
return scaling.c_e.asDiagonal() * A_e.value();
|
|
507
|
+
},
|
|
508
|
+
scaling};
|
|
495
509
|
|
|
496
510
|
// Invoke SQP solver
|
|
497
511
|
status = sqp<Scalar>(matrix_callbacks, iteration_callbacks, options, x);
|
|
@@ -595,48 +609,55 @@ class Problem {
|
|
|
595
609
|
project_onto_bounds(x, bounds);
|
|
596
610
|
#endif
|
|
597
611
|
|
|
612
|
+
// Automatically scale the cost and constraints. The problem scaling
|
|
613
|
+
// procedure is described in more detail in
|
|
614
|
+
// docs/algorithms.md#problem-scaling.
|
|
615
|
+
x_ad.set_value(x);
|
|
616
|
+
const ProblemScaling<Scalar> scaling{g.value(), A_e.value(), A_i.value()};
|
|
617
|
+
|
|
598
618
|
InteriorPointMatrixCallbacks<Scalar> matrix_callbacks{
|
|
599
619
|
num_decision_variables,
|
|
600
620
|
num_equality_constraints,
|
|
601
621
|
num_inequality_constraints,
|
|
602
622
|
[&](const DenseVector& x) -> Scalar {
|
|
603
623
|
x_ad.set_value(x);
|
|
604
|
-
return f.value();
|
|
624
|
+
return scaling.f * f.value();
|
|
605
625
|
},
|
|
606
626
|
[&](const DenseVector& x) -> SparseVector {
|
|
607
627
|
x_ad.set_value(x);
|
|
608
|
-
return g.value();
|
|
628
|
+
return scaling.f * g.value();
|
|
609
629
|
},
|
|
610
630
|
[&](const DenseVector& x, const DenseVector& y,
|
|
611
631
|
const DenseVector& z) -> SparseMatrix {
|
|
612
632
|
x_ad.set_value(x);
|
|
613
|
-
y_ad.set_value(y);
|
|
614
|
-
z_ad.set_value(z);
|
|
615
|
-
return H_f.value() + H_c.value();
|
|
633
|
+
y_ad.set_value(scaling.c_e.cwiseProduct(y));
|
|
634
|
+
z_ad.set_value(scaling.c_i.cwiseProduct(z));
|
|
635
|
+
return scaling.f * H_f.value() + H_c.value();
|
|
616
636
|
},
|
|
617
637
|
[&](const DenseVector& x, const DenseVector& y,
|
|
618
638
|
const DenseVector& z) -> SparseMatrix {
|
|
619
639
|
x_ad.set_value(x);
|
|
620
|
-
y_ad.set_value(y);
|
|
621
|
-
z_ad.set_value(z);
|
|
640
|
+
y_ad.set_value(scaling.c_e.cwiseProduct(y));
|
|
641
|
+
z_ad.set_value(scaling.c_i.cwiseProduct(z));
|
|
622
642
|
return H_c.value();
|
|
623
643
|
},
|
|
624
644
|
[&](const DenseVector& x) -> DenseVector {
|
|
625
645
|
x_ad.set_value(x);
|
|
626
|
-
return c_e_ad.value();
|
|
646
|
+
return scaling.c_e.cwiseProduct(c_e_ad.value());
|
|
627
647
|
},
|
|
628
648
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
629
649
|
x_ad.set_value(x);
|
|
630
|
-
return A_e.value();
|
|
650
|
+
return scaling.c_e.asDiagonal() * A_e.value();
|
|
631
651
|
},
|
|
632
652
|
[&](const DenseVector& x) -> DenseVector {
|
|
633
653
|
x_ad.set_value(x);
|
|
634
|
-
return c_i_ad.value();
|
|
654
|
+
return scaling.c_i.cwiseProduct(c_i_ad.value());
|
|
635
655
|
},
|
|
636
656
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
637
657
|
x_ad.set_value(x);
|
|
638
|
-
return A_i.value();
|
|
639
|
-
}
|
|
658
|
+
return scaling.c_i.asDiagonal() * A_i.value();
|
|
659
|
+
},
|
|
660
|
+
scaling};
|
|
640
661
|
|
|
641
662
|
// Invoke interior-point method solver
|
|
642
663
|
status =
|
|
@@ -76,7 +76,7 @@ ExitStatus interior_point(
|
|
|
76
76
|
DenseVector y = DenseVector::Zero(matrix_callbacks.num_equality_constraints);
|
|
77
77
|
DenseVector z =
|
|
78
78
|
DenseVector::Ones(matrix_callbacks.num_inequality_constraints);
|
|
79
|
-
Scalar μ(0.1);
|
|
79
|
+
Scalar μ = Scalar(0.1) * matrix_callbacks.scaling.f;
|
|
80
80
|
|
|
81
81
|
return interior_point(matrix_callbacks, iteration_callbacks, options, false,
|
|
82
82
|
#ifdef SLEIPNIR_ENABLE_BOUND_PROJECTION
|
|
@@ -231,7 +231,8 @@ ExitStatus interior_point(
|
|
|
231
231
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
232
232
|
ScopedProfiler prof{A_i_prof};
|
|
233
233
|
return matrix_callbacks.A_i(x);
|
|
234
|
-
}
|
|
234
|
+
},
|
|
235
|
+
matrix_callbacks.scaling};
|
|
235
236
|
#else
|
|
236
237
|
const auto& matrices = matrix_callbacks;
|
|
237
238
|
#endif
|
|
@@ -290,7 +291,8 @@ ExitStatus interior_point(
|
|
|
290
291
|
int iterations = 0;
|
|
291
292
|
|
|
292
293
|
// Barrier parameter minimum
|
|
293
|
-
const Scalar μ_min =
|
|
294
|
+
const Scalar μ_min =
|
|
295
|
+
matrices.scaling.f * Scalar(options.tolerance) / Scalar(10);
|
|
294
296
|
|
|
295
297
|
// Fraction-to-the-boundary rule scale factor minimum
|
|
296
298
|
constexpr Scalar τ_min(0.99);
|
|
@@ -356,8 +358,8 @@ ExitStatus interior_point(
|
|
|
356
358
|
int full_step_rejected_counter = 0;
|
|
357
359
|
|
|
358
360
|
// Error
|
|
359
|
-
Scalar E_0 =
|
|
360
|
-
g, A_e, c_e, A_i, c_i, s, y, z, Scalar(0));
|
|
361
|
+
Scalar E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
362
|
+
matrices.scaling, g, A_e, c_e, A_i, c_i, s, y, z, Scalar(0));
|
|
361
363
|
|
|
362
364
|
setup_prof.stop();
|
|
363
365
|
|
|
@@ -569,9 +571,9 @@ ExitStatus interior_point(
|
|
|
569
571
|
step_acceptable ? IterationType::ACCEPTED_SOC
|
|
570
572
|
: IterationType::REJECTED_SOC,
|
|
571
573
|
soc_profiler.current_duration(),
|
|
572
|
-
|
|
573
|
-
g, A_e, trial_c_e, A_i, trial_c_i,
|
|
574
|
-
trial_z, Scalar(0)),
|
|
574
|
+
unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
575
|
+
matrices.scaling, g, A_e, trial_c_e, A_i, trial_c_i,
|
|
576
|
+
trial_s, trial_y, trial_z, Scalar(0)),
|
|
575
577
|
trial_f,
|
|
576
578
|
trial_c_e.template lpNorm<1>() +
|
|
577
579
|
(trial_c_i - trial_s).template lpNorm<1>(),
|
|
@@ -781,8 +783,8 @@ ExitStatus interior_point(
|
|
|
781
783
|
H = matrices.H(x, y, z);
|
|
782
784
|
|
|
783
785
|
// Update the error
|
|
784
|
-
E_0 =
|
|
785
|
-
g, A_e, c_e, A_i, c_i, s, y, z, Scalar(0));
|
|
786
|
+
E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
787
|
+
matrices.scaling, g, A_e, c_e, A_i, c_i, s, y, z, Scalar(0));
|
|
786
788
|
|
|
787
789
|
// Update the barrier parameter if necessary
|
|
788
790
|
if (E_0 > Scalar(options.tolerance)) {
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
#include <Eigen/Core>
|
|
8
8
|
#include <Eigen/SparseCore>
|
|
9
9
|
|
|
10
|
+
#include "sleipnir/optimization/solver/util/problem_scaling.hpp"
|
|
11
|
+
|
|
10
12
|
namespace slp {
|
|
11
13
|
|
|
12
14
|
/// Matrix callbacks for the interior-point method solver.
|
|
@@ -241,6 +243,10 @@ struct InteriorPointMatrixCallbacks {
|
|
|
241
243
|
/// </tr>
|
|
242
244
|
/// </table>
|
|
243
245
|
std::function<SparseMatrix(const DenseVector& x)> A_i;
|
|
246
|
+
|
|
247
|
+
/// Automatic problem scaling factors. Used to scale the cost, constraints,
|
|
248
|
+
/// and tolerance inside the interior-point solver.
|
|
249
|
+
ProblemScaling<Scalar> scaling;
|
|
244
250
|
};
|
|
245
251
|
|
|
246
252
|
} // namespace slp
|
|
@@ -102,7 +102,8 @@ ExitStatus newton(
|
|
|
102
102
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
103
103
|
ScopedProfiler prof{H_prof};
|
|
104
104
|
return matrix_callbacks.H(x);
|
|
105
|
-
}
|
|
105
|
+
},
|
|
106
|
+
matrix_callbacks.scaling};
|
|
106
107
|
#else
|
|
107
108
|
const auto& matrices = matrix_callbacks;
|
|
108
109
|
#endif
|
|
@@ -141,7 +142,8 @@ ExitStatus newton(
|
|
|
141
142
|
constexpr Scalar α_min(1e-20);
|
|
142
143
|
|
|
143
144
|
// Error
|
|
144
|
-
Scalar E_0 =
|
|
145
|
+
Scalar E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
146
|
+
matrices.scaling, g);
|
|
145
147
|
|
|
146
148
|
setup_prof.stop();
|
|
147
149
|
|
|
@@ -255,7 +257,8 @@ ExitStatus newton(
|
|
|
255
257
|
H = matrices.H(x);
|
|
256
258
|
|
|
257
259
|
// Update the error
|
|
258
|
-
E_0 =
|
|
260
|
+
E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
261
|
+
matrices.scaling, g);
|
|
259
262
|
|
|
260
263
|
inner_iter_profiler.stop();
|
|
261
264
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
#include <Eigen/Core>
|
|
8
8
|
#include <Eigen/SparseCore>
|
|
9
9
|
|
|
10
|
+
#include "sleipnir/optimization/solver/util/problem_scaling.hpp"
|
|
11
|
+
|
|
10
12
|
namespace slp {
|
|
11
13
|
|
|
12
14
|
/// Matrix callbacks for the Newton's method solver.
|
|
@@ -90,6 +92,10 @@ struct NewtonMatrixCallbacks {
|
|
|
90
92
|
/// </tr>
|
|
91
93
|
/// </table>
|
|
92
94
|
std::function<SparseMatrix(const DenseVector& x)> H;
|
|
95
|
+
|
|
96
|
+
/// Automatic problem scaling factors. Used to scale the cost and tolerance
|
|
97
|
+
/// inside the Newton solver.
|
|
98
|
+
ProblemScaling<Scalar> scaling;
|
|
93
99
|
};
|
|
94
100
|
|
|
95
101
|
} // namespace slp
|
|
@@ -175,7 +175,8 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
175
175
|
[&](const DenseVector& x) -> SparseMatrix {
|
|
176
176
|
ScopedProfiler prof{A_e_prof};
|
|
177
177
|
return matrix_callbacks.A_e(x);
|
|
178
|
-
}
|
|
178
|
+
},
|
|
179
|
+
matrix_callbacks.scaling};
|
|
179
180
|
#else
|
|
180
181
|
const auto& matrices = matrix_callbacks;
|
|
181
182
|
#endif
|
|
@@ -239,7 +240,8 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
239
240
|
int full_step_rejected_counter = 0;
|
|
240
241
|
|
|
241
242
|
// Error
|
|
242
|
-
Scalar E_0 =
|
|
243
|
+
Scalar E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
244
|
+
matrices.scaling, g, A_e, c_e, y);
|
|
243
245
|
|
|
244
246
|
setup_prof.stop();
|
|
245
247
|
|
|
@@ -555,7 +557,8 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
555
557
|
H = matrices.H(x, y);
|
|
556
558
|
|
|
557
559
|
// Update the error
|
|
558
|
-
E_0 =
|
|
560
|
+
E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
561
|
+
matrices.scaling, g, A_e, c_e, y);
|
|
559
562
|
|
|
560
563
|
inner_iter_profiler.stop();
|
|
561
564
|
|
|
@@ -7,6 +7,8 @@
|
|
|
7
7
|
#include <Eigen/Core>
|
|
8
8
|
#include <Eigen/SparseCore>
|
|
9
9
|
|
|
10
|
+
#include "sleipnir/optimization/solver/util/problem_scaling.hpp"
|
|
11
|
+
|
|
10
12
|
namespace slp {
|
|
11
13
|
|
|
12
14
|
/// Matrix callbacks for the Sequential Quadratic Programming (SQP) solver.
|
|
@@ -175,6 +177,10 @@ struct SQPMatrixCallbacks {
|
|
|
175
177
|
/// </tr>
|
|
176
178
|
/// </table>
|
|
177
179
|
std::function<SparseMatrix(const DenseVector& x)> A_e;
|
|
180
|
+
|
|
181
|
+
/// Automatic problem scaling factors. Used to scale the cost, constraints,
|
|
182
|
+
/// and tolerance inside the SQP solver.
|
|
183
|
+
ProblemScaling<Scalar> scaling;
|
|
178
184
|
};
|
|
179
185
|
|
|
180
186
|
} // namespace slp
|
|
@@ -169,6 +169,12 @@ ExitStatus feasibility_restoration(
|
|
|
169
169
|
|
|
170
170
|
Scalar fr_μ = std::max(μ, c_e.template lpNorm<Eigen::Infinity>());
|
|
171
171
|
|
|
172
|
+
// Inherit the parent problem's scaling for the constraints, and use no
|
|
173
|
+
// scaling for the cost function since it has changed. The new rows introduced
|
|
174
|
+
// are not scaled.
|
|
175
|
+
const ProblemScaling<Scalar> fr_scaling{Scalar(1), matrices.scaling.c_e,
|
|
176
|
+
DenseVector::Ones(2 * num_eq)};
|
|
177
|
+
|
|
172
178
|
InteriorPointMatrixCallbacks<Scalar> fr_matrix_callbacks{
|
|
173
179
|
static_cast<int>(fr_x.rows()),
|
|
174
180
|
static_cast<int>(fr_y.rows()),
|
|
@@ -287,7 +293,8 @@ ExitStatus feasibility_restoration(
|
|
|
287
293
|
SparseMatrix A_i_p{2 * num_eq, x_p.rows()};
|
|
288
294
|
A_i_p.setFromSortedTriplets(triplets.begin(), triplets.end());
|
|
289
295
|
return A_i_p;
|
|
290
|
-
}
|
|
296
|
+
},
|
|
297
|
+
fr_scaling};
|
|
291
298
|
|
|
292
299
|
auto status = interior_point<Scalar>(fr_matrix_callbacks, iteration_callbacks,
|
|
293
300
|
options, true,
|
|
@@ -401,6 +408,15 @@ ExitStatus feasibility_restoration(
|
|
|
401
408
|
Scalar fr_μ = std::max({μ, c_e.template lpNorm<Eigen::Infinity>(),
|
|
402
409
|
(c_i - s).template lpNorm<Eigen::Infinity>()});
|
|
403
410
|
|
|
411
|
+
// Inherit the parent problem's scaling for the constraints, and use no
|
|
412
|
+
// scaling for the cost function since it has changed. The new rows introduced
|
|
413
|
+
// are not scaled.
|
|
414
|
+
DenseVector fr_d_c_i{c_i.rows() + 2 * num_eq + 2 * num_ineq};
|
|
415
|
+
fr_d_c_i << matrices.scaling.c_i,
|
|
416
|
+
DenseVector::Ones(2 * num_eq + 2 * num_ineq);
|
|
417
|
+
const ProblemScaling<Scalar> fr_scaling{Scalar(1), matrices.scaling.c_e,
|
|
418
|
+
fr_d_c_i};
|
|
419
|
+
|
|
404
420
|
InteriorPointMatrixCallbacks<Scalar> fr_matrix_callbacks{
|
|
405
421
|
static_cast<int>(fr_x.rows()),
|
|
406
422
|
static_cast<int>(fr_y.rows()),
|
|
@@ -562,7 +578,8 @@ ExitStatus feasibility_restoration(
|
|
|
562
578
|
SparseMatrix A_i_p{2 * num_eq + 3 * num_ineq, x_p.rows()};
|
|
563
579
|
A_i_p.setFromSortedTriplets(triplets.begin(), triplets.end());
|
|
564
580
|
return A_i_p;
|
|
565
|
-
}
|
|
581
|
+
},
|
|
582
|
+
fr_scaling};
|
|
566
583
|
|
|
567
584
|
auto status = interior_point<Scalar>(fr_matrix_callbacks, iteration_callbacks,
|
|
568
585
|
options, true,
|
|
@@ -12,10 +12,8 @@ namespace slp {
|
|
|
12
12
|
/// Returns true if the problem's equality constraints are locally infeasible.
|
|
13
13
|
///
|
|
14
14
|
/// @tparam Scalar Scalar type.
|
|
15
|
-
/// @param A_e
|
|
16
|
-
///
|
|
17
|
-
/// @param c_e The problem's equality constraints cₑ(x) evaluated at the current
|
|
18
|
-
/// iterate.
|
|
15
|
+
/// @param A_e Equality constraint Jacobian Aₑ(x).
|
|
16
|
+
/// @param c_e Equality constraints cₑ(x).
|
|
19
17
|
template <typename Scalar>
|
|
20
18
|
bool is_equality_locally_infeasible(
|
|
21
19
|
const Eigen::SparseMatrix<Scalar>& A_e,
|
|
@@ -33,10 +31,8 @@ bool is_equality_locally_infeasible(
|
|
|
33
31
|
/// Returns true if the problem's inequality constraints are locally infeasible.
|
|
34
32
|
///
|
|
35
33
|
/// @tparam Scalar Scalar type.
|
|
36
|
-
/// @param A_i
|
|
37
|
-
///
|
|
38
|
-
/// @param c_i The problem's inequality constraints cᵢ(x) evaluated at the
|
|
39
|
-
/// current iterate.
|
|
34
|
+
/// @param A_i Inequality constraint Jacobian Aᵢ(x).
|
|
35
|
+
/// @param c_i Inequality constraints cᵢ(x).
|
|
40
36
|
template <typename Scalar>
|
|
41
37
|
bool is_inequality_locally_infeasible(
|
|
42
38
|
const Eigen::SparseMatrix<Scalar>& A_i,
|