Skip to main content

Python package for index tracking in CasADi

Project description

vdx

vdx is the python implementation of the matlab vdx package. It is built on top of the modeling and automatic differentiation tool CasADi. It is used to keep track of indexed variables e.g. x_i∈ Rⁿ for i in 1,...N, as subsets of bigger vectors. This is particularly useful for writing direct transcription optimal control problems such as those found in nosnoc_py.

Installing

As this software is still in development to install the package, clone this repo and use

pip install <path to vdx>

Use

The basic interface for vdx is the NLP object which contains 1 scalar objective f and 3 vectors w (the primal decision variables, g the constraints, and p problem parameters.

To start do:

import casadi as ca
from vdx import NLP, Primal, Parameter, Constraint
nlp = NLP(symbolic_type=ca.SX)

nlp.w.x[range(1,11), range(1,3), range(1,3)] = Primal("x", 4, lb=0.0) # Creates x_i_j_k with i=1,...10, j=1,2, k=1,2

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vdx-0.0.2.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vdx-0.0.2-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2Python 3

File details

Details for the file vdx-0.0.2.tar.gz.

File metadata

  • Download URL: vdx-0.0.2.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vdx-0.0.2.tar.gz
Algorithm Hash digest
SHA256 df860b06294d88cf3b884ec7b7633e8471dc62f254ba55bff0bc1e6d264d30dc
MD5 aad145529966e6af433d01e9de88769b
BLAKE2b-256 c41a2b00265d1d121bc6c0b8ee01ccd813727a99099ed54f1efd09ac53619121

See more details on using hashes here.

Provenance

The following attestation bundles were made for vdx-0.0.2.tar.gz:

Publisher: publish.yml on apozharski/vdx_py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file vdx-0.0.2-py2.py3-none-any.whl.

File metadata

  • Download URL: vdx-0.0.2-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for vdx-0.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 56c5fa3b3240bfb5c482ea795b9e2b1b713013e7d98c85beb8da494eb7decd40
MD5 c86c69b1b50c0c059fcc3cb33dec0959
BLAKE2b-256 545b631801d46c1382707fec132d151bf16019dc9e485291382a1decd6fae864

See more details on using hashes here.

Provenance

The following attestation bundles were made for vdx-0.0.2-py2.py3-none-any.whl:

Publisher: publish.yml on apozharski/vdx_py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page