Skip to main content

Lyapunov stability analysis for agent systems — convergence, divergence, basin estimation

Project description

lyapunov-stability

Lyapunov stability analysis for agent systems. Is your fleet converging, diverging, or oscillating?

Uses real mathematics — numerical differentiation, Hessian analysis, positive definiteness checking, and basin of attraction estimation. Zero dependencies (no numpy).

Usage

from lyapunov_stability import LyapunovAnalyzer

analyzer = LyapunovAnalyzer()

# Analyze V = x^2 + y^2 (stable paraboloid)
result = analyzer.analyze(
    V=lambda x, y: x**2 + y**2,
    dVdx=lambda x, y: 2*x,
    dVdy=lambda x, y: 2*y,
    equilibrium=(0.0, 0.0),
)

print(result.stability)           # STABLE
print(result.is_positive_definite) # True
print(result.basin_radius)        # 4.99+ (large basin)

Supports 2D systems. Analytical or numerical gradients. Central difference approximation.

pip install lyapunov-stability

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

lyapunov_stability-0.1.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

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

lyapunov_stability-0.1.0-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file lyapunov_stability-0.1.0.tar.gz.

File metadata

  • Download URL: lyapunov_stability-0.1.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for lyapunov_stability-0.1.0.tar.gz
Algorithm Hash digest
SHA256 84ceebfc309b393e140e0b2ef8010df021ff8e1d73bba4b0c91d1c8cb4daea43
MD5 46c6d40800725a531aba7d5906d16772
BLAKE2b-256 5f40bd98f90e0c658e052105bf8fe1aeed88fa161860c12c6c8328d4020b1e04

See more details on using hashes here.

File details

Details for the file lyapunov_stability-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for lyapunov_stability-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67eb6650c0a6a492a5ba66de8550a33d836e42fb444e53eeaad3392334a785e3
MD5 842bfdffd106be0aeecf66cdef2c02a7
BLAKE2b-256 b007c5c4d77b121d46348b9feffb73f9e008eecaceab5b5c7c45dc85f78a6531

See more details on using hashes here.

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