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.3.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.3-py2.py3-none-any.whl (10.3 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

  • Download URL: vdx-0.0.3.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.3.tar.gz
Algorithm Hash digest
SHA256 354562d683c3175047697e198d6eccf6349d9b8d8d4a090c8b8f1905b2ac66b1
MD5 fe811aaefa8aa3db97dcbfee2e5a0797
BLAKE2b-256 2a4e3740314d68113a0529edc8334027dadfffcaa6804e1d4d2154a5f2ac0da7

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: vdx-0.0.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 10.3 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.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bce3220ea41c13fa997e62664337aac0be1d9dde38f419ae4a79795524185134
MD5 896c3c496cd9a2c2a3ef2f08b98f224a
BLAKE2b-256 173901314f9f8fd15748d7d7b7770f5ca6c5aeffb89bbc272e2fbb6b02d231f7

See more details on using hashes here.

Provenance

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