Symbolic math bridge for the GDS ecosystem — SymPy to ODE compilation
Project description
gds-symbolic
Symbolic math bridge for the GDS ecosystem — compiles SymPy expressions
into plain Python callables for use with gds-continuous.
Installation
uv add gds-symbolic[sympy]
Quick Start
from gds_control.dsl.elements import State, Input, Sensor, Controller
from gds_symbolic import SymbolicControlModel, StateEquation
model = SymbolicControlModel(
name="damped_oscillator",
states=[State(name="x"), State(name="v")],
inputs=[Input(name="force")],
sensors=[Sensor(name="position", observes=["x"])],
controllers=[Controller(name="actuator", reads=["position", "force"], drives=["x", "v"])],
state_equations=[
StateEquation(state_name="x", expr_str="v"),
StateEquation(state_name="v", expr_str="-k*x - c*v + force"),
],
symbolic_params=["k", "c"],
)
# Compile to plain callable (no SymPy at runtime)
ode_fn, state_order = model.to_ode_function()
# Linearize at origin
lin = model.linearize(x0=[0.0, 0.0], u0=[0.0])
print(lin.A) # [[0, 1], [-k, -c]] evaluated at operating point
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
gds_symbolic-0.1.0.tar.gz
(12.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gds_symbolic-0.1.0.tar.gz.
File metadata
- Download URL: gds_symbolic-0.1.0.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e2fb036aa8bdee414967498708d4ad00b941fde669dc253c87808845f908274a
|
|
| MD5 |
2e567a005de7843ccb53b7b6c145c24c
|
|
| BLAKE2b-256 |
9123d57c14ab69724c36b34374fb42857cdf8c11bb118a6638c0af8a089b5f5b
|
File details
Details for the file gds_symbolic-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gds_symbolic-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.2 {"installer":{"name":"uv","version":"0.11.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
812c413db44e75968c8de17942ab4e11d403efa52be9ecccb72ae0fc653bfb40
|
|
| MD5 |
8906473ebedd4b8d6a12f3250cf7cef8
|
|
| BLAKE2b-256 |
9fcb15c3af7a2ea0d6138c1f3ca5a1a93b09f9168186e0c626c51a172d3ffe51
|