Vle 1.1

VLE 1.1.3

A new stable version of VLE 1.1 is available. This version introduces CVLE, a HPC simulation tools to build experimental frame and a lot of bug fixes. More details on the VLE 1.1 page. As usual, the source are available in Github or in tarball on this server. Important features Add a new cluster simulations tools that run big experimental frames from input files. Important bug fixes Fix an important bug with definition of infinity and negativeInfinity predicates in the vle::devs namespace.

VPZ files format

The VPZ file uses a DTD (Document Type Definition) to define the syntax (http://www.vle-project.org/vle-1.1.0.dtd). In this page we give an example of VPZ file with some explanations. You should not modify VPZ files unless you know what you are doing. GVLE is the GUI application for editing these files. Example of a VPZ file <!DOCTYPE vle_project PUBLIC "-//VLE TEAM//DTD Strict//EN" "http://www.vle-project.org/vle-1.1.0.dtd"> <vle_project author="..." date="..." version="..."> <structures> <model name="topmodel" type="coupled"> <in> <port name=".

Configuration file

Description The VLE configuration file provides preferences that users can set. You can find this file into the VLE_HOME directory: VLE_HOME/vle.conf. There are shared for all the projects on your computer. Each line represents one preference, the format is the following variable=value. The difference preferences are listed below: gvle.editor.auto-indent=1 gvle.editor.font=Monospace 10 gvle.editor.highlight-brackets=1 gvle.editor.highlight-line=1 gvle.editor.highlight-syntax=1 gvle.editor.indent-on-tab=1 gvle.editor.indent-size=4 gvle.editor.show-line-numbers=1 gvle.editor.show-right-margin=1 gvle.editor.smart-home-end=1 gvle.graphics.atomic-color= gvle.graphics.background-color= gvle.graphics.connection-color= gvle.graphics.coupled-color= gvle.graphics.font=Monospace 10 gvle.graphics.font-size=10 gvle.graphics.foreground-color= gvle.graphics.line-width=3 gvle.graphics.selected-color= gvle.

Distributions

A distribution is a set of packages available on an URL and a description file packages.pkg. For an example, you can look at the VLE distribution. How to use a distribution To use a package distribution you have to add a remote URL into your vle.conf file (see the remote preferences of vle.conf documentation. Be careful to add only URLs that you trust in. For example to add an URL of a distribution http://mydistrib/, update the following line:

Tutorial 01: counter-generator

In this first example, we will create simulation of two models: an event generator and a event counter. First, we need to create a new empty package in the user home directory. cd $HOME/examples vle-1.1 -P generator-counter create vle-1.1 -P generator-counter configure build The binary package is now installed into the VLE’s home ($VLE_HOME/pkgs-1.1 or $HOME/.vle/pkgs-1.1). Now, we need to add two DEVS models, the counter and the generator. Copy the file Simple.

debug model

Debugging Macros To debug your model, you may use the DECLARE_DYNAMICSY_DBG instead of DECLARE_DYNAMICS and use some functions (TraceAlways, TraceModel etc.) to enable debugging of your model in the C++ source code. Default, the debug file is located at $VLE_HOME/vle.log but it can be redirected to the standard output with the command line option --log-to- stdout. Level Description Command line C++ 0 Minimum debug: messages are always printed vle -v 0 or vle TraceAlways() or DTraceAlways() 1 Model Debugging: to be used by model developer vle -v 1 TraceModel() or DTraceModel() 2 Extension debugging: extension functions tracking (e.

Atomic model

VLE implements the DEVS abstract simulators and more precisely the DSDE which merge Parallel DEVS and DS-DEVS. In VLE, a DEVS atomic model is represented as a object which inherits of the vle::devs::Dynamics C++ class. class MyModel : public vle::devs::Dynamics { public: MyModel(const DynamicsInit& init, const vle::devs::InitEventList& events) : vle::devs::Dynamics(init, events) {} virtual ~MyModel() {} // Process the initialization of the model by // initializing the initial state and return // the duration (or timeAdvance) of the initial // state.

Extensions

VLE provides several vle::devs::Dynamics subclass to simplify the development of atomic models. These sub-classes provides behavior like: finite state automaton, ordinary differential equation solver, Petrinet, planning and decision making etc. Some extensions also provide graphical interfaces and C ++ code generators. Extensions available vle.output provides output plug-ins. These plugins are in charge of recording the outputs of simulations in files (using a csv, a R data or gnuplot format).

Tutorial 02: Lotka-Volterra, observation and conditions

In this tutorial, we create a Lotka-Volterra system solved with Euler. The first part shows you how to develop a such model then we use the experimental conditions to assign value from the VPZ and use it directly from R. First, we develop the model vle -P lotka-volterra create Rename the lotka-volterra/src/Simple.cpp into SystemLotkaVolterra.cpp for example and edit the source code like this: #include <vle/value/Value.hpp>#include <vle/devs/Dynamics.hpp> namespace vd = vle::devs; namespace vv = vle::value; namespace examples { class SystemLotkaVolterra : public vd::Dynamics { double X, Y; double alpha, beta, gamma, delta; double step; public: SystemLotkaVolterra(const vd::DynamicsInit& init, const vd::InitEventList& events) : vd::Dynamics(init, events) { X = 1.

VLE 1.1

Download Windows (32bits binaries for Windows 7, 8, 10): vle-1.1.3.exe rvle_1.1.3-0.zip Sources (See the the README files in all tarballs): vle-1.1.3.tar.gz rvle_1.1.3-0.tar.gz pyvle-1.1.3.tar.gz More details are available for downloading and installation of VLE, packages and ports. A specific page is available for the installation of RVLE. Generic documentation Kernel In VLE, we have implemented the DSDE abstract simulator developed by Fernando J. Barros which enable parallelization of atomic models and dynamic structure changes during simulation.

counter

A simple model that counts events received in any input port. First, we create a new package with the following command: mkdir -p cd $HOME/vle/tutorial cd $HOME/vle/tutorial vle -P examples create We add the file “counter.cpp” and update the CMakeLists.txt file in the src directory. #include <vle/devs/Dynamics.hpp>#include <vle/value/Double.hpp> namespace example { class Counter : public vle::devs::Dynamics { public: Counter(const vle::devs::DynamicsInit& model, const vle::devs::InitEventList& events) : vle::devs::Dynamics(model, events) , m_counter(0), {} virtual ~Counter() {} virtual vle::devs::Time init( const vle::devs::Time& /* time */) { return 0; } virtual vle::devs::Time timeAdvance() const { return vle::devs::infinity; } virtual void externalTransition( const vle::devs::ExternalEventList& events, const vle::devs::Time& time) { m_counter += events.

gvle

GVLE is the gui interface to VLE for designing models. It is based on gtkmm. It offers some of the features that the vle CLI provides : Packages: configure, build, clean, rclean into the menu Project create into the menu File

installation

Installation on Windows. Upgrading from VLE 1.0 (optionnal) Uninstall the previous version Remove the remaining variable PKG_CONFIG_PATH (only earlies versions) Uninstall/remove the Mingw compiler (if not needed by another application) Uninstall Cmake (if not required by another application) Follow the next sections for installation Installation of VLE Download the binary file (vle-1.1.X-Windows-x86.exe) where 1.1.X is the last version. Install VLE, it is is highly recommended to not to use a path that contains spaces (e.

vle 1.1

Download VLE includes VLE (command line interface), GVLE (graphical user interface) and the VFL (full C++ API to model and to simulate). RVLE is the R package to bind ®[https://www.r-project.org/] and VLE. PyVLE is the python package to bind Python and VLE. Finally, package is a lot of extensions and examples. Windows (32bits binaries for Windows 7, 8, 10): vle-1.1.3.exe rvle_1.1.3-0.zip Sources (See the the README files in all tarballs):