sleipnirgroup-jormungandr 0.6.7.dev34__tar.gz → 0.6.7.dev36__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.
Potentially problematic release.
This version of sleipnirgroup-jormungandr might be problematic. Click here for more details.
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/PKG-INFO +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/ipm.hpp +14 -3
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/sqp.hpp +11 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/filter.hpp +43 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/src/sleipnir/__init__.py +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/cart_pole_problem_test.py +4 -2
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/flywheel_ocp_test.py +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/flywheel_problem_test.py +1 -1
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/nonlinear_problem_test.py +32 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/CMakeLists.txt +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/README.md +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/SleipnirConfig.cmake.in +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/cmake/BuildTypes.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/cmake/CompilerFlags.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/cmake/Pybind11Mkdoc.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/cmake/SubdirList.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/cmake/arm-none-eabi.cmake +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/expression.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/expression_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/gradient.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/hessian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/jacobian.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/slice.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/variable.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/variable_block.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/autodiff/variable_matrix.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/multistart.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/ocp.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/problem.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/ipm_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/newton.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/options.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/dense_kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/fraction_to_the_boundary_rule.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/inertia.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/lagrange_multiplier_estimate.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/problem_scaling.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/sparse_inf_norms.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/optimization/solver/util/sparse_kkt_solver.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/assert.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/concepts.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/empty.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/function_ref.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/pool.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/print.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/print_diagnostics.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/profiler.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/scope_exit.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/spy.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/include/sleipnir/util/symbol_exports.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/pyproject.toml +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_variable.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_variable_block.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/autodiff/bind_variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/binders.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/docstrings.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/for_each_type.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/main.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/bind_ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/bind_problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/cpp/try_cast.hpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/src/sleipnir/autodiff/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/src/sleipnir/optimization/__init__.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/autodiff/gradient_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/autodiff/hessian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/autodiff/jacobian_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/autodiff/variable_matrix_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/autodiff/variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/cart_pole_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/cart_pole_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/constraints_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/decision_variable_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/differential_drive_ocp_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/differential_drive_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/differential_drive_util.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/double_integrator_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/linear_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/multistart_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/near.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/problem_spy_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/quadratic_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/rk4.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/solver/exit_status_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/python/test/optimization/trivial_problem_test.py +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/autodiff/gradient.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/autodiff/hessian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/autodiff/jacobian.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/autodiff/variable_matrix.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/optimization/ocp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/optimization/problem.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/optimization/solver/ipm.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/optimization/solver/newton.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/optimization/solver/sqp.cpp +0 -0
- {sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/util/pool.cpp +0 -0
|
@@ -353,6 +353,8 @@ ExitStatus ipm(const IPMMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
353
353
|
|
|
354
354
|
int full_step_rejected_counter = 0;
|
|
355
355
|
|
|
356
|
+
StallDetector<Scalar> stall_detector;
|
|
357
|
+
|
|
356
358
|
// Error
|
|
357
359
|
Scalar E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
358
360
|
matrices.scaling, g, A_e, c_e, A_i, c_i, s, y, z, Scalar(0));
|
|
@@ -504,7 +506,7 @@ ExitStatus ipm(const IPMMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
504
506
|
} else {
|
|
505
507
|
trial_s = s + α * step.p_s;
|
|
506
508
|
}
|
|
507
|
-
trial_y = y + α
|
|
509
|
+
trial_y = y + α * step.p_y;
|
|
508
510
|
trial_z = z + α_z * step.p_z;
|
|
509
511
|
|
|
510
512
|
trial_f = matrices.f(trial_x);
|
|
@@ -608,7 +610,7 @@ ExitStatus ipm(const IPMMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
608
610
|
|
|
609
611
|
trial_x = x + α_soc * soc_step.p_x;
|
|
610
612
|
trial_s = s + α_soc * soc_step.p_s;
|
|
611
|
-
trial_y = y + α
|
|
613
|
+
trial_y = y + α_soc * soc_step.p_y;
|
|
612
614
|
trial_z = z + α_z_soc * soc_step.p_z;
|
|
613
615
|
|
|
614
616
|
trial_f = matrices.f(trial_x);
|
|
@@ -677,7 +679,7 @@ ExitStatus ipm(const IPMMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
677
679
|
|
|
678
680
|
trial_x = x + α_max * step.p_x;
|
|
679
681
|
trial_s = s + α_max * step.p_s;
|
|
680
|
-
trial_y = y + α
|
|
682
|
+
trial_y = y + α_max * step.p_y;
|
|
681
683
|
trial_z = z + α_z * step.p_z;
|
|
682
684
|
|
|
683
685
|
trial_f = matrices.f(trial_x);
|
|
@@ -702,6 +704,15 @@ ExitStatus ipm(const IPMMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
702
704
|
|
|
703
705
|
line_search_profiler.stop();
|
|
704
706
|
|
|
707
|
+
// If solver stalled, invoke feasibility restoration
|
|
708
|
+
if (!call_feasibility_restoration && !in_feasibility_restoration) {
|
|
709
|
+
FilterEntry trial_entry{trial_f, trial_s, trial_c_e, trial_c_i, μ};
|
|
710
|
+
if (stall_detector.update(current_entry, trial_entry, α,
|
|
711
|
+
filter.min_constraint_violation)) {
|
|
712
|
+
call_feasibility_restoration = true;
|
|
713
|
+
}
|
|
714
|
+
}
|
|
715
|
+
|
|
705
716
|
if (call_feasibility_restoration) {
|
|
706
717
|
ScopedProfiler feasibility_restoration_profiler{
|
|
707
718
|
feasibility_restoration_prof};
|
|
@@ -236,6 +236,8 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
236
236
|
|
|
237
237
|
int full_step_rejected_counter = 0;
|
|
238
238
|
|
|
239
|
+
StallDetector<Scalar> stall_detector;
|
|
240
|
+
|
|
239
241
|
// Error
|
|
240
242
|
Scalar E_0 = unscaled_kkt_error<Scalar, KKTErrorType::INF_NORM_SCALED>(
|
|
241
243
|
matrices.scaling, g, A_e, c_e, y);
|
|
@@ -499,6 +501,15 @@ ExitStatus sqp(const SQPMatrixCallbacks<Scalar>& matrix_callbacks,
|
|
|
499
501
|
|
|
500
502
|
line_search_profiler.stop();
|
|
501
503
|
|
|
504
|
+
// If solver stalled, invoke feasibility restoration
|
|
505
|
+
if (!call_feasibility_restoration) {
|
|
506
|
+
FilterEntry trial_entry{trial_f, trial_c_e};
|
|
507
|
+
if (stall_detector.update(current_entry, trial_entry, α,
|
|
508
|
+
filter.min_constraint_violation)) {
|
|
509
|
+
call_feasibility_restoration = true;
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
502
513
|
if (call_feasibility_restoration) {
|
|
503
514
|
ScopedProfiler feasibility_restoration_profiler{
|
|
504
515
|
feasibility_restoration_prof};
|
|
@@ -211,4 +211,47 @@ class Filter {
|
|
|
211
211
|
}
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
+
/// Detects a solver stall.
|
|
215
|
+
///
|
|
216
|
+
/// @tparam Scalar Scalar type.
|
|
217
|
+
template <typename Scalar>
|
|
218
|
+
class StallDetector {
|
|
219
|
+
public:
|
|
220
|
+
/// Returns true if the solver stalled.
|
|
221
|
+
///
|
|
222
|
+
/// @param current_entry The entry corresponding to the current iterate.
|
|
223
|
+
/// @param trial_entry The entry corresponding to the accepted trial iterate.
|
|
224
|
+
/// @param α The accepted step size.
|
|
225
|
+
/// @param min_constraint_violation The minimum constraint violation from the
|
|
226
|
+
/// filter.
|
|
227
|
+
/// @return True if the solver stalled.
|
|
228
|
+
bool update(const FilterEntry<Scalar>& current_entry,
|
|
229
|
+
const FilterEntry<Scalar>& trial_entry, Scalar α,
|
|
230
|
+
Scalar min_constraint_violation) {
|
|
231
|
+
// If step is tiny, current iterate is infeasible, and accepted trial
|
|
232
|
+
// iterate made insufficient progress toward feasibility, increment stalled
|
|
233
|
+
// step counter
|
|
234
|
+
if (α < Scalar(1e-3) &&
|
|
235
|
+
current_entry.constraint_violation > min_constraint_violation &&
|
|
236
|
+
trial_entry.constraint_violation >
|
|
237
|
+
Scalar(0.99) * current_entry.constraint_violation) {
|
|
238
|
+
++m_stalled_step_counter;
|
|
239
|
+
|
|
240
|
+
// If there were too many consecutive tiny steps, report a stall
|
|
241
|
+
if (++m_stalled_step_counter >= 5) {
|
|
242
|
+
m_stalled_step_counter = 0;
|
|
243
|
+
return true;
|
|
244
|
+
}
|
|
245
|
+
} else {
|
|
246
|
+
// A break in stalled steps resets the counter
|
|
247
|
+
m_stalled_step_counter = 0;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
return false;
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
private:
|
|
254
|
+
int m_stalled_step_counter = 0;
|
|
255
|
+
};
|
|
256
|
+
|
|
214
257
|
} // namespace slp
|
|
@@ -15,9 +15,11 @@ def lerp(a, b, t):
|
|
|
15
15
|
return a + t * (b - a)
|
|
16
16
|
|
|
17
17
|
|
|
18
|
-
|
|
18
|
+
# dt = 0.25 s is sensitive to small solver changes, so a failure here may just
|
|
19
|
+
# mean the iterates found a different basin rather than a regression.
|
|
20
|
+
@pytest.mark.parametrize("dt", [0.05, 0.125, 0.25])
|
|
21
|
+
def test_cart_pole_problem(dt):
|
|
19
22
|
TOTAL_TIME = 5.0 # s
|
|
20
|
-
dt = 0.05 # s
|
|
21
23
|
N = int(TOTAL_TIME / dt)
|
|
22
24
|
|
|
23
25
|
u_max = 20.0 # N
|
|
@@ -96,7 +96,7 @@ def flywheel_test(
|
|
|
96
96
|
# steady-states.
|
|
97
97
|
assert problem.U().value(0, k) == pytest.approx(u, abs=2.0)
|
|
98
98
|
else:
|
|
99
|
-
assert problem.U().value(0, k) == pytest.approx(u, abs=
|
|
99
|
+
assert problem.U().value(0, k) == pytest.approx(u, abs=2e-4)
|
|
100
100
|
|
|
101
101
|
# Project state forward
|
|
102
102
|
x = A_discrete * x + B_discrete * u
|
|
@@ -83,7 +83,7 @@ def test_flywheel_problem():
|
|
|
83
83
|
assert U.value(0, k) >= u_ss
|
|
84
84
|
assert U.value(0, k) <= 12.0
|
|
85
85
|
else:
|
|
86
|
-
assert U.value(0, k) == pytest.approx(u, abs=
|
|
86
|
+
assert U.value(0, k) == pytest.approx(u, abs=2e-4)
|
|
87
87
|
|
|
88
88
|
# Project state forward
|
|
89
89
|
x = A * x + B * u
|
|
@@ -160,3 +160,35 @@ def test_wachter_and_biegler_line_search_failure():
|
|
|
160
160
|
assert x.value() == pytest.approx(-1.0, abs=1e-6)
|
|
161
161
|
assert s1.value() == pytest.approx(0.0, abs=1e-6)
|
|
162
162
|
assert s2.value() == pytest.approx(0.0, abs=3e-5)
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
def test_hock_schittkowski_13():
|
|
166
|
+
# Problem 13 of [1] (see
|
|
167
|
+
# https://vanderbei.princeton.edu/ampl/nlmodels/cute/hs013.mod) has
|
|
168
|
+
# constraint gradients that are linearly dependent at the solution.
|
|
169
|
+
#
|
|
170
|
+
# [1] Hock, W. and Schittkowski, K. "Test Examples for Nonlinear Programming
|
|
171
|
+
# Codes", Springer, 1981.
|
|
172
|
+
|
|
173
|
+
problem = Problem()
|
|
174
|
+
|
|
175
|
+
x, y = problem.decision_variable(2)
|
|
176
|
+
x.set_value(-2)
|
|
177
|
+
y.set_value(-2)
|
|
178
|
+
|
|
179
|
+
problem.minimize((x - 2) ** 2 + y**2)
|
|
180
|
+
|
|
181
|
+
problem.subject_to((1 - x) ** 3 >= y)
|
|
182
|
+
problem.subject_to(x >= 0)
|
|
183
|
+
problem.subject_to(y >= 0)
|
|
184
|
+
|
|
185
|
+
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
186
|
+
assert problem.equality_constraint_type() == ExpressionType.NONE
|
|
187
|
+
assert problem.inequality_constraint_type() == ExpressionType.NONLINEAR
|
|
188
|
+
|
|
189
|
+
assert problem.solve(diagnostics=True) == ExitStatus.SUCCESS
|
|
190
|
+
|
|
191
|
+
# The solution has no finite Lagrange multipliers, so the iterates only
|
|
192
|
+
# approach it to within the square root of the tolerance
|
|
193
|
+
assert x.value() == pytest.approx(1.0, abs=1e-4)
|
|
194
|
+
assert y.value() == pytest.approx(0.0, abs=1e-4)
|
{sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/CMakeLists.txt
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
|
|
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.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/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
|
{sleipnirgroup_jormungandr-0.6.7.dev34 → sleipnirgroup_jormungandr-0.6.7.dev36}/src/util/pool.cpp
RENAMED
|
File without changes
|