Skip to main content

Scipy Simulator

Scipy Simulator provides a concurrent way of modelling and simulating heterogeneous systems in Python using scipy. You might find it most useful for tasks involving embedded systems or signal processing.

Scipysim models are created in pure Python code, by instantiating various actors representing different components of a systems, and connecting the actors to each other through channels. Here’s a simple example of what a model looks like:

#!/usr/bin/env python

from scipysim.actors.signal import Ramp
from scipysim.actors.display import Plotter
from scipysim.actors import Channel, Model

class RampPlot( Model ):
    def __init__( self ):
            super( RampPlot, self ).__init__()
            connection = Channel()
            src = Ramp( connection )
            dst = Plotter( connection )
        self.components = [src, dst]

RampPlot().run()

You can find a number of other examples of models in the ‘models’ directory.

The scipysim project is inspired by the UC Berkeley Ptolemy project, but we are taking a slightly different approach to implementing the simulation engine. Our approach is based on implementing the simulator as a Kahn network of actors that communicate via tagged-signals. Each of these actors run in their own thread, and communicate via dedicated Channels - which are based on the thread safe FIFO queue implementation in the Python standard library. These base level actors can be composed together to create models, which are also actors in their own right - running in their own thread with all communication occurring through input and output channels.

Scipysim is still very much under active development, and contains a number of experimental or prototype components. The structure of the simulator is in a state of flux, so there are no guarantees that models developed to work with a particular release will still work with the next release.

Testing Scipy Simulator

Scipy Simulator comes with a large collection of unit tests. All the tests can be run as a suite using nosetests:

nosetests

A helper script called test_scipysim.py has been placed in the scipysim module to launch nosetests:

./scipysim/test_scipysim.py

If you downloaded from the repository the tests can be run with setuptools:

python setup.py test

The tests can also be found in the module hierarchy and run individually:

python ./scipysim/actors/io/test_io.py

Installing Scipy Simulator

You can install scipysim to your main site-packages folder with:

sudo python setup.py install

on Linux or Mac OS X; and:

python setup.py install

on Windows. To install in a more sandboxed “development” environment substitute develop for install, e.g.:

sudo python setup.py develop

This installs an egg at the current directory and links to the package in your site-packages folder.

Creating Binary Installers

Firstly to clean the obsolete .pyc or .pyo files use:

python setup.py clean --all

Generate a built distribution like so:

python setup.py bdist

On Windows, to make a nice pretty GUI installer:

python setup.py bdist --format wininst

Similarly a source distribution can be created with:

python setup.py sdist

Contributors

This project was initiated in the Department of Electrical & Computer Engineering at the University of Canterbury (http://www.elec.canterbury.ac.nz/) by:

  • Brian Thorne (brian dot thorne at canterbury dot ac dot nz)

  • Allan McInnes (allan dot mcinnes at canterbury dot ac dot nz)

Project Site

The main development occurs on Google Code at http://scipy-sim.googlecode.com

Contribute to scipysim

First get the source code with mercurial:

hg clone https://scipy-sim.googlecode.com/hg/ scipy-sim

And send us a patch by creating a new issue http://code.google.com/p/scipy-sim/issues/entry

Metadata

Release files for ScipySim 0.1.5

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

Source distribution (sdist)

Source distribution for ScipySim 0.1.5
File Size Uploaded Provenance
ScipySim-0.1.5.tar.gz 56.0 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ScipySim 0.1.5
File Interpreter ABI Platform
ScipySim-0.1.5-py2.6.egg Legacy Egg format - - Details

Total release size: 264.3 kB

Release files / ScipySim-0.1.5.tar.gz

Download URL ScipySim-0.1.5.tar.gz
Size 56.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0ad75691c2e74a6b8ce770cc278d16254d3aa02029b1c81c8da1a5a3b42c4cef
BLAKE2b-256 checksum
How to use checksums
7772fefaa7a0c1df04196658c878394f6eddf7f06c87ef497bed0b01443b3dcf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / ScipySim-0.1.5-py2.6.egg

Download URL ScipySim-0.1.5-py2.6.egg
Size 208.3 kB
Tags Egg
SHA-256 checksum
How to use checksums
97b4fad82bb1de894933f43bc1a21d0ac3cc53f314198d8ed454fbcc6f6347ab
BLAKE2b-256 checksum
How to use checksums
7ea2cc7c8e9718fba40e86ed37c9f8878bd2a5aa763ad992d84d43447d5c5f18
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for ScipySim 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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