openscvx 0.3.2.dev316__tar.gz → 0.3.2.dev317__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.
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/_docs.yml +1 -1
- {openscvx-0.3.2.dev316/openscvx.egg-info → openscvx-0.3.2.dev317}/PKG-INFO +1 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/_version.py +3 -3
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/algorithms/optimization_results.py +22 -25
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/config.py +0 -8
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/discretization/discretization.py +16 -15
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/integrators/runge_kutta.py +9 -9
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/unified.py +2 -2
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/plotting.py +2 -2
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/scp_iteration.py +1 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/problem.py +18 -16
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/propagation/propagation.py +19 -9
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/solvers/base.py +2 -2
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/arithmetic.py +31 -15
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/array.py +11 -11
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/constraint.py +13 -13
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/control.py +6 -4
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/expr.py +23 -15
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/lie/adjoint.py +19 -9
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/lie/se3.py +6 -5
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/lie/so3.py +6 -5
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/linalg.py +15 -11
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/logic.py +5 -5
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/math.py +43 -31
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/spatial.py +9 -7
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/state.py +13 -12
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/stl.py +10 -7
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/variable.py +15 -7
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/vmap.py +3 -3
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/lower.py +2 -2
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/lowerers/cvxpy.py +2 -2
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/lowerers/jax.py +5 -5
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/preprocessing.py +3 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/utils/caching.py +1 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/utils/printing.py +2 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317/openscvx.egg-info}/PKG-INFO +1 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/scripts/gen_example_pages.py +1 -1
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/assets/logo.svg +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/release-drafter.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/branch-name.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/docs.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/lint.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/nightly.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/release-drafter.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/release.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/tests-integration.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.github/workflows/tests-unit.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/.gitignore +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/CONTRIBUTING.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/LICENSE +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/README.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/Foundations/constraint_reformulation.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/Foundations/control_parameterization.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/Foundations/discretization.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/Foundations/ocp.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/Foundations/scvx.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/Foundations/time_dilation.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UnderTheHood/lowering_architecture.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UnderTheHood/vectorization_and_vmapping.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/00_introduction.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/01_hello_world_brachistochrone.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/02_drone_racing_constraints.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/03_obstacle_avoidance_vmap.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/04_viewpoint_constraints.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/05_visualization.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/06_logic.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/UsersGuide/07_lie.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/favicon.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/images/ct-scvx_dark.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/images/ct-scvx_light.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/images/ctcs_dark.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/images/ctcs_light.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/images/problem_class_dark.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/images/problem_class_light.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/assets/logo.svg +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/citation.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/examples.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/getting-started.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/index.md +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/docs/javascripts/mathjax.js +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/abstract/brachistochrone.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/arm/three_link_arm.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/car/dubins_car.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/car/dubins_car_conditional.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/car/dubins_car_disjoint.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/car/dubins_car_stljax.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/cinema_vp.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/cinema_vp_realtime_base.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/dr_double_integrator.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/dr_vp.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/dr_vp_nodal.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/dr_vp_polytope.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/drone_racing.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/obstacle_avoidance.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/obstacle_avoidance_nodal.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/obstacle_avoidance_realtime_base.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/drone/obstacle_avoidance_vmap.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/plotting.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/plotting_viser.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/realtime/cinema_vp_realtime.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/realtime/drone_racing_realtime.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/realtime/dubins_car_realtime.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/realtime/obstacle_avoidance_realtime.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/rocket/3DoF_pdg.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/examples/spacecraft/proxops_cw.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/ctlos_cine.gif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/ctlos_dr.gif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/dtlos_cine.gif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/dtlos_dr.gif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/openscvx_logo.svg +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/openscvx_logo_square.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/oscvx_structure_full_dark.svg +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/figures/video_preview.png +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/1-background.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/1-background@1x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/1-background@2x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/1-background@3x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/1-background@4x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/2-mars.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/2-mars@1x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/2-mars@2x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/2-mars@3x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/2-mars@4x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/3-moon.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/3-moon@1x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/3-moon@2x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/3-moon@3x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/3-moon@4x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/4-sat1.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/4-sat1@1x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/4-sat1@2x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/4-sat1@3x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/4-sat1@4x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/5-space.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/5-space@1x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/5-space@2x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/5-space@3x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/5-space@4x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/6-earth.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/6-earth@1x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/6-earth@2x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/6-earth@3x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/images/layers/6-earth@4x.avif +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/javascripts/parallax.js +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/logo.svg +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/stylesheets/custom.css +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/assets/stylesheets/parallax.css +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/home.html +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/main.html +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/partials/parallax/hero.html +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/material/overrides/partials/parallax.html +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/mkdocs.yml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/algorithms/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/algorithms/autotuning.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/algorithms/base.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/algorithms/penalized_trust_region.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/discretization/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/expert/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/expert/byof.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/expert/lowering.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/expert/validation.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/init/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/init/interpolation.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/integrators/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/cvxpy_constraints.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/cvxpy_variables.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/dynamics.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/jax_constraints.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/parameters.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/lowered/problem.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/viser/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/viser/animated.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/viser/plotly_integration.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/viser/primitives.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/viser/scp.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/plotting/viser/server.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/propagation/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/propagation/post_processing.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/solvers/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/solvers/ptr_solver.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/augmentation.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/builder.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/constraint_set.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/expr/lie/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/hashing.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/lowerers/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/problem.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/time.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/symbolic/unified.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/utils/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/utils/cache.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/utils/profiling.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx/utils/utils.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx.egg-info/SOURCES.txt +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx.egg-info/dependency_links.txt +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx.egg-info/requires.txt +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/openscvx.egg-info/top_level.txt +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/pyproject.toml +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/scripts/gen_ref_pages.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/setup.cfg +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/brachistochrone_analytical.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/__init__.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_arithmetic.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_array.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_constraint.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_expr.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_lie.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_linalg.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_logic.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_math.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_node_reference.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_parameters.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_scaling.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_spatial.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_variable.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/expr/test_vmap.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/test_augmentation.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/test_hashing.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/test_lower_cvxpy.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/test_lower_jax.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/test_preprocessing.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/symbolic/test_unified.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_brachistochrone.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_cvxpygen_optional.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_discretization.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_examples.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_expert.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_init.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_integrators.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_plotting.py +0 -0
- {openscvx-0.3.2.dev316 → openscvx-0.3.2.dev317}/tests/test_propagation.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: openscvx
|
|
3
|
-
Version: 0.3.2.
|
|
3
|
+
Version: 0.3.2.dev317
|
|
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
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.3.2.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 3, 2, '
|
|
31
|
+
__version__ = version = '0.3.2.dev317'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 3, 2, 'dev317')
|
|
33
33
|
|
|
34
|
-
__commit_id__ = commit_id = '
|
|
34
|
+
__commit_id__ = commit_id = 'g443a82694'
|
|
@@ -15,36 +15,33 @@ class OptimizationResults:
|
|
|
15
15
|
storage for plotting and application-specific data.
|
|
16
16
|
|
|
17
17
|
Attributes:
|
|
18
|
-
converged (bool): Whether the optimization successfully converged
|
|
19
|
-
t_final (float): Final time of the optimized trajectory
|
|
18
|
+
converged (bool): Whether the optimization successfully converged.
|
|
19
|
+
t_final (float): Final time of the optimized trajectory.
|
|
20
20
|
x_guess (np.ndarray): Optimized state trajectory at discretization nodes,
|
|
21
|
-
shape (N, n_states)
|
|
21
|
+
shape (N, n_states).
|
|
22
22
|
u_guess (np.ndarray): Optimized control trajectory at discretization nodes,
|
|
23
|
-
shape (N, n_controls)
|
|
24
|
-
|
|
25
|
-
# Dictionary-based Access
|
|
23
|
+
shape (N, n_controls).
|
|
26
24
|
nodes (dict[str, np.ndarray]): Dictionary mapping state/control names to arrays
|
|
27
25
|
at optimization nodes. Includes both user-defined and augmented variables.
|
|
28
26
|
trajectory (dict[str, np.ndarray]): Dictionary mapping state/control names to arrays
|
|
29
27
|
along the propagated trajectory. Added by post_process().
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
ctcs_violation (Optional[np.ndarray]): Continuous-time constraint violations
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
plotting_data (dict[str, Any]): Flexible storage for plotting and application data
|
|
28
|
+
x_history (list[np.ndarray]): State trajectories from each SCP iteration.
|
|
29
|
+
u_history (list[np.ndarray]): Control trajectories from each SCP iteration.
|
|
30
|
+
discretization_history (list[np.ndarray]): Time discretization from each iteration.
|
|
31
|
+
J_tr_history (list[np.ndarray]): Trust region cost history.
|
|
32
|
+
J_vb_history (list[np.ndarray]): Virtual buffer cost history.
|
|
33
|
+
J_vc_history (list[np.ndarray]): Virtual control cost history.
|
|
34
|
+
t_full (Optional[np.ndarray]): Full time grid for interpolated trajectory.
|
|
35
|
+
Added by propagate_trajectory_results.
|
|
36
|
+
x_full (Optional[np.ndarray]): Interpolated state trajectory on full time grid.
|
|
37
|
+
Added by propagate_trajectory_results.
|
|
38
|
+
u_full (Optional[np.ndarray]): Interpolated control trajectory on full time grid.
|
|
39
|
+
Added by propagate_trajectory_results.
|
|
40
|
+
cost (Optional[float]): Total cost of the optimized trajectory.
|
|
41
|
+
Added by propagate_trajectory_results.
|
|
42
|
+
ctcs_violation (Optional[np.ndarray]): Continuous-time constraint violations.
|
|
43
|
+
Added by propagate_trajectory_results.
|
|
44
|
+
plotting_data (dict[str, Any]): Flexible storage for plotting and application data.
|
|
48
45
|
"""
|
|
49
46
|
|
|
50
47
|
# Core optimization results
|
|
@@ -105,7 +102,7 @@ class OptimizationResults:
|
|
|
105
102
|
"""Initialize the results object."""
|
|
106
103
|
pass
|
|
107
104
|
|
|
108
|
-
def update_plotting_data(self, **kwargs):
|
|
105
|
+
def update_plotting_data(self, **kwargs: Any) -> None:
|
|
109
106
|
"""
|
|
110
107
|
Update the plotting data with additional information.
|
|
111
108
|
|
|
@@ -211,14 +211,6 @@ class SimConfig:
|
|
|
211
211
|
u (Control): Control object, must have .min and .max attributes for
|
|
212
212
|
bounds.
|
|
213
213
|
total_time (float): The total simulation time.
|
|
214
|
-
idx_x_true (slice): Slice for true state indices.
|
|
215
|
-
idx_x_true_prop (slice): Slice for true propagation state indices.
|
|
216
|
-
idx_u_true (slice): Slice for true control indices.
|
|
217
|
-
idx_t (slice): Slice for time index.
|
|
218
|
-
idx_y (slice): Slice for constraint violation indices.
|
|
219
|
-
idx_y_prop (slice): Slice for propagation constraint violation
|
|
220
|
-
indices.
|
|
221
|
-
idx_s (slice): Slice for time dilation index.
|
|
222
214
|
save_compiled (bool): If True, save and reuse compiled solver
|
|
223
215
|
functions. Defaults to False.
|
|
224
216
|
ctcs_node_intervals (list, optional): Node intervals for CTCS
|
|
@@ -43,7 +43,13 @@ def dVdt(
|
|
|
43
43
|
n_u (int): Number of controls.
|
|
44
44
|
N (int): Number of nodes in trajectory.
|
|
45
45
|
dis_type (str): Discretization type ("ZOH" or "FOH").
|
|
46
|
-
|
|
46
|
+
S_x: State scaling matrix.
|
|
47
|
+
c_x: State offset vector.
|
|
48
|
+
S_u: Control scaling matrix.
|
|
49
|
+
c_u: Control offset vector.
|
|
50
|
+
inv_S_x: Inverse state scaling matrix.
|
|
51
|
+
inv_S_u: Inverse control scaling matrix.
|
|
52
|
+
params: Additional parameters passed to state_dot, A, and B.
|
|
47
53
|
|
|
48
54
|
Returns:
|
|
49
55
|
jnp.ndarray: Time derivative of augmented state vector.
|
|
@@ -117,14 +123,14 @@ def dVdt(
|
|
|
117
123
|
|
|
118
124
|
|
|
119
125
|
def calculate_discretization(
|
|
120
|
-
x,
|
|
121
|
-
u,
|
|
126
|
+
x: np.ndarray,
|
|
127
|
+
u: np.ndarray,
|
|
122
128
|
state_dot: callable,
|
|
123
129
|
A: callable,
|
|
124
130
|
B: callable,
|
|
125
131
|
settings: Config,
|
|
126
132
|
params: dict,
|
|
127
|
-
):
|
|
133
|
+
) -> tuple[jnp.ndarray, jnp.ndarray, jnp.ndarray, jnp.ndarray, jnp.ndarray]:
|
|
128
134
|
"""Calculate the discretized system matrices.
|
|
129
135
|
|
|
130
136
|
This function computes the discretized system matrices (A_bar, B_bar, C_bar)
|
|
@@ -137,20 +143,15 @@ def calculate_discretization(
|
|
|
137
143
|
A (callable): Function computing state Jacobian.
|
|
138
144
|
B (callable): Function computing control Jacobian.
|
|
139
145
|
settings: Configuration settings for OpenSCvx.
|
|
140
|
-
|
|
141
|
-
debug (bool): Whether to use debug mode.
|
|
142
|
-
solver (str): Name of the solver to use.
|
|
143
|
-
rtol (float): Relative tolerance for integration.
|
|
144
|
-
atol (float): Absolute tolerance for integration.
|
|
145
|
-
dis_type (str): Discretization type ("ZOH" or "FOH").
|
|
146
|
-
**kwargs: Additional parameters passed to state_dot, A, and B.
|
|
146
|
+
params: Additional parameters passed to state_dot, A, and B.
|
|
147
147
|
|
|
148
148
|
Returns:
|
|
149
|
-
tuple
|
|
149
|
+
tuple[jnp.ndarray, jnp.ndarray, jnp.ndarray, jnp.ndarray, jnp.ndarray]:
|
|
150
|
+
(A_bar, B_bar, C_bar, x_prop, Vmulti) where:
|
|
150
151
|
- A_bar: Discretized state transition matrix
|
|
151
152
|
- B_bar: Discretized control influence matrix
|
|
152
153
|
- C_bar: Discretized control influence matrix for next node
|
|
153
|
-
-
|
|
154
|
+
- x_prop: Propagated state
|
|
154
155
|
- Vmulti: Full augmented state trajectory
|
|
155
156
|
"""
|
|
156
157
|
# Unpack settings
|
|
@@ -232,7 +233,7 @@ def calculate_discretization(
|
|
|
232
233
|
return A_bar, B_bar, C_bar, x_prop, Vmulti
|
|
233
234
|
|
|
234
235
|
|
|
235
|
-
def get_discretization_solver(dyn: Dynamics, settings: Config):
|
|
236
|
+
def get_discretization_solver(dyn: Dynamics, settings: Config) -> callable:
|
|
236
237
|
"""Create a discretization solver function.
|
|
237
238
|
|
|
238
239
|
This function creates a solver that computes the discretized system matrices
|
|
@@ -240,7 +241,7 @@ def get_discretization_solver(dyn: Dynamics, settings: Config):
|
|
|
240
241
|
|
|
241
242
|
Args:
|
|
242
243
|
dyn (Dynamics): System dynamics object.
|
|
243
|
-
settings: Configuration settings for discretization.
|
|
244
|
+
settings (Config): Configuration settings for discretization.
|
|
244
245
|
|
|
245
246
|
Returns:
|
|
246
247
|
callable: A function that computes the discretized system matrices.
|
|
@@ -63,7 +63,7 @@ def rk45_step(
|
|
|
63
63
|
t: jnp.ndarray,
|
|
64
64
|
y: jnp.ndarray,
|
|
65
65
|
h: float,
|
|
66
|
-
*args
|
|
66
|
+
*args: Any
|
|
67
67
|
) -> jnp.ndarray:
|
|
68
68
|
"""
|
|
69
69
|
Perform a single RK45 (Runge-Kutta-Fehlberg) integration step.
|
|
@@ -96,11 +96,11 @@ def solve_ivp_rk45(
|
|
|
96
96
|
f: Callable[[jnp.ndarray, jnp.ndarray, Any], jnp.ndarray],
|
|
97
97
|
tau_final: float,
|
|
98
98
|
y_0: jnp.ndarray,
|
|
99
|
-
args,
|
|
99
|
+
args: tuple,
|
|
100
100
|
tau_0: float = 0.0,
|
|
101
101
|
num_substeps: int = 50,
|
|
102
102
|
is_not_compiled: bool = False,
|
|
103
|
-
):
|
|
103
|
+
) -> jnp.ndarray:
|
|
104
104
|
"""
|
|
105
105
|
Solve an initial-value ODE problem using fixed-step RK45 integration.
|
|
106
106
|
|
|
@@ -145,14 +145,14 @@ def solve_ivp_diffrax(
|
|
|
145
145
|
f: Callable[[jnp.ndarray, jnp.ndarray, Any], jnp.ndarray],
|
|
146
146
|
tau_final: float,
|
|
147
147
|
y_0: jnp.ndarray,
|
|
148
|
-
args,
|
|
148
|
+
args: tuple,
|
|
149
149
|
tau_0: float = 0.0,
|
|
150
150
|
num_substeps: int = 50,
|
|
151
151
|
solver_name: str = "Dopri8",
|
|
152
152
|
rtol: float = 1e-3,
|
|
153
153
|
atol: float = 1e-6,
|
|
154
|
-
extra_kwargs=None,
|
|
155
|
-
):
|
|
154
|
+
extra_kwargs: dict = None,
|
|
155
|
+
) -> jnp.ndarray:
|
|
156
156
|
"""
|
|
157
157
|
Solve an initial-value ODE problem using a Diffrax adaptive solver.
|
|
158
158
|
|
|
@@ -207,16 +207,16 @@ def solve_ivp_diffrax_prop(
|
|
|
207
207
|
f: Callable[[jnp.ndarray, jnp.ndarray, Any], jnp.ndarray],
|
|
208
208
|
tau_final: float,
|
|
209
209
|
y_0: jnp.ndarray,
|
|
210
|
-
args,
|
|
210
|
+
args: tuple,
|
|
211
211
|
tau_0: float = 0.0,
|
|
212
212
|
num_substeps: int = 50,
|
|
213
213
|
solver_name: str = "Dopri8",
|
|
214
214
|
rtol: float = 1e-3,
|
|
215
215
|
atol: float = 1e-6,
|
|
216
|
-
extra_kwargs=None,
|
|
216
|
+
extra_kwargs: dict = None,
|
|
217
217
|
save_time: jnp.ndarray = None,
|
|
218
218
|
mask: jnp.ndarray = None,
|
|
219
|
-
):
|
|
219
|
+
) -> jnp.ndarray:
|
|
220
220
|
"""
|
|
221
221
|
Solve an initial-value ODE problem using a Diffrax adaptive solver.
|
|
222
222
|
This function is specifically designed for use in the context of
|
|
@@ -161,7 +161,7 @@ class UnifiedState:
|
|
|
161
161
|
initial=0.0,
|
|
162
162
|
final=0.0,
|
|
163
163
|
augmented=False,
|
|
164
|
-
):
|
|
164
|
+
) -> None:
|
|
165
165
|
"""Append another state or create a new state variable.
|
|
166
166
|
|
|
167
167
|
This method allows dynamic extension of the unified state, either by appending
|
|
@@ -536,7 +536,7 @@ class UnifiedControl:
|
|
|
536
536
|
max=np.inf,
|
|
537
537
|
guess=0.0,
|
|
538
538
|
augmented=False,
|
|
539
|
-
):
|
|
539
|
+
) -> None:
|
|
540
540
|
"""Append another control or create a new control variable.
|
|
541
541
|
|
|
542
542
|
This method allows dynamic extension of the unified control, either by appending
|
|
@@ -473,7 +473,7 @@ def plot_projections_2d(
|
|
|
473
473
|
var_name: str = "position",
|
|
474
474
|
velocity_var_name: str | None = None,
|
|
475
475
|
cmap: str = "viridis",
|
|
476
|
-
):
|
|
476
|
+
) -> go.Figure:
|
|
477
477
|
"""Plot XY, XZ, YZ projections of a 3D variable.
|
|
478
478
|
|
|
479
479
|
Useful for visualizing 3D trajectories in 2D plane views.
|
|
@@ -628,7 +628,7 @@ def plot_vector_norm(
|
|
|
628
628
|
result: OptimizationResults,
|
|
629
629
|
var_name: str,
|
|
630
630
|
bounds: tuple[float, float] | None = None,
|
|
631
|
-
):
|
|
631
|
+
) -> go.Figure:
|
|
632
632
|
"""Plot the 2-norm of a vector variable over time.
|
|
633
633
|
|
|
634
634
|
Useful for visualizing thrust magnitude, velocity magnitude, etc.
|
|
@@ -13,7 +13,7 @@ def plot_scp_iterations(
|
|
|
13
13
|
control_names: list[str] | None = None,
|
|
14
14
|
cmap_name: str = "viridis",
|
|
15
15
|
show_propagation: bool = True,
|
|
16
|
-
):
|
|
16
|
+
) -> go.Figure:
|
|
17
17
|
"""Plot all SCP iterations overlaid with colormap-based coloring.
|
|
18
18
|
|
|
19
19
|
Shows the evolution of states and controls across SCP iterations. Early
|
|
@@ -79,10 +79,10 @@ class Problem:
|
|
|
79
79
|
dynamics_prop: Optional[dict] = None,
|
|
80
80
|
states_prop: Optional[List[State]] = None,
|
|
81
81
|
algebraic_prop: Optional[dict] = None,
|
|
82
|
-
licq_min=0.0,
|
|
83
|
-
licq_max=1e-4,
|
|
84
|
-
time_dilation_factor_min=0.3,
|
|
85
|
-
time_dilation_factor_max=3.0,
|
|
82
|
+
licq_min: float = 0.0,
|
|
83
|
+
licq_max: float = 1e-4,
|
|
84
|
+
time_dilation_factor_min: float = 0.3,
|
|
85
|
+
time_dilation_factor_max: float = 3.0,
|
|
86
86
|
byof: Optional[ByofSpec] = None,
|
|
87
87
|
):
|
|
88
88
|
"""The primary class in charge of compiling and exporting the solvers.
|
|
@@ -108,15 +108,15 @@ class Problem:
|
|
|
108
108
|
Only specify additional states beyond optimization states. Used with dynamics_prop.
|
|
109
109
|
algebraic_prop (dict, optional): Dictionary mapping names to symbolic expressions
|
|
110
110
|
for outputs evaluated (not integrated) during propagation.
|
|
111
|
-
licq_min: Minimum LICQ constraint value
|
|
112
|
-
licq_max: Maximum LICQ constraint value
|
|
113
|
-
time_dilation_factor_min: Minimum time dilation factor
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
111
|
+
licq_min (float): Minimum LICQ constraint value. Defaults to 0.0.
|
|
112
|
+
licq_max (float): Maximum LICQ constraint value. Defaults to 1e-4.
|
|
113
|
+
time_dilation_factor_min (float): Minimum time dilation factor.
|
|
114
|
+
Defaults to 0.3.
|
|
115
|
+
time_dilation_factor_max (float): Maximum time dilation factor.
|
|
116
|
+
Defaults to 3.0.
|
|
117
|
+
byof (ByofSpec, optional): Expert mode only. Raw JAX functions to
|
|
118
|
+
bypass symbolic layer. See :class:`openscvx.expert.ByofSpec` for
|
|
119
|
+
detailed documentation.
|
|
120
120
|
|
|
121
121
|
Note:
|
|
122
122
|
There are two approaches for handling time:
|
|
@@ -236,7 +236,7 @@ class Problem:
|
|
|
236
236
|
self._algorithm = PenalizedTrustRegion()
|
|
237
237
|
|
|
238
238
|
@property
|
|
239
|
-
def parameters(self):
|
|
239
|
+
def parameters(self) -> ParameterDict:
|
|
240
240
|
"""Get the parameters dictionary.
|
|
241
241
|
|
|
242
242
|
The returned dictionary automatically syncs to CVXPy when modified:
|
|
@@ -244,7 +244,7 @@ class Problem:
|
|
|
244
244
|
problem.parameters.update({"gate_0_center": center}) # Also syncs
|
|
245
245
|
|
|
246
246
|
Returns:
|
|
247
|
-
ParameterDict: Special dict that syncs to CVXPy on assignment
|
|
247
|
+
ParameterDict: Special dict that syncs to CVXPy on assignment.
|
|
248
248
|
"""
|
|
249
249
|
return self._parameter_wrapper
|
|
250
250
|
|
|
@@ -314,11 +314,13 @@ class Problem:
|
|
|
314
314
|
index into the unified x and u vectors.
|
|
315
315
|
|
|
316
316
|
Returns:
|
|
317
|
-
|
|
317
|
+
Dictionary mapping variable names to slice objects.
|
|
318
318
|
State variables map to slices in the x vector.
|
|
319
319
|
Control variables map to slices in the u vector.
|
|
320
320
|
|
|
321
321
|
Example:
|
|
322
|
+
Usage with byof::
|
|
323
|
+
|
|
322
324
|
problem = ox.Problem(dynamics, states, controls, ...)
|
|
323
325
|
print(problem.slices)
|
|
324
326
|
# {'position': slice(0, 3), 'velocity': slice(3, 6), 'theta': slice(0, 1)}
|
|
@@ -16,7 +16,7 @@ def prop_aug_dy(
|
|
|
16
16
|
state_dot: callable,
|
|
17
17
|
dis_type: str,
|
|
18
18
|
N: int,
|
|
19
|
-
params,
|
|
19
|
+
params: dict,
|
|
20
20
|
) -> np.ndarray:
|
|
21
21
|
"""Compute the augmented dynamics for propagation.
|
|
22
22
|
|
|
@@ -50,16 +50,15 @@ def prop_aug_dy(
|
|
|
50
50
|
return u[:, idx_s] * state_dot(x, u[:, :-1], node, params).squeeze()
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
def get_propagation_solver(state_dot: Dynamics, settings: Config):
|
|
53
|
+
def get_propagation_solver(state_dot: Dynamics, settings: Config) -> callable:
|
|
54
54
|
"""Create a propagation solver function.
|
|
55
55
|
|
|
56
56
|
This function creates a solver that propagates the system state using the
|
|
57
57
|
specified dynamics and settings.
|
|
58
58
|
|
|
59
59
|
Args:
|
|
60
|
-
state_dot
|
|
60
|
+
state_dot: Dynamics object containing state derivative function.
|
|
61
61
|
settings: Configuration settings for propagation.
|
|
62
|
-
param_map (dict): Mapping of parameter names to values.
|
|
63
62
|
|
|
64
63
|
Returns:
|
|
65
64
|
callable: A function that solves the propagation problem.
|
|
@@ -97,7 +96,7 @@ def get_propagation_solver(state_dot: Dynamics, settings: Config):
|
|
|
97
96
|
return propagation_solver
|
|
98
97
|
|
|
99
98
|
|
|
100
|
-
def s_to_t(x: np.ndarray, u: np.ndarray, settings: Config):
|
|
99
|
+
def s_to_t(x: np.ndarray, u: np.ndarray, settings: Config) -> list[float]:
|
|
101
100
|
"""Convert normalized time s to real time t.
|
|
102
101
|
|
|
103
102
|
This function converts the normalized time variable s to real time t
|
|
@@ -109,7 +108,7 @@ def s_to_t(x: np.ndarray, u: np.ndarray, settings: Config):
|
|
|
109
108
|
settings (Config): Configuration settings.
|
|
110
109
|
|
|
111
110
|
Returns:
|
|
112
|
-
list: List of real time points.
|
|
111
|
+
list[float]: List of real time points.
|
|
113
112
|
"""
|
|
114
113
|
t = [x[:, settings.sim.time_slice][0]]
|
|
115
114
|
tau = np.linspace(0, 1, settings.scp.n)
|
|
@@ -123,7 +122,9 @@ def s_to_t(x: np.ndarray, u: np.ndarray, settings: Config):
|
|
|
123
122
|
return t
|
|
124
123
|
|
|
125
124
|
|
|
126
|
-
def t_to_tau(
|
|
125
|
+
def t_to_tau(
|
|
126
|
+
u: np.ndarray, t: np.ndarray, t_nodal: np.ndarray, settings: Config
|
|
127
|
+
) -> tuple[np.ndarray, np.ndarray]:
|
|
127
128
|
"""Convert real time t to normalized time tau.
|
|
128
129
|
|
|
129
130
|
This function converts real time t to normalized time tau and interpolates
|
|
@@ -136,7 +137,8 @@ def t_to_tau(u: np.ndarray, t, t_nodal, settings: Config):
|
|
|
136
137
|
settings (Config): Configuration settings.
|
|
137
138
|
|
|
138
139
|
Returns:
|
|
139
|
-
tuple: (tau, u_interp) where tau is normalized time and u_interp is
|
|
140
|
+
tuple[np.ndarray, np.ndarray]: (tau, u_interp) where tau is normalized time and u_interp is
|
|
141
|
+
interpolated controls.
|
|
140
142
|
"""
|
|
141
143
|
if settings.dis.dis_type == "ZOH":
|
|
142
144
|
# Zero-Order Hold: step interpolation (hold previous value)
|
|
@@ -170,7 +172,15 @@ def t_to_tau(u: np.ndarray, t, t_nodal, settings: Config):
|
|
|
170
172
|
return tau, u_interp
|
|
171
173
|
|
|
172
174
|
|
|
173
|
-
def simulate_nonlinear_time(
|
|
175
|
+
def simulate_nonlinear_time(
|
|
176
|
+
params: dict,
|
|
177
|
+
x: np.ndarray,
|
|
178
|
+
u: np.ndarray,
|
|
179
|
+
tau_vals: np.ndarray,
|
|
180
|
+
t: np.ndarray,
|
|
181
|
+
settings: Config,
|
|
182
|
+
propagation_solver: callable,
|
|
183
|
+
) -> np.ndarray:
|
|
174
184
|
"""Simulate the nonlinear system dynamics over time.
|
|
175
185
|
|
|
176
186
|
This function simulates the system dynamics using the optimal control sequence
|
|
@@ -30,7 +30,7 @@ must follow for use within successive convexification algorithms.
|
|
|
30
30
|
"""
|
|
31
31
|
|
|
32
32
|
from abc import ABC, abstractmethod
|
|
33
|
-
from typing import TYPE_CHECKING, List
|
|
33
|
+
from typing import TYPE_CHECKING, Any, List
|
|
34
34
|
|
|
35
35
|
if TYPE_CHECKING:
|
|
36
36
|
from openscvx.config import Config
|
|
@@ -197,7 +197,7 @@ class ConvexSolver(ABC):
|
|
|
197
197
|
...
|
|
198
198
|
|
|
199
199
|
@abstractmethod
|
|
200
|
-
def solve(self):
|
|
200
|
+
def solve(self) -> Any:
|
|
201
201
|
"""Solve the convex subproblem and return results.
|
|
202
202
|
|
|
203
203
|
Called at each SCP iteration after updating linearization and penalties.
|
|
@@ -32,7 +32,7 @@ Example:
|
|
|
32
32
|
b = A @ x # Creates MatMul(A, x)
|
|
33
33
|
"""
|
|
34
34
|
|
|
35
|
-
from typing import Tuple
|
|
35
|
+
from typing import Tuple, Union
|
|
36
36
|
|
|
37
37
|
import numpy as np
|
|
38
38
|
|
|
@@ -56,7 +56,7 @@ class Add(Expr):
|
|
|
56
56
|
z = x + y + 5 # Creates Add(x, y, Constant(5))
|
|
57
57
|
"""
|
|
58
58
|
|
|
59
|
-
def __init__(self, *args):
|
|
59
|
+
def __init__(self, *args: Union[Expr, float, int, np.ndarray]):
|
|
60
60
|
"""Initialize an addition operation.
|
|
61
61
|
|
|
62
62
|
Args:
|
|
@@ -117,7 +117,7 @@ class Add(Expr):
|
|
|
117
117
|
except ValueError as e:
|
|
118
118
|
raise ValueError(f"Add shapes not broadcastable: {shapes}") from e
|
|
119
119
|
|
|
120
|
-
def __repr__(self):
|
|
120
|
+
def __repr__(self) -> str:
|
|
121
121
|
inner = " + ".join(repr(e) for e in self.terms)
|
|
122
122
|
return f"({inner})"
|
|
123
123
|
|
|
@@ -140,7 +140,11 @@ class Sub(Expr):
|
|
|
140
140
|
z = x - y # Creates Sub(x, y)
|
|
141
141
|
"""
|
|
142
142
|
|
|
143
|
-
def __init__(
|
|
143
|
+
def __init__(
|
|
144
|
+
self,
|
|
145
|
+
left: Union[Expr, float, int, np.ndarray],
|
|
146
|
+
right: Union[Expr, float, int, np.ndarray],
|
|
147
|
+
):
|
|
144
148
|
"""Initialize a subtraction operation.
|
|
145
149
|
|
|
146
150
|
Args:
|
|
@@ -180,7 +184,7 @@ class Sub(Expr):
|
|
|
180
184
|
except ValueError as e:
|
|
181
185
|
raise ValueError(f"Sub shapes not broadcastable: {shapes}") from e
|
|
182
186
|
|
|
183
|
-
def __repr__(self):
|
|
187
|
+
def __repr__(self) -> str:
|
|
184
188
|
return f"({self.left!r} - {self.right!r})"
|
|
185
189
|
|
|
186
190
|
|
|
@@ -202,7 +206,7 @@ class Mul(Expr):
|
|
|
202
206
|
z = x * y * 2 # Creates Mul(x, y, Constant(2))
|
|
203
207
|
"""
|
|
204
208
|
|
|
205
|
-
def __init__(self, *args):
|
|
209
|
+
def __init__(self, *args: Union[Expr, float, int, np.ndarray]):
|
|
206
210
|
"""Initialize an element-wise multiplication operation.
|
|
207
211
|
|
|
208
212
|
Args:
|
|
@@ -275,7 +279,7 @@ class Mul(Expr):
|
|
|
275
279
|
except ValueError as e:
|
|
276
280
|
raise ValueError(f"Mul shapes not broadcastable: {shapes}") from e
|
|
277
281
|
|
|
278
|
-
def __repr__(self):
|
|
282
|
+
def __repr__(self) -> str:
|
|
279
283
|
inner = " * ".join(repr(e) for e in self.factors)
|
|
280
284
|
return f"({inner})"
|
|
281
285
|
|
|
@@ -298,7 +302,11 @@ class Div(Expr):
|
|
|
298
302
|
z = x / y # Creates Div(x, y)
|
|
299
303
|
"""
|
|
300
304
|
|
|
301
|
-
def __init__(
|
|
305
|
+
def __init__(
|
|
306
|
+
self,
|
|
307
|
+
left: Union[Expr, float, int, np.ndarray],
|
|
308
|
+
right: Union[Expr, float, int, np.ndarray],
|
|
309
|
+
):
|
|
302
310
|
"""Initialize a division operation.
|
|
303
311
|
|
|
304
312
|
Args:
|
|
@@ -338,7 +346,7 @@ class Div(Expr):
|
|
|
338
346
|
except ValueError as e:
|
|
339
347
|
raise ValueError(f"Div shapes not broadcastable: {shapes}") from e
|
|
340
348
|
|
|
341
|
-
def __repr__(self):
|
|
349
|
+
def __repr__(self) -> str:
|
|
342
350
|
return f"({self.left!r} / {self.right!r})"
|
|
343
351
|
|
|
344
352
|
|
|
@@ -364,7 +372,11 @@ class MatMul(Expr):
|
|
|
364
372
|
y = A @ x # Creates MatMul(A, x), result shape (3,)
|
|
365
373
|
"""
|
|
366
374
|
|
|
367
|
-
def __init__(
|
|
375
|
+
def __init__(
|
|
376
|
+
self,
|
|
377
|
+
left: Union[Expr, float, int, np.ndarray],
|
|
378
|
+
right: Union[Expr, float, int, np.ndarray],
|
|
379
|
+
):
|
|
368
380
|
"""Initialize a matrix multiplication operation.
|
|
369
381
|
|
|
370
382
|
Args:
|
|
@@ -416,7 +428,7 @@ class MatMul(Expr):
|
|
|
416
428
|
raise ValueError(f"MatMul incompatible: {L} @ {R}")
|
|
417
429
|
return L[:-1] + (R[-1],)
|
|
418
430
|
|
|
419
|
-
def __repr__(self):
|
|
431
|
+
def __repr__(self) -> str:
|
|
420
432
|
return f"({self.left!r} * {self.right!r})"
|
|
421
433
|
|
|
422
434
|
|
|
@@ -436,7 +448,7 @@ class Neg(Expr):
|
|
|
436
448
|
y = -x # Creates Neg(x)
|
|
437
449
|
"""
|
|
438
450
|
|
|
439
|
-
def __init__(self, operand):
|
|
451
|
+
def __init__(self, operand: Union[Expr, float, int, np.ndarray]):
|
|
440
452
|
"""Initialize a negation operation.
|
|
441
453
|
|
|
442
454
|
Args:
|
|
@@ -462,7 +474,7 @@ class Neg(Expr):
|
|
|
462
474
|
"""Negation preserves the shape of its operand."""
|
|
463
475
|
return self.operand.check_shape()
|
|
464
476
|
|
|
465
|
-
def __repr__(self):
|
|
477
|
+
def __repr__(self) -> str:
|
|
466
478
|
return f"(-{self.operand!r})"
|
|
467
479
|
|
|
468
480
|
|
|
@@ -483,7 +495,11 @@ class Power(Expr):
|
|
|
483
495
|
y = x ** 2 # Creates Power(x, Constant(2))
|
|
484
496
|
"""
|
|
485
497
|
|
|
486
|
-
def __init__(
|
|
498
|
+
def __init__(
|
|
499
|
+
self,
|
|
500
|
+
base: Union[Expr, float, int, np.ndarray],
|
|
501
|
+
exponent: Union[Expr, float, int, np.ndarray],
|
|
502
|
+
):
|
|
487
503
|
"""Initialize a power operation.
|
|
488
504
|
|
|
489
505
|
Args:
|
|
@@ -513,5 +529,5 @@ class Power(Expr):
|
|
|
513
529
|
except ValueError as e:
|
|
514
530
|
raise ValueError(f"Power shapes not broadcastable: {shapes}") from e
|
|
515
531
|
|
|
516
|
-
def __repr__(self):
|
|
532
|
+
def __repr__(self) -> str:
|
|
517
533
|
return f"({self.base!r})**({self.exponent!r})"
|