openscvx 0.5.3.dev34__py3-none-any.whl → 0.5.3.dev36__py3-none-any.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.
- openscvx/_version.py +3 -3
- openscvx/problem.py +29 -6
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/METADATA +20 -7
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/RECORD +10 -10
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/scm_file_list.json +20 -15
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/scm_version.json +2 -2
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/WHEEL +0 -0
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/entry_points.txt +0 -0
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/licenses/LICENSE +0 -0
- {openscvx-0.5.3.dev34.dist-info → openscvx-0.5.3.dev36.dist-info}/top_level.txt +0 -0
openscvx/_version.py
CHANGED
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.5.3.
|
|
22
|
-
__version_tuple__ = version_tuple = (0, 5, 3, '
|
|
21
|
+
__version__ = version = '0.5.3.dev36'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 5, 3, 'dev36')
|
|
23
23
|
|
|
24
|
-
__commit_id__ = commit_id = '
|
|
24
|
+
__commit_id__ = commit_id = 'g1eddc1a14'
|
openscvx/problem.py
CHANGED
|
@@ -63,7 +63,11 @@ from openscvx.lowered.jax_constraints import (
|
|
|
63
63
|
LoweredJaxConstraints,
|
|
64
64
|
LoweredNodalConstraint,
|
|
65
65
|
)
|
|
66
|
-
from openscvx.propagation import
|
|
66
|
+
from openscvx.propagation import (
|
|
67
|
+
get_propagation_solver,
|
|
68
|
+
propagate_trajectory_results,
|
|
69
|
+
s_to_t,
|
|
70
|
+
)
|
|
67
71
|
from openscvx.solvers import ConvexSolver, resolve_solver_config
|
|
68
72
|
from openscvx.symbolic.builder import preprocess_symbolic_problem
|
|
69
73
|
from openscvx.symbolic.expr import CTCS, Constraint
|
|
@@ -2074,7 +2078,12 @@ class Problem:
|
|
|
2074
2078
|
``ceil(T_max / settings.prp.dt) + 1`` where ``T_max`` is the
|
|
2075
2079
|
longest terminal time across the batch. All ``B`` elements are
|
|
2076
2080
|
interpolated to the **same** ``n_times`` so the output arrays
|
|
2077
|
-
have uniform shape.
|
|
2081
|
+
have uniform shape. The requested (or default) value is capped
|
|
2082
|
+
so no single segment of any element receives more dense samples
|
|
2083
|
+
than the propagation solver's compiled per-segment capacity
|
|
2084
|
+
(``settings.prp.max_tau_len``); the cap binds on the largest
|
|
2085
|
+
segment-duration fraction across the batch, so trajectories with
|
|
2086
|
+
near-uniform segments are left untouched.
|
|
2078
2087
|
|
|
2079
2088
|
Returns:
|
|
2080
2089
|
The same ``results`` object with ``t_full``, ``x_full``, ``u_full``,
|
|
@@ -2095,10 +2104,24 @@ class Problem:
|
|
|
2095
2104
|
n_times = max(int(np.ceil(T_max / self.settings.prp.dt)) + 1, 2)
|
|
2096
2105
|
|
|
2097
2106
|
# The propagation solver is compiled with a per-segment tau capacity of
|
|
2098
|
-
# ``max_tau_len
|
|
2099
|
-
# ``
|
|
2100
|
-
#
|
|
2101
|
-
|
|
2107
|
+
# ``max_tau_len`` — the *per-segment* buffer width, not a total-point
|
|
2108
|
+
# budget. A uniform ``linspace`` grid over an element's real time span
|
|
2109
|
+
# drops about ``(n_times - 1) * seg_dur / span`` points into each
|
|
2110
|
+
# segment, so the binding quantity is the largest segment-duration
|
|
2111
|
+
# fraction across the batch, not the total point count. Bound
|
|
2112
|
+
# ``n_times`` so the busiest segment of any element — plus the endpoint
|
|
2113
|
+
# sample ``simulate_nonlinear_time`` appends — stays within
|
|
2114
|
+
# ``max_tau_len``:
|
|
2115
|
+
# (n_times - 1) * frac_max + 2 <= max_tau_len.
|
|
2116
|
+
u_batch = np.asarray(results.U[-1]) # (B, N, n_u)
|
|
2117
|
+
frac_max = 0.0
|
|
2118
|
+
for b in range(B):
|
|
2119
|
+
t_b = np.asarray(
|
|
2120
|
+
s_to_t(x_batch[b], u_batch[b], self.settings, self._discretizer)
|
|
2121
|
+
).reshape(-1)
|
|
2122
|
+
frac_max = max(frac_max, float(np.diff(t_b).max() / (t_b[-1] - t_b[0])))
|
|
2123
|
+
per_segment_bound = max(int((self.settings.prp.max_tau_len - 2) / frac_max) + 1, 2)
|
|
2124
|
+
n_times = min(n_times, per_segment_bound)
|
|
2102
2125
|
|
|
2103
2126
|
t_fulls: List[np.ndarray] = []
|
|
2104
2127
|
x_fulls: List[np.ndarray] = []
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openscvx
|
|
3
|
-
Version: 0.5.3.
|
|
3
|
+
Version: 0.5.3.dev36
|
|
4
4
|
Summary: A general Python-based successive convexification implementation which uses a JAX backend.
|
|
5
5
|
Author-email: Chris Hayner and Griffin Norris <haynec@uw.edu>
|
|
6
6
|
License: Apache Software License
|
|
@@ -41,11 +41,8 @@ Provides-Extra: frax
|
|
|
41
41
|
Requires-Dist: frax>=0.0.4; extra == "frax"
|
|
42
42
|
Provides-Extra: test
|
|
43
43
|
Requires-Dist: pytest; extra == "test"
|
|
44
|
-
Requires-Dist: scipy; extra == "test"
|
|
45
|
-
Requires-Dist: jaxlie; extra == "test"
|
|
46
|
-
Requires-Dist: svgpathtools; extra == "test"
|
|
47
44
|
Requires-Dist: pytest-xdist; extra == "test"
|
|
48
|
-
Requires-Dist:
|
|
45
|
+
Requires-Dist: scipy; extra == "test"
|
|
49
46
|
Dynamic: license-file
|
|
50
47
|
|
|
51
48
|
<a id="readme-top"></a>
|
|
@@ -53,8 +50,8 @@ Dynamic: license-file
|
|
|
53
50
|
<img src="figures/openscvx_logo.svg" width="1200"/>
|
|
54
51
|
<p align="center">
|
|
55
52
|
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/lint.yml"><img src="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/lint.yml/badge.svg"/></a>
|
|
56
|
-
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests
|
|
57
|
-
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests-
|
|
53
|
+
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests.yml"><img src="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests.yml/badge.svg"/></a>
|
|
54
|
+
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests-examples.yml"><img src="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests-examples.yml/badge.svg"/></a>
|
|
58
55
|
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/nightly.yml"><img src="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/nightly.yml/badge.svg"/></a>
|
|
59
56
|
<a href="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/release.yml"><img src="https://github.com/OpenSCvx/OpenSCvx/actions/workflows/release.yml/badge.svg?event=release"/></a>
|
|
60
57
|
</p>
|
|
@@ -253,6 +250,22 @@ This repo has the following features:
|
|
|
253
250
|
|
|
254
251
|
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
255
252
|
|
|
253
|
+
## Third-Party Integrations
|
|
254
|
+
|
|
255
|
+
OpenSCvx integrates with several optional third-party packages. Each installs as a pip extra (`pip install openscvx[<extra>]`); without it, the library and its tests degrade gracefully — the corresponding tests simply skip. Integrations with a badge are tested against `main` on every push and re-checked weekly against the latest upstream releases.
|
|
256
|
+
|
|
257
|
+
| Integration | Extra | Provides | Status |
|
|
258
|
+
| --- | --- | --- | --- |
|
|
259
|
+
| [MuJoCo MJX](https://mujoco.readthedocs.io/en/stable/mjx.html) | `mjx` | MJX dynamics adapter (`openscvx.integrations`) | [](https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests-mjx.yml) |
|
|
260
|
+
| [jaxlie](https://github.com/brentyi/jaxlie) | `lie` | SO(3)/SE(3) Lie-group operations and IK initialization | [](https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests-lie.yml) |
|
|
261
|
+
| [qpax](https://github.com/qpax-solver/qpax) | `qpax` | JAX-native QP solver backend | [](https://github.com/OpenSCvx/OpenSCvx/issues/550) |
|
|
262
|
+
| [CVXPYGen](https://github.com/cvxgrp/cvxpygen) | `cvxpygen` | Generated C solver code for the convex subproblem | [](https://github.com/OpenSCvx/OpenSCvx/issues/551) |
|
|
263
|
+
| [moreau](https://pypi.org/project/moreau/) | `moreau` | Licensed QP solver backend |  |
|
|
264
|
+
| [stljax](https://github.com/UW-CTRL/stljax) | `stl` | Signal Temporal Logic robustness bridge |  |
|
|
265
|
+
| [frax](https://github.com/danielpmorton/frax) | `frax` | Robot dynamics for the manipulator examples | [](https://github.com/OpenSCvx/OpenSCvx/actions/workflows/tests-examples.yml) |
|
|
266
|
+
|
|
267
|
+
<p align="right">(<a href="#readme-top">back to top</a>)</p>
|
|
268
|
+
|
|
256
269
|
## Acknowledgements
|
|
257
270
|
|
|
258
271
|
This work was supported by a NASA Space Technology Graduate Research Opportunity and the Office of Naval Research under grant N00014-17-1-2433. The authors would like to acknowledge Natalia Pavlasek, Fabio Spada, Samuel Buckner, Abhi Kamath, Govind Chari, and Purnanand Elango as well as the other Autonomous Controls Laboratory members, for their many helpful discussions and support throughout this work.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
openscvx/__init__.py,sha256=sxiqBoS5jv9UmNSxnrokFXeFMnDSkAxUCtC4X-s-vHk,4456
|
|
2
2
|
openscvx/__main__.py,sha256=Hwm7mtVg3tLdvoUPkpcQv8KF3wxl72PNLBp9axFu8GY,2991
|
|
3
|
-
openscvx/_version.py,sha256=
|
|
3
|
+
openscvx/_version.py,sha256=mGTOVICdRgn5_ZJoQY5syJ-Phm4G17DXDiF9_f2TsJ8,543
|
|
4
4
|
openscvx/config.py,sha256=qfDDYoCe6WqJglKsx5b2W48YOglXenKr-PVRRdCFhYE,9898
|
|
5
5
|
openscvx/loader.py,sha256=5WDLVA6CQxnyi1pRBfP8jQQc0r8RiAM2O_ItKgMXxAk,7660
|
|
6
|
-
openscvx/problem.py,sha256=
|
|
6
|
+
openscvx/problem.py,sha256=aJlXbpwQ9_8gP8N2Ff1pz8biF0FoIZTyDYvLX65DLfw,100224
|
|
7
7
|
openscvx/algorithms/__init__.py,sha256=xEB2sZ_fFbQUSOJY4hOzsZe0cdCuD5LawvrF4fzSt8E,5645
|
|
8
8
|
openscvx/algorithms/base.py,sha256=jMneNL5lc-qg24vvcGQ4NP93d71boRiUGh6uKBykOlM,11638
|
|
9
9
|
openscvx/algorithms/history.py,sha256=aAS3VWT5d4kfsIl5a34YFYglHayPqn0hZGmhXVGbE0g,17456
|
|
@@ -159,11 +159,11 @@ openscvx/utils/caching.py,sha256=Uw2e0G1UNn_vmMDqUZGszIH-O9LJhR4wdVKSPToHiy0,169
|
|
|
159
159
|
openscvx/utils/printing.py,sha256=dsccZ9sXc3TBWShQvBg1Al4UFGMP77ApblfxteEJHLQ,16515
|
|
160
160
|
openscvx/utils/profiling.py,sha256=k2x-i0CpG_kRe6dNcNBGu-ylrOtQw4B4C1UaOTjUMfU,1678
|
|
161
161
|
openscvx/utils/utils.py,sha256=M25RHE_7DSr3Reaca0xCXnDSY9KHuqYvXdh5m1ZotEc,3047
|
|
162
|
-
openscvx-0.5.3.
|
|
163
|
-
openscvx-0.5.3.
|
|
164
|
-
openscvx-0.5.3.
|
|
165
|
-
openscvx-0.5.3.
|
|
166
|
-
openscvx-0.5.3.
|
|
167
|
-
openscvx-0.5.3.
|
|
168
|
-
openscvx-0.5.3.
|
|
169
|
-
openscvx-0.5.3.
|
|
162
|
+
openscvx-0.5.3.dev36.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
163
|
+
openscvx-0.5.3.dev36.dist-info/METADATA,sha256=lL32CihWUYZOvks9xoNvU4JRlSpTB2nHOeHeCnicbL8,12998
|
|
164
|
+
openscvx-0.5.3.dev36.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
|
|
165
|
+
openscvx-0.5.3.dev36.dist-info/entry_points.txt,sha256=1Oqek8Sy28hmAZFgZXDxFXYVf56YLYWlHjhh9RYJ7wE,52
|
|
166
|
+
openscvx-0.5.3.dev36.dist-info/scm_file_list.json,sha256=VDDQ6kOec1NxVc9evE4Q_lhnpoHi_Hw2HmjvfIizIwA,18303
|
|
167
|
+
openscvx-0.5.3.dev36.dist-info/scm_version.json,sha256=dCKdBs9eYy9EKjjzHcLKE-MzfAIfZINu3LplpLc8b58,161
|
|
168
|
+
openscvx-0.5.3.dev36.dist-info/top_level.txt,sha256=nUT4Ybefzh40H8tVXqc1RzKESy_MAowElb-CIvAbd4Q,9
|
|
169
|
+
openscvx-0.5.3.dev36.dist-info/RECORD,,
|
|
@@ -216,26 +216,17 @@
|
|
|
216
216
|
"tests/test_integrators.py",
|
|
217
217
|
"tests/test_discretization.py",
|
|
218
218
|
"tests/test_init.py",
|
|
219
|
-
"tests/test_multishot_propagation.py",
|
|
220
219
|
"tests/test_propagation.py",
|
|
221
220
|
"tests/hohmann_analytical.py",
|
|
222
221
|
"tests/test_expert.py",
|
|
223
222
|
"tests/test_results_parameters.py",
|
|
223
|
+
"tests/test_post_process_batched_tau_clamp.py",
|
|
224
224
|
"tests/test_solve_batched_inference.py",
|
|
225
|
-
"tests/test_solve_jax_bare_brachistochrone.py",
|
|
226
225
|
"tests/test_cvxpygen_optional.py",
|
|
227
|
-
"tests/test_solve_batched_export_roundtrip.py",
|
|
228
|
-
"tests/test_solve_batched_brachistochrone.py",
|
|
229
|
-
"tests/_marks.py",
|
|
230
|
-
"tests/test_impulsive.py",
|
|
231
226
|
"tests/conftest.py",
|
|
232
|
-
"tests/test_solve_jax_vmap_brachistochrone.py",
|
|
233
|
-
"tests/test_brachistochrone.py",
|
|
234
|
-
"tests/test_solve_jax_jit_brachistochrone.py",
|
|
235
227
|
"tests/test_autotuning.py",
|
|
236
|
-
"tests/test_solve_batched_cvxpy_export_errors.py",
|
|
237
|
-
"tests/test_solve_jax_vmap_converged_no_drift.py",
|
|
238
228
|
"tests/symbolic/test_preprocessing.py",
|
|
229
|
+
"tests/symbolic/test_gmsr.py",
|
|
239
230
|
"tests/symbolic/__init__.py",
|
|
240
231
|
"tests/symbolic/test_lower_cvxpy.py",
|
|
241
232
|
"tests/symbolic/test_augmentation.py",
|
|
@@ -277,8 +268,17 @@
|
|
|
277
268
|
"tests/integrations/test_mjx_dynamics.py",
|
|
278
269
|
"tests/integrations/__init__.py",
|
|
279
270
|
"tests/integrations/test_mjx.py",
|
|
280
|
-
"tests/
|
|
281
|
-
"tests/
|
|
271
|
+
"tests/e2e/__init__.py",
|
|
272
|
+
"tests/e2e/test_multishot_propagation.py",
|
|
273
|
+
"tests/e2e/test_solve_jax_bare_brachistochrone.py",
|
|
274
|
+
"tests/e2e/test_solve_batched_export_roundtrip.py",
|
|
275
|
+
"tests/e2e/test_solve_batched_brachistochrone.py",
|
|
276
|
+
"tests/e2e/test_impulsive.py",
|
|
277
|
+
"tests/e2e/test_solve_jax_vmap_brachistochrone.py",
|
|
278
|
+
"tests/e2e/test_brachistochrone.py",
|
|
279
|
+
"tests/e2e/test_solve_jax_jit_brachistochrone.py",
|
|
280
|
+
"tests/e2e/test_solve_batched_cvxpy_export_errors.py",
|
|
281
|
+
"tests/e2e/test_solve_jax_vmap_converged_no_drift.py",
|
|
282
282
|
"tests/solvers/__init__.py",
|
|
283
283
|
"tests/solvers/test_moreau_ptr_solver.py",
|
|
284
284
|
"tests/solvers/test_qpax_ptr_solver.py",
|
|
@@ -412,14 +412,19 @@
|
|
|
412
412
|
"examples/frax/panda_frax_waypoint.py",
|
|
413
413
|
".github/release-drafter.yml",
|
|
414
414
|
".github/assets/logo.svg",
|
|
415
|
+
".github/workflows/tests-qpax.yml",
|
|
415
416
|
".github/workflows/branch-name.yml",
|
|
416
|
-
".github/workflows/tests-
|
|
417
|
+
".github/workflows/tests-lie.yml",
|
|
417
418
|
".github/workflows/release.yml",
|
|
419
|
+
".github/workflows/tests-cvxpygen.yml",
|
|
420
|
+
".github/workflows/tests-mjx.yml",
|
|
418
421
|
".github/workflows/docs.yml",
|
|
422
|
+
".github/workflows/tests.yml",
|
|
419
423
|
".github/workflows/lint.yml",
|
|
420
424
|
".github/workflows/release-drafter.yml",
|
|
425
|
+
".github/workflows/tests-examples.yml",
|
|
421
426
|
".github/workflows/_docs.yml",
|
|
422
|
-
".github/workflows/
|
|
427
|
+
".github/workflows/_extra.yml",
|
|
423
428
|
".github/workflows/nightly.yml"
|
|
424
429
|
]
|
|
425
430
|
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|