Giter VIP home page Giter VIP logo

pyvle's Introduction

Virtual Laboratory Environment: Python binding
==============================================

See AUTHORS and COPYRIGHT for the list of contributors.

VLE is an operational framework for multi-modeling, simulation and analysis of
complex dynamical systems. It addresses the reliability issue by using recent
developments in the theory of modeling and simulation proposed by B. Zeigler
with the Discrete Event System Specification formalism (DEVS).

Requirements
------------

vle		0.8.0 http://www.vle-project.org
boost		1.35  http://www.boost.org
cmake		2.6.0 http://www.cmake.org
python          2.5   http://www.python.org


Getting the code
----------------

The source tree is currently hosted on Sourceforge. To view the repository
online :
    http://vle.git.sourceforge.net/git/gitweb.cgi?p=vle/pyvle

The URL to clone it:
    git://vle.git.sourceforge.net/gitroot/vle/pyvle


Reporting bug
-------------

Please, report bugs into the VLE sourceforge trackers :
    http://sourceforge.net/tracker/?group_id=94199&atid=1127149


Translations
------------

If you want to translate PyVLE, please contact the VLE development team:
    [email protected]


Mailing lists
-------------


There is three mailing lists for VLE. More info here:
    http://sourceforge.net/mail/?group_id=94199

    * vle-tracker: all commit and tracker information.
    * vle-users: users and developper list.
    * vle-news: to keep news on vle, (release, etc.).


License
-------

This software in GPLv3 or later. See the file COPYING. Some files are under a
different license. Check the headers for the copyright info.


Installation
------------

The following commands configure, build and install VLE into your account:

$ tar zxf pyvle-0.9.0.tar.gz
or
$ git clone git://vle.git.sourceforge.net/gitroot/vle/pyvle

1. Installation in the distribution directory

    If you wan to install pyvle into the classical python directory
    (/usr/lib/python-2.x/), just follow the commands:

    $ cd pyvle
    $ mkdir build
    $ cd build
    $ cmake -DCMAKE_INSTALL_PREFIX=/usr
            -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
    $ make
    $ make install

2. Installation in $HOME directory:

    If you want to install pyvle into your $HOME (or any other directory)
    directory, you need to add an environment variable PYTHONPATH into your
    shell. For instance for bash, add the following line. Update the python2.6
    with the version of the python you use:

    PYTHONPATH=$HOME/usr/lib/python2.6:$HOME/usr/lib/python2.6/lib-dynload

    $ cd pyvle
    $ mkdir build
    $ cd build
    $ cmake -DCMAKE_INSTALL_PREFIX=$HOME/usr
            -DCMAKE_BUILD_TYPE=RelWithDebInfo ..
    $ make
    $ make install


Usage
-----

$ python
Python 2.5.4 (r254:67916, Sep 26 2009, 10:32:22)
[GCC 4.3.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyvle
>>> from pyvle import Vle
>>> dir(pyvle.Vle)

>>> from pyvle import Vle
>>> f = Vle("$HOME/usr/share/vle-0.8.0/examples/equation1.vpz")
>>> print(f)
<pyvle.Vle instance at 0x7fe231515e60>
>>> f.listConditions()
['cond', 'cond_A', 'cond_B', 'cond_C', 'cond_D', 'cond_sum' ]
>>> f.listConditionPorts('cond_A')
['name', 'value']
>>> f.getConditionPortValues('cond_A', 'value')
0.0
>>> f.clearConditionPort('cond_A', 'value')
>>> f.addRealCondition('cond_A', 'value', 1)
>>> f.getConditionPortVal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.