{ "info": { "author": "Benjamin Margolis", "author_email": "ben@sixpearls.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Education", "Intended Audience :: Science/Research", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python :: 3", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Physics" ], "description": ".. |simupy_logo| image:: docs/_static/simupy_color_small.png\r\n :alt: SimuPy\r\n\r\n|simupy_logo|\r\n=============\r\n\r\n.. image:: https://img.shields.io/pypi/v/simupy.svg\r\n :alt: PyPI Package latest release\r\n :target: https://pypi.python.org/pypi/simupy\r\n\r\n.. image:: https://readthedocs.org/projects/simupy/badge/?style=flat\r\n :target: https://simupy.readthedocs.io/en/simupy-1.0.0/\r\n :alt: Documentation Status\r\n\r\n.. image:: https://travis-ci.org/simupy/simupy.svg?branch=master\r\n :alt: Travis-CI Build Status\r\n :target: https://travis-ci.org/simupy/simupy\r\n\r\n.. image:: https://codecov.io/gh/simupy/simupy/branch/master/graph/badge.svg\r\n :alt: Coverage Status\r\n :target: https://codecov.io/gh/simupy/simupy\r\n\r\n.. |API documentation| replace:: `API Documentation`_\r\n.. _API Documentation: https://simupy.readthedocs.io/en/simupy-1.0.0/api/api.html\r\n\r\nSimuPy is a framework for simulating interconnected dynamical system models and\r\nprovides an open source, python-based tool that can be used in model- and\r\nsystem- based design and simulation workflows. Dynamical system models can be\r\nspecified as an object with the interface described in the \r\n|API documentation|. Models can also be constructed using symbolic\r\nexpressions, as in\r\n\r\n.. code-block :: python\r\n\r\n from sympy.physics.mechanics import dynamicsymbols\r\n from sympy.tensor.array import Array\r\n from simupy.systems.symbolic import DynamicalSystem\r\n\r\n x = x1, x2, x3 = Array(dynamicsymbols('x1:4'))\r\n u = dynamicsymbols('u')\r\n sys = DynamicalSystem(Array([-x1+x2-x3, -x1*x2-x2+u, -x1+u]), x, u)\r\n\r\nwhich will automatically create callable functions for the state equations,\r\noutput equations, and jacobians. By default, the code generator uses a wrapper\r\nfor ``sympy.lambdify``. You can change it by passing the system initialization\r\narguments ``code_generator`` (the function) and additional keyword arguments\r\nto the generator in a dictionary ``code_generator_args``. You can change the\r\ndefaults for future systems by changing the module variables\r\n\r\n.. code-block :: python\r\n\r\n import simupy.systems.symbolic\r\n simupy.systems.symbolic.DEFAULT_CODE_GENERATOR = your_code_generator_function\r\n simupy.systems.symbolic.DEFAULT_CODE_GENERATOR_ARGS = {'extra_arg': value}\r\n\r\nA number of helper classes/functions exist to simplify the construction of\r\nmodels. For example, a linear feedback controller can be defined as\r\n\r\n.. code-block :: python\r\n\r\n from simupy.systems import LTISystem\r\n ctrl = LTISystem([[1.73992128, 0.99212953, -2.98819041]])\r\n\r\nThe gains in the example come from the infinite horizon LQR based on the system\r\nlinearized about the origin. A block diagram of the system under feedback\r\ncontrol can be constructed\r\n\r\n.. code-block :: python\r\n\r\n from simupy.block_diagram import BlockDiagram\r\n BD = BlockDiagram(sys, ctrl)\r\n BD.connect(sys, ctrl) # connect the current state to the feedback controller\r\n BD.connect(ctrl, sys) # connect the controlled input to the system\r\n\r\nInitial conditions for systems with non-zero dimensional state can be defined\r\n(it defaults to zeros of the appropriate dimension) and the interconnected\r\nsystems can be simulated with the ``BlockDiagram``'s ``simulate`` method,\r\n\r\n.. code-block :: python\r\n\r\n sys.initial_condition = [5, -3, 1]\r\n res = BD.simulate(10)\r\n\r\nwhich uses ``scipy.integrate.ode`` as the default solver for the initial-valued\r\nproblem. The results are an instance of the ``SimulationResult`` class, with\r\narray attributes ``t``, ``x``, ``y``, and ``e``, holding time, state, output,\r\nand event values for each integrator time step. The first axis indexes the time\r\nstep. For ``x``, ``y``, and ``e``, the second axis indexes the individual\r\nsignal components, ordered first by the order each system was added to the\r\nblock diagram then according to the system state and output specification. The\r\nsimulation defaults to the ``dopri5`` solver with dense output, but a different\r\n``integrator_class`` and ``integrator_options`` options can be used as long as\r\nit supports a subset of the ``scipy.integrate.ode`` API. The default values\r\nused for future simulations can be changed following the pattern for the\r\nsymbolic code generator options.\r\n\r\nA number of utilities for constructing and manipulating systems and the\r\nsimulation results are also included:\r\n\r\n- ``process_vector_args`` and ``lambdify_with_vector_args`` from\r\n ``simupy.utils.symbolic`` are helpers for code generation using\r\n ``sympy.lambdify``\r\n- ``simupy.utils.callable_from_trajectory`` is a simple wrapper for making\r\n polynomial spline interpolators using ``scipy.interpolate.splprep``\r\n- ``simupy.matrices`` includes tools for constructing (vector) systems using\r\n matrix expressions and re-wrapping the results into matrix form\r\n- ``simupy.systems.SystemFromCallable`` is a helper for converting a function\r\n to a state-less system (typically a controller) to simulate\r\n- ``MemorylessSystem`` and ``LTISystem`` are subclasses to more quickly create\r\n these types of systems\r\n- ``SwitchedSystem`` is used to construct systems with discontinuities,\r\n defined by zero-crossings of the ``event_equation_function`` output.\r\n\r\nThe examples subdirectory includes a number of worked problems. The \r\ndocumentation and docstrings are also available for reference.\r\n\r\nInstallation\r\n------------\r\n\r\nSimuPy is ``pip`` installable\r\n\r\n.. code-block:: bash\r\n\r\n $ pip install simupy\r\n\r\nSimuPy has been tested locally against\r\n\r\n - Python >= 3.6\r\n - NumPy_ >= 1.11\r\n - SciPy_ >= 0.18\r\n - SymPy_ >= 1.0\r\n\r\nbut tests on Travis may run with newer versions. Much of the functionality\r\nworks without SymPy, so installation does not require it. The examples use\r\nmatplotlib_ to visualize the results. Testing uses pytest_. The documents are\r\nbuilt with Sphinx_ == 1.6.3.\r\n\r\n.. _NumPy: http://numpy.scipy.org\r\n.. _SymPy: http://sympy.org\r\n.. _SciPy: http://www.scipy.org/scipylib/index.html\r\n.. _matplotlib: http://matplotlib.org\r\n.. _pytest: https://docs.pytest.org/en/latest/\r\n.. _Sphinx: http://sphinx-doc.org/\r\n\r\nContributing\r\n------------\r\n\r\n1. To discuss problems or feature requests, file an issue. For bugs, please\r\n include as much information as possible, including operating system, python\r\n version, and version of all dependencies. \r\n2. To contribute, make a pull request. Contributions should include tests for\r\n any new features/bug fixes and follow best practices including PEP8, etc.\r\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/simupy/simupy", "keywords": "", "license": "BSD 2-clause \"Simplified\" License", "maintainer": "", "maintainer_email": "", "name": "simupy", "package_url": "https://pypi.org/project/simupy/", "platform": "", "project_url": "https://pypi.org/project/simupy/", "project_urls": { "Homepage": "https://github.com/simupy/simupy" }, "release_url": "https://pypi.org/project/simupy/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A framework for modeling and simulating dynamical systems.", "version": "1.0.0" }, "last_serial": 3185862, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "5277682ce907a4b533fd58c1bafbe478", "sha256": "120e8847bb0ffd2f4034066b6bcbb6385113bfe41b9eb8f8110d3cfcff49ac9c" }, "downloads": -1, "filename": "simupy-0.1.0.zip", "has_sig": false, "md5_digest": "5277682ce907a4b533fd58c1bafbe478", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24745, "upload_time": "2017-08-07T22:04:41", "url": "https://files.pythonhosted.org/packages/2f/fb/0a5368ce2f2ce70113e3665cdf67be8e041917283f24c4e551037eeed412/simupy-0.1.0.zip" } ], "0.1.0.dev0": [ { "comment_text": "", "digests": { "md5": "abfcc584a63f9f3e979db2d1bede27c1", "sha256": "758c27c5aacad495b29118dffa3bba8d0f4c1ed6b6ffa66a03bfb584d19db087" }, "downloads": -1, "filename": "simupy-0.1.0.dev0.zip", "has_sig": false, "md5_digest": "abfcc584a63f9f3e979db2d1bede27c1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24898, "upload_time": "2017-08-07T22:11:24", "url": "https://files.pythonhosted.org/packages/5b/71/2eb4f67369ab95cd262017afadaf89f89f6838023e310e297ca7b4596a72/simupy-0.1.0.dev0.zip" } ], "0.1.0.dev1": [ { "comment_text": "", "digests": { "md5": "97c8fc6d934554c299777e6b4a119ae3", "sha256": "d28bac98a08b1a94f4eb8a70bfa0d6478a554c4acd588917ad7bf807c0135af5" }, "downloads": -1, "filename": "simupy-0.1.0.dev1.tar.gz", "has_sig": false, "md5_digest": "97c8fc6d934554c299777e6b4a119ae3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17382, "upload_time": "2017-08-07T22:25:03", "url": "https://files.pythonhosted.org/packages/95/45/0ad3b9ccb28b564a1e580ac5ac4b1454ddb738b6b1a4c861311b21e5a15f/simupy-0.1.0.dev1.tar.gz" } ], "0.1.0.dev2": [ { "comment_text": "", "digests": { "md5": "6c21b42b75a16edc9dd8cef91cde3fd6", "sha256": "a801fae37e4b64ef6cddd8576144925d91c3fdcc3dcbf8bef7d90d0db5aa1385" }, "downloads": -1, "filename": "simupy-0.1.0.dev2.zip", "has_sig": false, "md5_digest": "6c21b42b75a16edc9dd8cef91cde3fd6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21870, "upload_time": "2017-08-07T22:55:48", "url": "https://files.pythonhosted.org/packages/0a/bc/61be467db0453c391b55744c3aa40fcfd8933f0d090d3e5a130931a8cb49/simupy-0.1.0.dev2.zip" } ], "0.1.0.dev3": [ { "comment_text": "", "digests": { "md5": "abfa2f9e6f9a337c7633c6b6bc37b6aa", "sha256": "7cb5f61e5208525f49215a4e703c805dab9695b7b60ec8fb6eabcb3474e003e2" }, "downloads": -1, "filename": "simupy-0.1.0.dev3.zip", "has_sig": false, "md5_digest": "abfa2f9e6f9a337c7633c6b6bc37b6aa", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25682, "upload_time": "2017-08-07T23:07:09", "url": "https://files.pythonhosted.org/packages/2d/5f/b0d542af2b7194833c26fb635746a47cb90b544c31df3076dc3c4920cd79/simupy-0.1.0.dev3.zip" } ], "0.1.0.dev4": [ { "comment_text": "", "digests": { "md5": "d4aba8ad39b7632f08da5196cc45f120", "sha256": "c70979eeb745616a8d0a3049ca5caad87fb1f2fec1aec5b2b1829ab1745982b0" }, "downloads": -1, "filename": "simupy-0.1.0.dev4.zip", "has_sig": false, "md5_digest": "d4aba8ad39b7632f08da5196cc45f120", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25682, "upload_time": "2017-08-08T01:32:20", "url": "https://files.pythonhosted.org/packages/a6/a2/36870f30b06db7d2e336043025ef1157218e4d852f18c783c7835817e7f0/simupy-0.1.0.dev4.zip" } ], "0.1.0.dev5": [ { "comment_text": "", "digests": { "md5": "cfd3fc3d22d386dab92371b51114a1e3", "sha256": "b537e4370316bf03ef8e40bd855e0732730c98bc3e0764a10d7fe9aa67a4aee7" }, "downloads": -1, "filename": "simupy-0.1.0.dev5.zip", "has_sig": false, "md5_digest": "cfd3fc3d22d386dab92371b51114a1e3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25707, "upload_time": "2017-08-08T01:32:40", "url": "https://files.pythonhosted.org/packages/03/a0/f8d4593b12e68d60e17ddbf0c5a0c4617bbce4d07909de8b8388e56af2d7/simupy-0.1.0.dev5.zip" } ], "0.1.0.dev6": [ { "comment_text": "", "digests": { "md5": "92e9d2b88239aceef8e1ba52a34ea959", "sha256": "7662077ff891d00bb7b7062b08f6ee1c3d6d0ba910cc29e2962093fa1362b8ec" }, "downloads": -1, "filename": "simupy-0.1.0.dev6.tar.gz", "has_sig": false, "md5_digest": "92e9d2b88239aceef8e1ba52a34ea959", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17254, "upload_time": "2017-08-29T06:33:43", "url": "https://files.pythonhosted.org/packages/ec/83/1dfa7c24926a170dcc0b9c5a6aeb89081c86eb3cad7ab5392f5950140886/simupy-0.1.0.dev6.tar.gz" } ], "0.1.0.dev7": [ { "comment_text": "", "digests": { "md5": "c3642f73d7605dc4da84fbe159f51e43", "sha256": "f1faf77f9b7bc784045eccaed556206358cbb525846e74d352e5c68808cd8959" }, "downloads": -1, "filename": "simupy-0.1.0.dev7.tar.gz", "has_sig": false, "md5_digest": "c3642f73d7605dc4da84fbe159f51e43", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23601, "upload_time": "2017-08-29T06:44:26", "url": "https://files.pythonhosted.org/packages/d3/59/3d46932bc387e9423ec9a63b97a79b490ac04e3bafa55224c90965c95d94/simupy-0.1.0.dev7.tar.gz" } ], "0.1.0.dev8": [ { "comment_text": "", "digests": { "md5": "681fb255184a00d97217da90d5537ea4", "sha256": "4ee7f1c6b531ff42002e908f7c62764b72e7d8a56b315e433c56255620f08c64" }, "downloads": -1, "filename": "simupy-0.1.0.dev8.tar.gz", "has_sig": false, "md5_digest": "681fb255184a00d97217da90d5537ea4", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23850, "upload_time": "2017-08-29T15:32:56", "url": "https://files.pythonhosted.org/packages/e9/47/4688daaff5931809b2e6f92b8f52223f4bbaa9e0264a5281069a228517da/simupy-0.1.0.dev8.tar.gz" } ], "0.1.0.dev901": [ { "comment_text": "", "digests": { "md5": "ed769b5f07760bf937b2875e52370a77", "sha256": "3ad0242d5498998324505f774304c8257dc2e9937dd7c8608666c96c90586066" }, "downloads": -1, "filename": "simupy-0.1.0.dev901.tar.gz", "has_sig": false, "md5_digest": "ed769b5f07760bf937b2875e52370a77", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24403, "upload_time": "2017-09-01T18:25:48", "url": "https://files.pythonhosted.org/packages/95/aa/41b02314fe0f6ed55504b1c49350547d9cbdd03e4c38585d4e58064ae326/simupy-0.1.0.dev901.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "9a565680680698d11b5a9531fc295eca", "sha256": "2210b255f194839cbf53d8da6577a8c868ec0fe4436d18f98b0597f90747eda3" }, "downloads": -1, "filename": "simupy-0.2.0.tar.gz", "has_sig": false, "md5_digest": "9a565680680698d11b5a9531fc295eca", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182071, "upload_time": "2017-09-11T04:45:43", "url": "https://files.pythonhosted.org/packages/1f/9a/ec06d7aa4387c80408b0153c9d9cb9b3bf6bb987f2f822ee1088f4bc635d/simupy-0.2.0.tar.gz" } ], "0.2.0.dev1": [ { "comment_text": "", "digests": { "md5": "ae7a3ced68b8b43a8e2759c244b75a53", "sha256": "9d8dba7e2ec93378b50640d8cebb84b9c2fbd56817c12e5e74286264da06a7ee" }, "downloads": -1, "filename": "simupy-0.2.0.dev1.tar.gz", "has_sig": false, "md5_digest": "ae7a3ced68b8b43a8e2759c244b75a53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182066, "upload_time": "2017-09-11T03:34:39", "url": "https://files.pythonhosted.org/packages/3b/e9/b4a200e5b1f1332afa15a16c9430f3f685934c2dd0b0f7cdfcd541d7eacd/simupy-0.2.0.dev1.tar.gz" } ], "0.2.0.dev4": [ { "comment_text": "", "digests": { "md5": "f680224a292a2e520de23e59da581af8", "sha256": "0b3c33dbc62c9b9793970f952905188785a5fbe716c76ba4125b3f5d22828214" }, "downloads": -1, "filename": "simupy-0.2.0.dev4.tar.gz", "has_sig": false, "md5_digest": "f680224a292a2e520de23e59da581af8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182110, "upload_time": "2017-09-11T04:12:54", "url": "https://files.pythonhosted.org/packages/87/e0/43d5e01b6a69396b486c191fbc3672cc198dada5f8f6d14afe6c84e15732/simupy-0.2.0.dev4.tar.gz" } ], "0.2.0.dev5": [ { "comment_text": "", "digests": { "md5": "ec294eb10bf2797f63273928baea0d1b", "sha256": "867f9324c830f5d399119e1fc19f77394825b3a843ec25f64d4a26288d0727a5" }, "downloads": -1, "filename": "simupy-0.2.0.dev5.tar.gz", "has_sig": false, "md5_digest": "ec294eb10bf2797f63273928baea0d1b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182080, "upload_time": "2017-09-11T04:40:17", "url": "https://files.pythonhosted.org/packages/31/52/5dce3acd14b9365c602902d5387c382bedefcede21b76902883cdd876a92/simupy-0.2.0.dev5.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "6a39b2a16c4cd1c992f87caa6f41ce97", "sha256": "687266f85235342ba186f7fb3ea5bccd634f035901c96872969a01a1b3522b11" }, "downloads": -1, "filename": "simupy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6a39b2a16c4cd1c992f87caa6f41ce97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182245, "upload_time": "2017-09-19T15:45:02", "url": "https://files.pythonhosted.org/packages/ff/96/03255125aefdd2dd1ce155e35629cffcc2d42ba0d07fdf2629d3062ddd6b/simupy-1.0.0.tar.gz" } ], "1.0.0.dev1": [ { "comment_text": "", "digests": { "md5": "977cb70871c9e80f95ddc86a2024b231", "sha256": "1a70fb33dab79733b3e81e3a81ffa061e525acadad7f5742c53c534b8bc46456" }, "downloads": -1, "filename": "simupy-1.0.0.dev1.tar.gz", "has_sig": false, "md5_digest": "977cb70871c9e80f95ddc86a2024b231", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23860, "upload_time": "2017-08-30T02:12:23", "url": "https://files.pythonhosted.org/packages/3e/6b/f1cc5913b55d538cbc4ebcfb8f80feb996c97dcd31dee98b920af79e4348/simupy-1.0.0.dev1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "6a39b2a16c4cd1c992f87caa6f41ce97", "sha256": "687266f85235342ba186f7fb3ea5bccd634f035901c96872969a01a1b3522b11" }, "downloads": -1, "filename": "simupy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "6a39b2a16c4cd1c992f87caa6f41ce97", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 182245, "upload_time": "2017-09-19T15:45:02", "url": "https://files.pythonhosted.org/packages/ff/96/03255125aefdd2dd1ce155e35629cffcc2d42ba0d07fdf2629d3062ddd6b/simupy-1.0.0.tar.gz" } ] }