Python System Model Simulation Library
Project description
Python System Modeling and Simulation Library (SyMoSi)
SyMoSi is a python library for block model simulation of dynamic systems. It allows to define and combine dynamic blocks with either code or system equations to create complex systems.
Requirements
- SciPy
- NumPy
Install
pip install symosi
or download from github and
cd symosi
python setup.py install
Usage
Simple example
#plotting
from matplotlib import pyplot as plt
# import library
import symosi
# initialize components and sources
step = symosi.sources.Step(0.1)
constant = symosi.sources.Constant(1)
add = symosi.components.Add()
# initialize simulation
system = symosi.DynamicSystem("FixedStep", dynamic_components)
# connect the components
system.connect((step, "out"), (add, 0)) # connect output "out" of step to input 0 of add
system.connect((constant, "out"), (add, 1)) # connect output "out" of constant to input 1 of add
# simulate
system.run(0.2)
# get output of adder
output = system.getOutputs(add)["out"]
# plot
plt.plot(output.t, output.values)
plt.show()
More examples
Additional examples can be found in the Examples folder.
Contributing
Fork the github repository and open a pull request. There are multiple ways you can conbribute:
- Create standard library components/blocks
- Contribute to the core code
- Write examples
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
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 symosi-1.0.tar.gz.
File metadata
- Download URL: symosi-1.0.tar.gz
- Upload date:
- Size: 4.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04dcb48bf45dd6b1a8567cf95563322847d8b55d0a04746716878fafb57dbfe4
|
|
| MD5 |
a3b7f039810f412b22660d7e0e8e2e93
|
|
| BLAKE2b-256 |
8dff3d8fbf9948bd2fbf04696e66b2ef50f28a1b2341a64457c91fc71273a8aa
|
File details
Details for the file symosi-1.0-py3-none-any.whl.
File metadata
- Download URL: symosi-1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0e1029dec25d5ba0204c1a60c52d1e7c3bd9aa7bcbb6d6a135d38ec9d7ac7500
|
|
| MD5 |
d53da283dcfb0248069d4b771299cb14
|
|
| BLAKE2b-256 |
bfb3e403e1e5d15f79108cf07baf196ac084fad2f7dd4693f8a68eca0f292419
|