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.
Files changed (120) hide show
  1. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/PKG-INFO +1 -1
  2. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/interior_point.hpp +39 -37
  3. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/newton.hpp +13 -9
  4. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/sqp.hpp +16 -13
  5. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/src/sleipnir/__init__.py +1 -1
  6. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/solver/exit_status_test.py +5 -2
  7. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/CMakeLists.txt +0 -0
  8. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/LICENSE.txt +0 -0
  9. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/README.md +0 -0
  10. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/SleipnirConfig.cmake.in +0 -0
  11. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/BuildTypes.cmake +0 -0
  12. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/CompilerFlags.cmake +0 -0
  13. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/Pybind11Mkdoc.cmake +0 -0
  14. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/SubdirList.cmake +0 -0
  15. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/cmake/arm-none-eabi.cmake +0 -0
  16. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/expression.hpp +0 -0
  17. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/expression_graph.hpp +0 -0
  18. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/expression_type.hpp +0 -0
  19. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/gradient.hpp +0 -0
  20. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/gradient_expression_graph.hpp +0 -0
  21. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/hessian.hpp +0 -0
  22. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/jacobian.hpp +0 -0
  23. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/sleipnir_base.hpp +0 -0
  24. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/slice.hpp +0 -0
  25. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/variable.hpp +0 -0
  26. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/variable_block.hpp +0 -0
  27. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/autodiff/variable_matrix.hpp +0 -0
  28. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/multistart.hpp +0 -0
  29. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp/dynamics_type.hpp +0 -0
  30. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp/timestep_method.hpp +0 -0
  31. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp/transcription_method.hpp +0 -0
  32. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/ocp.hpp +0 -0
  33. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/problem.hpp +0 -0
  34. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/exit_status.hpp +0 -0
  35. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/interior_point_matrix_callbacks.hpp +0 -0
  36. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/iteration_info.hpp +0 -0
  37. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/newton_matrix_callbacks.hpp +0 -0
  38. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/options.hpp +0 -0
  39. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/sqp_matrix_callbacks.hpp +0 -0
  40. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/all_finite.hpp +0 -0
  41. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/append_as_triplets.hpp +0 -0
  42. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/bounds.hpp +0 -0
  43. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/feasibility_restoration.hpp +0 -0
  44. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/filter.hpp +0 -0
  45. {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
  46. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/inertia.hpp +0 -0
  47. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/is_locally_infeasible.hpp +0 -0
  48. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/kkt_error.hpp +0 -0
  49. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/lagrange_multiplier_estimate.hpp +0 -0
  50. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/optimization/solver/util/regularized_ldlt.hpp +0 -0
  51. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/assert.hpp +0 -0
  52. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/concepts.hpp +0 -0
  53. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/empty.hpp +0 -0
  54. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/function_ref.hpp +0 -0
  55. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/intrusive_shared_ptr.hpp +0 -0
  56. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/pool.hpp +0 -0
  57. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/print.hpp +0 -0
  58. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/print_diagnostics.hpp +0 -0
  59. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/profiler.hpp +0 -0
  60. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/scope_exit.hpp +0 -0
  61. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/spy.hpp +0 -0
  62. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/include/sleipnir/util/symbol_exports.hpp +0 -0
  63. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/pyproject.toml +0 -0
  64. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_expression_type.cpp +0 -0
  65. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_gradient.cpp +0 -0
  66. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_hessian.cpp +0 -0
  67. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_jacobian.cpp +0 -0
  68. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_variable.cpp +0 -0
  69. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_variable_block.cpp +0 -0
  70. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/autodiff/bind_variable_matrix.cpp +0 -0
  71. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/binders.hpp +0 -0
  72. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/docstrings.hpp +0 -0
  73. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/for_each_type.hpp +0 -0
  74. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/main.cpp +0 -0
  75. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_equality_constraints.cpp +0 -0
  76. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_inequality_constraints.cpp +0 -0
  77. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_ocp.cpp +0 -0
  78. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/bind_problem.cpp +0 -0
  79. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/ocp/bind_dynamics_type.cpp +0 -0
  80. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/ocp/bind_timestep_method.cpp +0 -0
  81. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/ocp/bind_transcription_method.cpp +0 -0
  82. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/solver/bind_exit_status.cpp +0 -0
  83. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/optimization/solver/bind_iteration_info.cpp +0 -0
  84. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/cpp/try_cast.hpp +0 -0
  85. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/src/sleipnir/autodiff/__init__.py +0 -0
  86. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/src/sleipnir/optimization/__init__.py +0 -0
  87. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/gradient_test.py +0 -0
  88. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/hessian_test.py +0 -0
  89. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/jacobian_test.py +0 -0
  90. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/variable_matrix_test.py +0 -0
  91. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/autodiff/variable_test.py +0 -0
  92. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/arm_on_elevator_problem_test.py +0 -0
  93. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/cart_pole_ocp_test.py +0 -0
  94. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/cart_pole_problem_test.py +0 -0
  95. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/cart_pole_util.py +0 -0
  96. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/constraints_test.py +0 -0
  97. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/decision_variable_test.py +0 -0
  98. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/differential_drive_ocp_test.py +0 -0
  99. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/differential_drive_problem_test.py +0 -0
  100. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/differential_drive_util.py +0 -0
  101. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/double_integrator_problem_test.py +0 -0
  102. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/flywheel_ocp_test.py +0 -0
  103. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/flywheel_problem_test.py +0 -0
  104. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/linear_problem_test.py +0 -0
  105. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/multistart_test.py +0 -0
  106. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/nonlinear_problem_test.py +0 -0
  107. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/problem_spy_test.py +0 -0
  108. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/quadratic_problem_test.py +0 -0
  109. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/rk4.py +0 -0
  110. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/python/test/optimization/trivial_problem_test.py +0 -0
  111. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/gradient.cpp +0 -0
  112. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/hessian.cpp +0 -0
  113. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/jacobian.cpp +0 -0
  114. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/autodiff/variable_matrix.cpp +0 -0
  115. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/ocp.cpp +0 -0
  116. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/problem.cpp +0 -0
  117. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/solver/interior_point.cpp +0 -0
  118. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/solver/newton.cpp +0 -0
  119. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/optimization/solver/sqp.cpp +0 -0
  120. {sleipnirgroup_jormungandr-0.5.4.dev3 → sleipnirgroup_jormungandr-0.5.4.dev5}/src/util/pool.cpp +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: sleipnirgroup-jormungandr
3
- Version: 0.5.4.dev3
3
+ Version: 0.5.4.dev5
4
4
  Summary: Reverse mode autodiff library and NLP solver DSL
5
5
  License-Expression: BSD-3-Clause
6
6
  License-File: LICENSE.txt
@@ -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 = std::numeric_limits<Scalar>::infinity();
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
- DenseVector trial_x = x + α * step.p_x;
483
- DenseVector trial_y = y + α_z * step.p_y;
484
- DenseVector trial_z = z + α_z * step.p_z;
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
- Scalar trial_f = matrices.f(trial_x);
487
- DenseVector trial_c_e = matrices.c_e(trial_x);
488
- DenseVector trial_c_i = matrices.c_i(trial_x);
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), matrices.c_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
- // xₖ₊₁ = xₖ + αₖpₖˣ
722
- // sₖ₊₁ = sₖ + αₖpₖˢ
723
- // yₖ₊₁ = yₖ + αₖᶻpₖʸ
724
- // zₖ₊₁ = zₖ + αₖᶻpₖᶻ
725
- x += α * step.p_x;
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
- c_e = matrices.c_e(x);
760
- c_i = matrices.c_i(x);
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 = std::numeric_limits<Scalar>::infinity();
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
- DenseVector trial_x = x + α * p_x;
200
+ trial_x = x + α * p_x;
198
201
 
199
- Scalar trial_f = matrices.f(trial_x);
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
- DenseVector trial_x = x + α_max * p_x;
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
- α = α_max;
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
- // xₖ₊₁ = xₖ + αₖpₖˣ
246
- x += α * p_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 = std::numeric_limits<Scalar>::infinity();
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
- DenseVector trial_x = x + α * step.p_x;
335
- DenseVector trial_y = y + α * step.p_y;
339
+ trial_x = x + α * step.p_x;
340
+ trial_y = y + α * step.p_y;
336
341
 
337
- Scalar trial_f = matrices.f(trial_x);
338
- DenseVector trial_c_e = matrices.c_e(trial_x);
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
- // xₖ₊₁ = xₖ + αₖpₖˣ
529
- // yₖ₊₁ = yₖ + αₖpₖʸ
530
- x += α * step.p_x;
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
@@ -2,4 +2,4 @@
2
2
 
3
3
  from ._sleipnir import *
4
4
 
5
- __version__ = "0.5.4.dev3"
5
+ __version__ = "0.5.4.dev5"
@@ -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