openscvx 0.5.3.dev34__py3-none-any.whl → 0.5.3.dev35__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 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.dev34'
22
- __version_tuple__ = version_tuple = (0, 5, 3, 'dev34')
21
+ __version__ = version = '0.5.3.dev35'
22
+ __version_tuple__ = version_tuple = (0, 5, 3, 'dev35')
23
23
 
24
- __commit_id__ = commit_id = 'g264808b5c'
24
+ __commit_id__ = commit_id = 'g43f7b7f31'
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 get_propagation_solver, propagate_trajectory_results
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``. A uniform ``linspace`` grid sized from the batch
2099
- # ``T_max`` can place more output times into one normalized segment than
2100
- # that capacity when shorter trajectories are padded to the same count.
2101
- n_times = min(n_times, self.settings.prp.max_tau_len)
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.dev34
3
+ Version: 0.5.3.dev35
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
@@ -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=L9ZphxtxeeGsqqfYNJWZN6zQn1NOfuaVXbJ1EAHCAlQ,543
3
+ openscvx/_version.py,sha256=zYvwhGhbvK9AbmgQE8S1Hgf833v_MnaaaIPnD1k7tlc,543
4
4
  openscvx/config.py,sha256=qfDDYoCe6WqJglKsx5b2W48YOglXenKr-PVRRdCFhYE,9898
5
5
  openscvx/loader.py,sha256=5WDLVA6CQxnyi1pRBfP8jQQc0r8RiAM2O_ItKgMXxAk,7660
6
- openscvx/problem.py,sha256=KF7uU7n9-4_5doF9fHgCKYyNYK5f4RXvEDQPTsGL4rU,98992
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.dev34.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
163
- openscvx-0.5.3.dev34.dist-info/METADATA,sha256=STfOaISxMRiB5ex5IXZ8nvFrWo1CsQWSW00O8DoSK_E,10924
164
- openscvx-0.5.3.dev34.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
165
- openscvx-0.5.3.dev34.dist-info/entry_points.txt,sha256=1Oqek8Sy28hmAZFgZXDxFXYVf56YLYWlHjhh9RYJ7wE,52
166
- openscvx-0.5.3.dev34.dist-info/scm_file_list.json,sha256=-h7DqIzKmhRw0PrIgPrSxbDVDWqEMf23QMitgq0uVbU,18041
167
- openscvx-0.5.3.dev34.dist-info/scm_version.json,sha256=F2KcBa114FhBdQZcIJFW21NTzPOZ39zQL9LB5tP9Uhs,161
168
- openscvx-0.5.3.dev34.dist-info/top_level.txt,sha256=nUT4Ybefzh40H8tVXqc1RzKESy_MAowElb-CIvAbd4Q,9
169
- openscvx-0.5.3.dev34.dist-info/RECORD,,
162
+ openscvx-0.5.3.dev35.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
163
+ openscvx-0.5.3.dev35.dist-info/METADATA,sha256=zPUnmSxAXkoEBCyp8VD6xerMp6zXIyMuix9WvCgrIUI,10924
164
+ openscvx-0.5.3.dev35.dist-info/WHEEL,sha256=K260EYznzXsJYBQGqmI8VTxEdiZYNvDZwW9cBh9-_MA,91
165
+ openscvx-0.5.3.dev35.dist-info/entry_points.txt,sha256=1Oqek8Sy28hmAZFgZXDxFXYVf56YLYWlHjhh9RYJ7wE,52
166
+ openscvx-0.5.3.dev35.dist-info/scm_file_list.json,sha256=SlBGAndk9F0hQaBc0H6_xbLqjPOhzhpxfYjAYRvf1M8,18093
167
+ openscvx-0.5.3.dev35.dist-info/scm_version.json,sha256=Cx_YDZgQq_q8oE32xSp_vT9pYGqjZ26SBE6bmsrbdT4,161
168
+ openscvx-0.5.3.dev35.dist-info/top_level.txt,sha256=nUT4Ybefzh40H8tVXqc1RzKESy_MAowElb-CIvAbd4Q,9
169
+ openscvx-0.5.3.dev35.dist-info/RECORD,,
@@ -221,6 +221,7 @@
221
221
  "tests/hohmann_analytical.py",
222
222
  "tests/test_expert.py",
223
223
  "tests/test_results_parameters.py",
224
+ "tests/test_post_process_batched_tau_clamp.py",
224
225
  "tests/test_solve_batched_inference.py",
225
226
  "tests/test_solve_jax_bare_brachistochrone.py",
226
227
  "tests/test_cvxpygen_optional.py",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "tag": "0.5.2",
3
- "distance": 34,
4
- "node": "g264808b5c8dfd13d52b35c4d96c885b010058203",
3
+ "distance": 35,
4
+ "node": "g43f7b7f313888f19e8586f108d8e11bed332f87f",
5
5
  "dirty": false,
6
6
  "branch": "main",
7
7
  "node_date": "2026-07-06"