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"
<vle_project author="..." date="..." version="...">
  <model name="topmodel" type="coupled">
      <port name="..." />
      <port name="..." />
      <port name="..." />
      <port name="..." />
      <model name="a" type="atomic" dynamics="dynamicA"
                 conditions="conditionA" observables="obsA">

Submodels are possibly couple models or atomic models and are used to represent DEVS model hierarchy. Thus, the model a is a submodel of topmodel and is an atomic model. In VLE we use the syntax topmodel::a to refer to this submodel.

        <port name="..." />
        <port name="..." />
        <port name="..." />
        <port name="..." />
    <model name="b" type="atomic">
        <port name="..." />
        <port name="..." />
        <port name="..." />
        <port name="..." />
      <connection type="input|output|internal">
        <origin model="..." port="..." />
        <destination model="..." port="..." />

Below is the list of dynamics used into the structure defined above. They are C++ plug-ins and provide the dynamics behavior of atomic models (DEVS functions of atomic model). To write such dynamic, you have to define a C++ class (ie MyDyn) vle::dev::Dynamics and add the macro DECLARE_DYNAMICS(MyDyn) in the end of your cpp file.

  <dynamic name="dynamicA" library="libcounter" package="pkg1"/>

The dynamic declared above refers to the library into VLE_HOME/pkgs-1.1/pkg1/plugins/simulator/libcounter.dll

    <dynamic name="dynamicB" library="big" package="pkg2" />
    <dynamic name="dynamicB" library="big" package="pkg3" />
    <dynamic name="dynamicB" library="big" package="pkg3" />
<experiment name="" duration="" begin="" combination="linear">

This is the definition of the experiment which gives initial conditions. These initial conditions possibly contains multiple values in order to simulate experiment plans.

  <condition name="conditionA">
    <port name="...">

There gives the observation system of the model, it allows to produce output files of the simulations.

  <output name="outputa" format="local" package="vle.output"
          location="" plugin="storage" />

The output plugin declared above refers to the c++ library VLE_HOME/pkgs-1.1/vle.output/plugins/output/libfile.so.

<output name="outputb" format="local" package="vle.output"
        location="" plugin="file" >

Some of the output plug-ins such as the file plug-in of vle.output can be parameterized, the parameters are given below as vle::value::Map.

    <map><key name="julian-day"><boolean>true</boolean></map>
  <observable name="obsA">
    <port name="x">
      <attachedview name="measureA" />
    <port name="y" />
    <port name="z" />
  <observable name="obsB">
    <port name="x" />
    <port name="y">
      <attachedview name="measureA" />
    <port name="z" />
<view name="viewA" type="timed|event|finish" output="outputa"
      timestep="0.5" />

Three values are possible for the type : timed|event|finish

  1. timed : observation is called at each time-step.
  2. event : observation is called after each DEVS transition (parameter time step is useless)
  3. finish : observation is called only once at the end of simulation (parameter time step is useless)


XML format for vle::value

VLE provides a set of classes for representing data in a polymorphic way. All these classes inherit vle::value::Value and there are used for DEVS external transitions, observations, experimental conditions and some plug-in. The XML syntax is:

The vle::value::Integer (encapsulate a C++ long integer)


The vle::value::Double (encapsulate a C++ double)


The vle::value::Boolean (encapsulate a C++ bool)


The vle::value::String (encapsulate a C++ std::string):

<string>this is a string.</string>

The vle::value::Table: a 2 dimension array of real (encapsulate a C++ boost::multi_array<2,double>):

<table width="4" height="2"> 0 1 2 3 4 5 6 7 </table>

The vle::value::Tuple: a 1 dimension array of real (encapsulate a C++ std::vector<double>):

<tuple> 1 2 3 4 5 6 7 8 9 10 11 12 </tuple>

The vle::value::Value: a 1 dimension array of values (encapsulates a std::vector<Value*>):


The vle::value::Map: a dictionary (encapsulates a std::map<std::string,Value*>):

  <key name="tutu"><integer>123</integer></key>
  <key name="tata"><double>123.654987</double></key>

The vle::value::Matix: a 2 dim. array of values (encapsulate boost::multi_array<2,Value*>):

<matrix rows="" columns="" rowmax="" columnmax="" rowstep=""
  <!-- rows * columns values -->

The vle::value::Xml: a Xml code (encapsulates a C++ std::string):

        [...] ### free data