Skip to main content

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

Symbolic expressions

Symbolic compilation and analysis accept a restricted mathematical grammar: declared variables, numeric literals, arithmetic, and approved math functions. Unsupported syntax raises SymbolicError when an expression is consumed. See the expression grammar and security limits for supported functions, symbol naming rules, and resource limits. Parsing limits do not bound all subsequent symbolic computations.

Metadata

Release files for gds-symbolic 0.99.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gds-symbolic 0.99.1
File Size Uploaded
gds_symbolic-0.99.1.tar.gz 8.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gds-symbolic 0.99.1
File Interpreter ABI Platform
gds_symbolic-0.99.1-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / gds_symbolic-0.99.1.tar.gz

Download URL gds_symbolic-0.99.1.tar.gz
Size 8.3 kB
Tags Source
SHA-256 checksum
How to use checksums
90c349c92026dd38b56a0cb4cbdb05f1833cc83f962a4abb35d1941f485d2293
BLAKE2b-256 checksum
How to use checksums
fb4906efb0b60cea5c7fc57dc1004a006229af50866c48d004b426de1ecc06f4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Release files / gds_symbolic-0.99.1-py3-none-any.whl

Download URL gds_symbolic-0.99.1-py3-none-any.whl
Size 2.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8985ce04eeb27b7d85ea73e86e2ffef6c7578ab61f8f1b0982674b1361d1e3b0
BLAKE2b-256 checksum
How to use checksums
efbd60fe6587fef23b6544b2627655b6b7c0eadfe1444390fcc96568f31b8bf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.12.23 {"installer":{"name":"uv","version":"0.12.23","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}

Release history Release notifications | RSS feed

This release

0.99.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page