sleipnirgroup-jormungandr 0.1.1.dev111__cp314-cp314-win_amd64.whl → 0.1.1.dev113__cp314-cp314-win_amd64.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.
Potentially problematic release.
This version of sleipnirgroup-jormungandr might be problematic. Click here for more details.
- jormungandr/_jormungandr.cp314-win_amd64.pyd +0 -0
- jormungandr/test/autodiff/hessian_test.py +1 -4
- jormungandr/test/optimization/arm_on_elevator_problem_test.py +7 -6
- jormungandr/test/optimization/cart_pole_ocp_test.py +1 -4
- jormungandr/test/optimization/cart_pole_problem_test.py +1 -4
- jormungandr/test/optimization/differential_drive_problem_test.py +6 -4
- jormungandr/test/optimization/double_integrator_problem_test.py +1 -4
- jormungandr/test/optimization/flywheel_problem_test.py +3 -4
- {sleipnirgroup_jormungandr-0.1.1.dev111.dist-info → sleipnirgroup_jormungandr-0.1.1.dev113.dist-info}/METADATA +1 -1
- {sleipnirgroup_jormungandr-0.1.1.dev111.dist-info → sleipnirgroup_jormungandr-0.1.1.dev113.dist-info}/RECORD +13 -13
- {sleipnirgroup_jormungandr-0.1.1.dev111.dist-info → sleipnirgroup_jormungandr-0.1.1.dev113.dist-info}/LICENSE.txt +0 -0
- {sleipnirgroup_jormungandr-0.1.1.dev111.dist-info → sleipnirgroup_jormungandr-0.1.1.dev113.dist-info}/WHEEL +0 -0
- {sleipnirgroup_jormungandr-0.1.1.dev111.dist-info → sleipnirgroup_jormungandr-0.1.1.dev113.dist-info}/entry_points.txt +0 -0
|
Binary file
|
|
@@ -187,10 +187,7 @@ def test_sum_of_squares():
|
|
|
187
187
|
for i in range(4):
|
|
188
188
|
x[i].set_value(0.0)
|
|
189
189
|
|
|
190
|
-
J =
|
|
191
|
-
for i in range(4):
|
|
192
|
-
J += (r[i] - x[i]) * (r[i] - x[i])
|
|
193
|
-
|
|
190
|
+
J = sum((r[i] - x[i]) * (r[i] - x[i]) for i in range(4))
|
|
194
191
|
H = Hessian(J, x)
|
|
195
192
|
|
|
196
193
|
expected_H = np.diag([2.0] * 4)
|
|
@@ -84,12 +84,13 @@ def test_arm_on_elevator_problem():
|
|
|
84
84
|
problem.subject_to(heights <= END_EFFECTOR_MAX_HEIGHT)
|
|
85
85
|
|
|
86
86
|
# Cost function
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
ARM_END_ANGLE - arm[0, k]
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
problem.minimize(
|
|
88
|
+
sum(
|
|
89
|
+
(ELEVATOR_END_HEIGHT - elevator[0, k]) ** 2
|
|
90
|
+
+ (ARM_END_ANGLE - arm[0, k]) ** 2
|
|
91
|
+
for k in range(N + 1)
|
|
92
|
+
)
|
|
93
|
+
)
|
|
93
94
|
|
|
94
95
|
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
95
96
|
assert problem.equality_constraint_type() == ExpressionType.LINEAR
|
|
@@ -73,10 +73,7 @@ def test_cart_pole_ocp():
|
|
|
73
73
|
U = problem.U()
|
|
74
74
|
|
|
75
75
|
# Minimize sum squared inputs
|
|
76
|
-
|
|
77
|
-
for k in range(N):
|
|
78
|
-
J += U[:, k : k + 1].T @ U[:, k : k + 1]
|
|
79
|
-
problem.minimize(J)
|
|
76
|
+
problem.minimize(sum(U[:, k : k + 1].T @ U[:, k : k + 1] for k in range(N)))
|
|
80
77
|
|
|
81
78
|
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
82
79
|
assert problem.equality_constraint_type() == ExpressionType.NONLINEAR
|
|
@@ -62,10 +62,7 @@ def test_cart_pole_problem():
|
|
|
62
62
|
)
|
|
63
63
|
|
|
64
64
|
# Minimize sum squared inputs
|
|
65
|
-
|
|
66
|
-
for k in range(N):
|
|
67
|
-
J += U[:, k : k + 1].T @ U[:, k : k + 1]
|
|
68
|
-
problem.minimize(J)
|
|
65
|
+
problem.minimize(sum(U[:, k : k + 1].T @ U[:, k : k + 1] for k in range(N)))
|
|
69
66
|
|
|
70
67
|
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
71
68
|
assert problem.equality_constraint_type() == ExpressionType.NONLINEAR
|
|
@@ -60,10 +60,12 @@ def test_differential_drive_problem():
|
|
|
60
60
|
)
|
|
61
61
|
|
|
62
62
|
# Minimize sum squared states and inputs
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
63
|
+
problem.minimize(
|
|
64
|
+
sum(
|
|
65
|
+
X[:, k : k + 1].T @ X[:, k : k + 1] + U[:, k : k + 1].T @ U[:, k : k + 1]
|
|
66
|
+
for k in range(N)
|
|
67
|
+
)
|
|
68
|
+
)
|
|
67
69
|
|
|
68
70
|
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
69
71
|
assert problem.equality_constraint_type() == ExpressionType.NONLINEAR
|
|
@@ -48,10 +48,7 @@ def test_double_integrator_problem():
|
|
|
48
48
|
problem.subject_to(U <= 1)
|
|
49
49
|
|
|
50
50
|
# Cost function - minimize position error
|
|
51
|
-
|
|
52
|
-
for k in range(N + 1):
|
|
53
|
-
J += (r - X[0, k]) ** 2
|
|
54
|
-
problem.minimize(J)
|
|
51
|
+
problem.minimize(sum((r - X[0, k]) ** 2 for k in range(N + 1)))
|
|
55
52
|
|
|
56
53
|
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
57
54
|
assert problem.equality_constraint_type() == ExpressionType.LINEAR
|
|
@@ -39,10 +39,9 @@ def test_flywheel_problem():
|
|
|
39
39
|
|
|
40
40
|
# Cost function - minimize error
|
|
41
41
|
r = np.array([[10.0]])
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
problem.minimize(J)
|
|
42
|
+
problem.minimize(
|
|
43
|
+
sum((r - X[:, k : k + 1]).T @ (r - X[:, k : k + 1]) for k in range(N + 1))
|
|
44
|
+
)
|
|
46
45
|
|
|
47
46
|
assert problem.cost_function_type() == ExpressionType.QUADRATIC
|
|
48
47
|
assert problem.equality_constraint_type() == ExpressionType.LINEAR
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: sleipnirgroup-jormungandr
|
|
3
|
-
Version: 0.1.1.
|
|
3
|
+
Version: 0.1.1.dev113
|
|
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
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
jormungandr/__init__.py,sha256=nIqhLHGx0a-3v5s7YOWR85BlvEH9MDLJkpoY5pn16lk,160
|
|
2
2
|
jormungandr/__init__.pyi,sha256=HWCCvNM0jXajj0qEvWFgul1LDL3LwokIzfAXCiQ6HOE,66
|
|
3
|
-
jormungandr/_jormungandr.cp314-win_amd64.pyd,sha256=
|
|
3
|
+
jormungandr/_jormungandr.cp314-win_amd64.pyd,sha256=7aWKnaiP-M1b_Dj5BOSwvxOBBNfpFxZozTH4_TQ1j54,1216512
|
|
4
4
|
jormungandr/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
5
|
jormungandr/autodiff/__init__.py,sha256=KjtAsCEanXWohdJh2QvSjxXUosRoIrnf0Bn8IZ5CRSk,1474
|
|
6
6
|
jormungandr/autodiff/__init__.pyi,sha256=ysqmfazXBQqG71aInyQYy8P78p4vabltGWVBEAOM4VA,66055
|
|
@@ -25,21 +25,21 @@ jormungandr/cpp/optimization/bind_inequality_constraints.cpp,sha256=HP8OJKFLEkyH
|
|
|
25
25
|
jormungandr/cpp/optimization/bind_ocp.cpp,sha256=y2wTfQSPQ8X2HcPjABBZ8bCM47dQ5SCpm_w5Ex92dWg,5576
|
|
26
26
|
jormungandr/cpp/optimization/bind_problem.cpp,sha256=_g0ZL-S2imsI2UjcQYIzjCP0OOzpBt03MHn52A-4pbk,8030
|
|
27
27
|
jormungandr/test/autodiff/gradient_test.py,sha256=0heYQmIA60Saw7Zm5eknPlv_TSC4pML6zuaqlESzpZ8,19413
|
|
28
|
-
jormungandr/test/autodiff/hessian_test.py,sha256=
|
|
28
|
+
jormungandr/test/autodiff/hessian_test.py,sha256=Ytg2Ka01qmXD2pmEKV-8gTwfQ-t-P5rBLFz4fpCaFKo,7362
|
|
29
29
|
jormungandr/test/autodiff/jacobian_test.py,sha256=S0Ci9_zN_W15tJOW7RtUyf2kZLwrT9Plt_dfXrZqlW8,4549
|
|
30
30
|
jormungandr/test/autodiff/variable_matrix_test.py,sha256=krIVX7tyPvXPvFJkZcYdqgzs2NvnYbFb5vsPB6Yz4Zo,10363
|
|
31
31
|
jormungandr/test/autodiff/variable_test.py,sha256=s7m3Jm1I-h6rdMcgCJ3kqyIg6IwcaSFPDAq5HRVz_pc,193
|
|
32
|
-
jormungandr/test/optimization/arm_on_elevator_problem_test.py,sha256=
|
|
33
|
-
jormungandr/test/optimization/cart_pole_ocp_test.py,sha256=
|
|
34
|
-
jormungandr/test/optimization/cart_pole_problem_test.py,sha256=
|
|
32
|
+
jormungandr/test/optimization/arm_on_elevator_problem_test.py,sha256=EJClHvAhYjkuomodne33Pq8aMz3dhRtND_8SRHUNuAo,3345
|
|
33
|
+
jormungandr/test/optimization/cart_pole_ocp_test.py,sha256=w82yeewfCGGF3XC2dpVNfBKXbuaahx456BKgCU7bW4c,4164
|
|
34
|
+
jormungandr/test/optimization/cart_pole_problem_test.py,sha256=8-YDXIHWr7vP2BTLYqzyV8xG5pJBt_cwVAYVcQfrZSg,3967
|
|
35
35
|
jormungandr/test/optimization/constraints_test.py,sha256=JhCRliDu20M-br2Q-QI_mBVwTGCe_vQJXpeoVEFNl68,6774
|
|
36
36
|
jormungandr/test/optimization/decision_variable_test.py,sha256=J0wBIr8-yYqZn1XpNofwS7gLUwObgg9zIha-5Qdo4lw,2328
|
|
37
37
|
jormungandr/test/optimization/differential_drive_ocp_test.py,sha256=sV7vMLraISbkfuW9wNnE9KLk55n2jufejri03ac1wBk,4339
|
|
38
|
-
jormungandr/test/optimization/differential_drive_problem_test.py,sha256=
|
|
39
|
-
jormungandr/test/optimization/double_integrator_problem_test.py,sha256=
|
|
38
|
+
jormungandr/test/optimization/differential_drive_problem_test.py,sha256=UZEpfm95yTQmxavm5m-uDrNnOKbNtRSBTL2IUReHy4k,4417
|
|
39
|
+
jormungandr/test/optimization/double_integrator_problem_test.py,sha256=W2VNRHr7V01ZQvrHX0ddmdBKXDmGv6ZpEHrQIrHesJw,3857
|
|
40
40
|
jormungandr/test/optimization/exit_status_test.py,sha256=a2ZPDToi6zbtBkGhW5fIWnZ_e_VuHsGNl8cEHVF_npw,3772
|
|
41
41
|
jormungandr/test/optimization/flywheel_ocp_test.py,sha256=TobBHYQbZ9vmP51E93_dW7PSEBhDgcZ_Ptg95vHG4sk,5344
|
|
42
|
-
jormungandr/test/optimization/flywheel_problem_test.py,sha256=
|
|
42
|
+
jormungandr/test/optimization/flywheel_problem_test.py,sha256=5-WG5W7eAsPZwJAu0imQKYBkK2xHSxuTdWfoY_7Byrc,3286
|
|
43
43
|
jormungandr/test/optimization/linear_problem_test.py,sha256=72tTcoXgaIRBuiFS7GC9xUFKBFtt8I1HOXjg6O0wdNs,1509
|
|
44
44
|
jormungandr/test/optimization/multistart_test.py,sha256=uZhtvnNiabb4padxLtHO3vFO28dYsXlVXL5pr5Cs2cc,1292
|
|
45
45
|
jormungandr/test/optimization/nonlinear_problem_test.py,sha256=Qkqtu5yx16tQQgwzed3aXpJctw7dPZ1LFnD1akON4bU,5755
|
|
@@ -50,8 +50,8 @@ jormungandr/cpp/optimization/ocp/bind_timestep_method.cpp,sha256=FjamA69GM4seU62
|
|
|
50
50
|
jormungandr/cpp/optimization/ocp/bind_transcription_method.cpp,sha256=IjbRzq0CAvXnv3D4FxSx0QHLVW73jSiT1ISt_eRc9mM,718
|
|
51
51
|
jormungandr/cpp/optimization/solver/bind_exit_status.cpp,sha256=WgEOE8jpJEKoM8xRhIn8P5eaEUUrvCEWPh6oyYQtHMo,1596
|
|
52
52
|
jormungandr/cpp/optimization/solver/bind_iteration_info.cpp,sha256=c9lduzdVBsdavU1pXWSuVikhmyJB7STZAoDBkg7gXJM,1184
|
|
53
|
-
sleipnirgroup_jormungandr-0.1.1.
|
|
54
|
-
sleipnirgroup_jormungandr-0.1.1.
|
|
55
|
-
sleipnirgroup_jormungandr-0.1.1.
|
|
56
|
-
sleipnirgroup_jormungandr-0.1.1.
|
|
57
|
-
sleipnirgroup_jormungandr-0.1.1.
|
|
53
|
+
sleipnirgroup_jormungandr-0.1.1.dev113.dist-info/LICENSE.txt,sha256=nwxb5LL2JfGlD5R530eZ7dm2aEepy57PDyhMunTgahU,1476
|
|
54
|
+
sleipnirgroup_jormungandr-0.1.1.dev113.dist-info/METADATA,sha256=9RVth5QvnkElZAt1HWHewit8P9QZj1udAgFueae0z6A,18121
|
|
55
|
+
sleipnirgroup_jormungandr-0.1.1.dev113.dist-info/WHEEL,sha256=u0Ez7B4csF8NyodQ843p7Uc2t51NkONHPp7CxMwTb9k,96
|
|
56
|
+
sleipnirgroup_jormungandr-0.1.1.dev113.dist-info/entry_points.txt,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
57
|
+
sleipnirgroup_jormungandr-0.1.1.dev113.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|