sleipnirgroup-jormungandr 0.0.1.dev474__cp312-cp312-macosx_14_0_universal2.whl → 0.0.1.dev476__cp312-cp312-macosx_14_0_universal2.whl

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.
@@ -78,6 +78,10 @@ up.)doc";
78
78
 
79
79
  static const char *__doc_slp_ExitStatus_FACTORIZATION_FAILED = R"doc(The linear system factorization failed.)doc";
80
80
 
81
+ static const char *__doc_slp_ExitStatus_GLOBALLY_INFEASIBLE =
82
+ R"doc(The problem setup frontend determined the problem to have an empty
83
+ feasible region.)doc";
84
+
81
85
  static const char *__doc_slp_ExitStatus_LINE_SEARCH_FAILED =
82
86
  R"doc(The backtracking line search failed, and the problem isn't locally
83
87
  infeasible.)doc";
@@ -17,6 +17,8 @@ void bind_exit_status(nb::enum_<ExitStatus>& e) {
17
17
  DOC(slp, ExitStatus, TOO_FEW_DOFS));
18
18
  e.value("LOCALLY_INFEASIBLE", ExitStatus::LOCALLY_INFEASIBLE,
19
19
  DOC(slp, ExitStatus, LOCALLY_INFEASIBLE));
20
+ e.value("GLOBALLY_INFEASIBLE", ExitStatus::GLOBALLY_INFEASIBLE,
21
+ DOC(slp, ExitStatus, GLOBALLY_INFEASIBLE));
20
22
  e.value("FACTORIZATION_FAILED", ExitStatus::FACTORIZATION_FAILED,
21
23
  DOC(slp, ExitStatus, FACTORIZATION_FAILED));
22
24
  e.value("LINE_SEARCH_FAILED", ExitStatus::LINE_SEARCH_FAILED,
@@ -45,34 +45,40 @@ class ExitStatus(enum.Enum):
45
45
  up.
46
46
  """
47
47
 
48
- FACTORIZATION_FAILED = -3
48
+ GLOBALLY_INFEASIBLE = -3
49
+ """
50
+ The problem setup frontend determined the problem to have an empty
51
+ feasible region.
52
+ """
53
+
54
+ FACTORIZATION_FAILED = -4
49
55
  """The linear system factorization failed."""
50
56
 
51
- LINE_SEARCH_FAILED = -4
57
+ LINE_SEARCH_FAILED = -5
52
58
  """
53
59
  The backtracking line search failed, and the problem isn't locally
54
60
  infeasible.
55
61
  """
56
62
 
57
- NONFINITE_INITIAL_COST_OR_CONSTRAINTS = -5
63
+ NONFINITE_INITIAL_COST_OR_CONSTRAINTS = -6
58
64
  """
59
65
  The solver encountered nonfinite initial cost or constraints and gave
60
66
  up.
61
67
  """
62
68
 
63
- DIVERGING_ITERATES = -6
69
+ DIVERGING_ITERATES = -7
64
70
  """
65
71
  The solver encountered diverging primal iterates xₖ and/or sₖ and gave
66
72
  up.
67
73
  """
68
74
 
69
- MAX_ITERATIONS_EXCEEDED = -7
75
+ MAX_ITERATIONS_EXCEEDED = -8
70
76
  """
71
77
  The solver returned its solution so far after exceeding the maximum
72
78
  number of iterations.
73
79
  """
74
80
 
75
- TIMEOUT = -8
81
+ TIMEOUT = -9
76
82
  """
77
83
  The solver returned its solution so far after exceeding the maximum
78
84
  elapsed wall clock time.
@@ -116,6 +116,25 @@ def test_minimum_2d_distance_with_linear_constraint():
116
116
  assert y.value() == pytest.approx(2.5, abs=1e-2)
117
117
 
118
118
 
119
+ def test_conflicting_bounds():
120
+ problem = Problem()
121
+
122
+ x = problem.decision_variable()
123
+ y = problem.decision_variable()
124
+
125
+ problem.minimize(autodiff.hypot(x, y))
126
+
127
+ problem.subject_to(autodiff.hypot(x, y) <= 1)
128
+ problem.subject_to(x >= 0.5)
129
+ problem.subject_to(x <= -0.5)
130
+
131
+ assert problem.cost_function_type() == ExpressionType.NONLINEAR
132
+ assert problem.equality_constraint_type() == ExpressionType.NONE
133
+ assert problem.inequality_constraint_type() == ExpressionType.NONLINEAR
134
+
135
+ assert problem.solve(diagnostics=True) == ExitStatus.GLOBALLY_INFEASIBLE
136
+
137
+
119
138
  def test_wachter_and_biegler_line_search_failure():
120
139
  # See example 19.2 of [1]
121
140
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: sleipnirgroup-jormungandr
3
- Version: 0.0.1.dev474
3
+ Version: 0.0.1.dev476
4
4
  Summary: A linearity-exploiting sparse nonlinear constrained optimization problem solver that uses the interior-point method.
5
5
  License: Copyright (c) Sleipnir contributors
6
6
 
@@ -187,6 +187,7 @@ See the [examples](https://github.com/SleipnirGroup/Sleipnir/tree/main/examples)
187
187
  * On Linux, install via `sudo apt install python`
188
188
  * On macOS, install via `brew install python`
189
189
  * [Eigen](https://gitlab.com/libeigen/eigen)
190
+ * [small_vector](https://github.com/gharveymn/small_vector)
190
191
  * [nanobind](https://github.com/wjakob/nanobind) (build only)
191
192
  * [Catch2](https://github.com/catchorg/Catch2) (tests only)
192
193
 
@@ -293,7 +294,7 @@ For quadratic problems, we compute the Lagrangian Hessian and constraint Jacobia
293
294
 
294
295
  #### Use a performant linear algebra library with fast sparse solvers
295
296
 
296
- [Eigen](https://gitlab.com/libeigen/eigen/) provides these. It also has no required dependencies, which makes cross compilation much easier.
297
+ [Eigen](https://gitlab.com/libeigen/eigen) provides these. It also has no required dependencies, which makes cross compilation much easier.
297
298
 
298
299
  #### Use a pool allocator for autodiff expression nodes
299
300
 
@@ -1,16 +1,16 @@
1
1
  jormungandr/__init__.py,sha256=0MOh1_NCDMO8wCiUOsvXRsfdKd5PesipWIi4G9leEV0,154
2
2
  jormungandr/__init__.pyi,sha256=pwQ9tOAXG2iEGd6i9QIBnON0ynPHIdcHf9aoNCcmGR0,101
3
- jormungandr/_jormungandr.cpython-312-darwin.so,sha256=2pZv7c606XBQzFMhvD1gY1Qe7G5C3GS3fpMlVaxr_ig,2115984
3
+ jormungandr/_jormungandr.cpython-312-darwin.so,sha256=DIH7aYAkEl5zFkFuFSmZr-iknSuFJbTuPqIF2k1fNUE,2116000
4
4
  jormungandr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
5
5
  jormungandr/autodiff/__init__.py,sha256=I2e8ciE5IppQ72nNCepqHz6yIZHUlLXMk54AfvJirwc,1416
6
6
  jormungandr/autodiff/__init__.pyi,sha256=vUsbibOahtnNqOuC0rYjRWufZeq-99GeO1bC73E0ozA,62206
7
7
  jormungandr/control/__init__.py,sha256=Gd7IGIh8mTsW5cjWwHxHpd1nhcjMIdbOqrAs7cvLUVY,37
8
8
  jormungandr/cpp/binders.hpp,sha256=X1_f22P4m-wvT91xO4-iJNWiR1uDxgNAMqC91LN_-AQ,1638
9
- jormungandr/cpp/docstrings.hpp,sha256=cO1a6gslxYNNXqSP8wjFFenG7VxbKQFj349MbbaKOCI,101436
9
+ jormungandr/cpp/docstrings.hpp,sha256=zT2DLriDaOrPLehIYgdwyT2QwrrriYPxYupvYX_csCs,101595
10
10
  jormungandr/cpp/main.cpp,sha256=ctz6_8909dfurpEXifglIooC5NNvj7E6mGbCfBUvYMQ,3333
11
11
  jormungandr/cpp/try_cast.hpp,sha256=9fWt3z0NRNIXzBv020sD5ffDvyJomTjnSoS2RwZOdwM,1286
12
12
  jormungandr/optimization/__init__.py,sha256=xYtHMhKtD4vQdi_XwGIUek8w8RIaqIA8gBgLYmv1SkE,1281
13
- jormungandr/optimization/__init__.pyi,sha256=PCH91N8BTFTxp3mlkaBrbnZxzIaxGYNJrgvHqwmxAQI,11666
13
+ jormungandr/optimization/__init__.pyi,sha256=oUjN9eZ-_amOda7ImWjteJ-nFl_AcUzAJM6aXis_nJc,11804
14
14
  jormungandr/test/cart_pole_util.py,sha256=zbxlK_pOZRZeEf6NfRiJNH1y-70tTQYQfEiETBpu_qI,2667
15
15
  jormungandr/test/differential_drive_util.py,sha256=XSsGMGhA8zC-i74WgqWhycdCGUBGb6iFxEv6grj8lVs,1238
16
16
  jormungandr/test/rk4.py,sha256=5VLagmfxpqTGKWgvXOfsoGPFxjt_ppqd9l8GkAl79l4,586
@@ -43,13 +43,13 @@ jormungandr/test/optimization/exit_status_test.py,sha256=LSQfvOZxyGhrjdwz8TMPC8F
43
43
  jormungandr/test/optimization/flywheel_problem_test.py,sha256=Cv73kIIcww0LRds2iSu9p1xuGUeAswhtCnoBgbunm9g,3167
44
44
  jormungandr/test/optimization/linear_problem_test.py,sha256=zV-2Yi3GCnd7JdvH3L8tsAM9_wWofG5Q-peqMbpwSq4,1459
45
45
  jormungandr/test/optimization/multistart_test.py,sha256=aKzetp13hRI77P2hUEbzeVhddFULag9Yl1pNHuZ9BjU,1249
46
- jormungandr/test/optimization/nonlinear_problem_test.py,sha256=n1dYaTKPuK5-HDogNSL5cUsuEURaFQ1xBqAr6NFUYgI,4893
46
+ jormungandr/test/optimization/nonlinear_problem_test.py,sha256=IY1mvG40E3vYFuD1VZQs-gNnSS1y4OKFRw8Lx91xw_E,5477
47
47
  jormungandr/test/optimization/quadratic_problem_test.py,sha256=oF1WIeY1aHrODMN2qmOekjWcisOOiewIRsYgseDs2B8,4394
48
48
  jormungandr/test/optimization/trivial_problem_test.py,sha256=Hox6MlGCi0sJwm3dqJGxLtpZODEXclnPVRtDHVnnvqg,1473
49
- jormungandr/cpp/optimization/solver/bind_exit_status.cpp,sha256=ut9osJieWERaqLM67S1DH5qqRBGCktDa2Lrd9o9svv0,1440
49
+ jormungandr/cpp/optimization/solver/bind_exit_status.cpp,sha256=RdKzfSVJbeDOBxEgbpHu__UM-52HBOBdq0KPVLytQcM,1560
50
50
  jormungandr/cpp/optimization/solver/bind_iteration_info.cpp,sha256=o5BvqW6BkZb4FlTx_ZTN6yVOFhEecLfRQeuGqty1DoU,1091
51
- sleipnirgroup_jormungandr-0.0.1.dev474.dist-info/LICENSE.txt,sha256=GO2ESyxbSNqb8hIL18kdV__AfVOlBY3CRXgXLxGamp0,1465
52
- sleipnirgroup_jormungandr-0.0.1.dev474.dist-info/METADATA,sha256=VdcmgP8jOpYxlyY4o9ISoCiYsq8cV-ri9hZR2v_tj-w,12411
53
- sleipnirgroup_jormungandr-0.0.1.dev474.dist-info/WHEEL,sha256=DRw8kuASJm5eemK-iHXJ8nbvPPH1Ngh_6OPlFd1lI-s,106
54
- sleipnirgroup_jormungandr-0.0.1.dev474.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
- sleipnirgroup_jormungandr-0.0.1.dev474.dist-info/RECORD,,
51
+ sleipnirgroup_jormungandr-0.0.1.dev476.dist-info/LICENSE.txt,sha256=GO2ESyxbSNqb8hIL18kdV__AfVOlBY3CRXgXLxGamp0,1465
52
+ sleipnirgroup_jormungandr-0.0.1.dev476.dist-info/METADATA,sha256=ChUq0Ayt4Ts6xK1h4fT6TCHX0cdL5l_goT_wbnuHM9o,12470
53
+ sleipnirgroup_jormungandr-0.0.1.dev476.dist-info/WHEEL,sha256=DRw8kuASJm5eemK-iHXJ8nbvPPH1Ngh_6OPlFd1lI-s,106
54
+ sleipnirgroup_jormungandr-0.0.1.dev476.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
55
+ sleipnirgroup_jormungandr-0.0.1.dev476.dist-info/RECORD,,