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.1.tar.gz (10.6 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.1-py2.py3-none-any.whl (10.2 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vdx-0.0.1.tar.gz
  • Upload date:
  • Size: 10.6 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.1.tar.gz
Algorithm Hash digest
SHA256 8898dd0acb2654b9498518eb67812d36bcf759a8e5a4b405d53f53268e12ac83
MD5 5e0241290d90a677392eca6944ff51b2
BLAKE2b-256 337b31991e4e23396b37681130eb0d58b10f7bc612e198192b3b05c97c7daeb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for vdx-0.0.1.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.1-py2.py3-none-any.whl.

File metadata

  • Download URL: vdx-0.0.1-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.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 8b71b10d4c53a72ed98c614ddc3663f99d23a8e2a931abf88df7a220a20c2e01
MD5 477f5fe121695f59e9670f923eff858c
BLAKE2b-256 1029d4019dfaaad34ea9007257afc734bba96430b223c4eaa17c99b557363cb1

See more details on using hashes here.

Provenance

The following attestation bundles were made for vdx-0.0.1-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