Documentation

Qt Creator support

The master branch of VLE supports the Qt Creator IDE via qmake. Qt Creator is a cross-platform IDE that includes productivity tools to speed up development time. Thanks to qmake, an Official support for MacOS10 should appear in future releases. Cmake remains the official project generator but qmake allow quick development of GVLE or GVLE's plug-ins. Installation Install Qt Creator with Qt5 development files from your package manager on Linux or from the Qt website on MacOS or Windows then, import VLE from the Git version control.

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.

Command Line Interface

To get access to this application : on Linux/Unix, simply type the command vle --help in a terminal. The CLI VLE has to be into the PATH. on Windows, open a command interpreter (application cmd.exe) and type the absolute path to the VLE binary location e.g.: c:\vle-2.0\bin\vle-2.0 --help. By default VLE is not set into the default PATH environment variable, otherwise the command vle --help should work. The package mode The package mode of vle application vle -P mypackage is used to manipulate packages.

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-2.0.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=true gvle.editor.font=Monospace 10 gvle.editor.highlight-brackets=true gvle.editor.highlight-line=true gvle.editor.highlight-syntax=true gvle.editor.indent-on-tab=true gvle.editor.indent-size=4 gvle.editor.show-line-numbers=true gvle.editor.show-right-margin=true gvle.editor.smart-home-end=true gvle.graphics.atomic-color=#0000ffff0000 gvle.graphics.background-color=#ffffffffffff gvle.graphics.connection-color=#000000000000 gvle.graphics.coupled-color=#00000000ffff gvle.graphics.font=Monospace 10 gvle.graphics.font-size=10 gvle.graphics.foreground-color=#000000000000 gvle.graphics.line-width=3 gvle.graphics.selected-color=#ffff00000000 gvle.packages.auto-build=true vle.

Debug and Log model

Debug model To debug your model, you may use the debug option when you right click on an atomic model under GVLE. Default, the debug file is located at $VLE_HOME/vle-2.0.log but it can be redirected to the standard output with the command line option --log-to- stdout or --log-to-stderr. Log model For example the following atomic model will show always the string “MyModel constructor” but show the string “time is odd” only when time is odd and VLE is launched with vle -v x with x equal 1, 2 or 3.

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 the 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:

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).

GVLE

GVLE is the graphical user interface to VLE for designing models. It is based on QT5. It offers some of the features that the command line interface.

PyVLE

PyVLE is a Python package for using VLE framework into Python. It provides features such as loading VPZ files, modifying conditions values of models, simulating VLE models and recovering simulation results. It provides other features regarding the experiment such as modifying duration or seed, obtaining information on models and views. PyVLE is one component of a generic solution for developing web applications for VLE framework. Installation You can get source code of PyVLE from the Git repository or using the tar ball release.

RVLE

RVLE, is a R Package, to call VLE’s API from R. This package allows to open packages, to read VPZ, assign experimental conditions to the models, call the simulator, build experimental frames and capture result of simulation into matrix or dataframe. Installation Windows Download R and install it. You have to use the 32 bits application R i386. install vle add an environment variable VLE_HOME with value c:\users\login\vle (replace login with your own login name).

VLE_HOME variable

The VLE home directory contains binaries of packages, configuration file and log files. You should not use directly this directory unless you know what you are doing. It has the following hierarchy: $VLE_HOME ├─ pkgs-2.0 ; the directory of VLE's packages │ └─ vle.output ; an example of package: vle.output. │ └─ mypackage ; another example of package: mypackage. │ └─ vle.log ; log of previous execution of VLE └─ rvle.

VPZ file format

The VPZ file uses a DTD (Document Type Definition) to define the syntax (http://www.vle-project.org/vle-2.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. XML format for VPZ <!DOCTYPE vle_project PUBLIC "-//VLE TEAM//DTD Strict//EN" "http://www.vle-project.org/vle-2.0.dtd"> <vle_project author="..." date="..." version="..."> <structures> <model name="topmodel" type="coupled"> <in> <port name=".

mvle

mvle is a program for parallelizing simulations; it requires a MPI library.

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=".

vle packages distribution

VLE provides its own packages distribution (see Package Distribution). It contains packages for modeling extensions, outputs and tools. The VLE packages provided by this distribution are : vle.output : management of simulation outputs (file, console, etc..) ext.muparser : required for vle.forrester only vle.extension.difference-equation : modelisation of difference equations vle.extension.differential-equations : modelisation of differential equations (Euler, RK4 and QSS2 integration scheme) vle.extension.decision : modelisation of decision processes vle.extension.dsdevs : Dynamic Structure DEVS vle.

vle home

The VLE home directory contains binaries of packages, configuration file and log files. You should not directly this directory unless you know what you are doing. It has the following hierarchy: $VLE_HOME ├─ pkgs-1.1 ; the directory of VLE's packages │ └─ vle.output ; an example of package: vle.output. │ └─ mypackage ; another example of package: mypackage. │ └─ vle.log ; log of previous execution of VLE └─ rvle.

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:

mvle

mvle is a program for parallelizing simulations; it requires a MPI library.

upgrade from vle 1.2 to vle 2.0

WARNING: The vle-2.0 is not yet released. This page is under construction. Upgrade your package developped under vle-1.2 To update the packages developped with vle-1.2 : you should first save your package before trying to update it. the modifications to perform on your package proposed here rely on the fact that you did not modified the mentioned files. Update the cmake scripts. a) In the directory mypkg/cmake, remove all files and add all files are here: https://github.

upgrade from vle 1.1 to vle 1.2

Upgrade your package developped under vle-1.1 To update the packages developped with vle-1.1 : you should first save your package before trying to update it. the modifications to perform on your package proposed here rely on the fact that you did not modified the mentioned files. You can use the python script VLE_INSTALL_DIR/share/convert-vpz11-vpz12.py or you can perfom manually the modifications listed below. Update the vpz files into mypkg/exp/ a) using a text editor, remove the xml tag for duration and begin, e.

upgrade from vle 1.0.3 to vle 1.1

Upgrade vle to vle 1.1 On linux: install missing packages, see the building from source page. Then install from sources. On Win32, remove the Mingw and CMake software since they are now embedded into VLE, unless you use it for other applications. And install vle-1.1. Upgrade your package developped under vle-1.0.3 First of all you should save your package before trying to update it. The modifications to perform on your package proposed here rely on the fact that you did not modified the mentioned files.

VLE-2.0: Counter-Generator model

#include <vle/dsde/generic.hpp> #include <vle/dsde/dsde-debug.hpp> typedef vle::DoubleTime MyTime; typedef vle::PortList <std::string> MyPort; typedef vle::dsde::Engine <MyTime> MyDSDE; using AtomicModel = vle::dsde::AtomicModel <MyTime, MyPort, MyPort>; using GenericCoupledModel = vle::dsde::GenericCoupledModel <MyTime, vle::dsde::TransitionPolicyThread <MyTime>>; using CoupledModelThread = vle::dsde::CoupledModel <MyTime, MyPort, MyPort, MyPort, MyPort, vle::dsde::TransitionPolicyThread <MyTime>>; using CoupledModelMono = vle::dsde::CoupledModel <MyTime, MyPort, MyPort, MyPort, MyPort, vle::dsde::TransitionPolicyDefault <MyTime>>; struct Counter : AtomicModel { int i; Counter(const vle::Context &ctx) : AtomicModel(ctx, 1u, 0u), i(0) {} Counter(const Counter &other) : AtomicModel(other), i(other.

vle cli

To get access to this application : on Linux/Unix, simply type the command vle --help in a terminal. The CLI vle has to be into the PATH. on Windows, open a command interpreter (application cmd) and type the absolute path to the vle binary location e.g. : c:\vle-1.1\bin\vle --help. By default vle is not set into the path, otherwise the command vle --help should work. The package mode The package mode of vle application vle -P mypackage is used to manipulate packages.

PyVLE

PyVLE is a Python package for using VLE framework into Python. It provides features such as loading VPZ files, modifying conditions values of models, simulating VLE models and recovering simulation results. It provides other features regarding the experiment such as modifying duration or seed, obtaining information on models and views. PyVLE is one component of a generic solution for developing web applications for VLE framework. Installation you can get source code of pyvle on the Download Page of vle-1.

RVLE

RVLE, is a R Package, to call VLE’s API from R. This package allows to open packages, to read VPZ, assign experimental conditions to the models, call the simulator, build experimental frames and capture result of simulation into matrix or dataframe. Usage Documentation is included into the R package. help(rvle) help(Rvle) A simple example of the basic API usage: f <- rvle.open(file="test_simulation.vpz", pkg="test_port") result <- rvle.run(f) checkEquals(class(result$view), "data.frame") Install requirements for rvle (Windows) download R and install it.

vle 2.0

VLE is compound of the main part named VLE, and can be associated with three add-ons: rvle (R-Package for VLE), pyvle (Python for VLE, only on linux) and jvle (Java for VLE, only on linux).

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.

Packages

Packages in VLE are autonomous projects which gather for example source code of PDEVS models, VPZ files, documentations or data. The goal of the packages in VLE is to improve the development of big models and to facilitate the sharing of models and code. Example of a package hierarchy $mypackage |─ buildvle/ ; the compilation directory, | ; it should not be directly modified |─ cmake/ ; cmake scripts |─ data/ ; data of your package |─ doc/ ; documentation of your package |─ exp/ ; experience, ie.

Packages

Packages in VLE are autonomous projects which gather for example source code of PDEVS models, VPZ files, documentations or data. The goal of the packages in VLE is to improve the development of big models and to facilitate the sharing of models and code. Example of a package hierarchy $mypackage |─ buildvle/ ; the compilation directory, | ; it should not be directly modified |─ cmake/ ; cmake scripts |─ data/ ; data of your package |─ doc/ ; documentation of your package |─ exp/ ; experience, ie.

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.

Documentation

Keywords Concepts: kernel, packages, extensions, distributions. Programs: vle, gvle, rvle, pyvle. C++: VLE’s API, VPZ format, debug model. 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. We also introduced an observation framework in the DEVS kernel simulator of VLE. Packages VLE packages are standard Unix tar archives optionally compressed with gzip or bzip2 which can store the source code of the models, documentation and data.

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).

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):