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
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. While updating these files, you should also take into account the modifications you performed.
Update the cmake scripts.
a) In the directory
mypkg/cmake, remove all files and add all files are here:
b) Replace the file
mypkg/CMakeLists.txt by this one
Update the project name : replace
MyProject into the line
by your package name. Uncomment all extensions you need for your package, eg.
remove the symbol # in front of
VLE_CHECK_PACKAGE(DIFFERENCE_EQU vle.extension.difference-equation) ..... if (NOT DIFFERENCE_EQU_FOUND) message(SEND_ERROR "Missing vle.extension.difference-equation") endif (NOT DIFFERENCE_EQU_FOUND)
c) Replace the file
mypkg/src/CMakeLists.txt with the file here
Into this file declare the dynamics you compile for example replace the line
DeclareDevsDynamics(Simple "Simple.cpp") by :
DeclareDifferenceEquationDynamics(Mymodel "Mymodel.cpp") DeclareFsaDynamics(MymodelFsa "MymodelFsa.cpp")
Update the cpp files into
a) replace macros
Only one dynamic can be defined into a library. If you have more than one of
these macro (for example also
DECLARE_DYNAMICS_DBG), you should split them
into different cpp files and declare as many as dynamics as those files
b) if the dynamic uses the random number generator
utils::Rand, it has to be
declared as a class member of the dynamic because PRNG is not provided at the
level of the simulation. So add a class member to your dynamic.
#include <vle/utils/Rand.hpp> ... vle::utils::Rand mrand;
c) replace all occurences of
d) many includes have changed : no more global include for value, utils, devs… For example :
#include <vle/value.hpp> with
#include <vle/value/Matrix.hpp> if
you intend to use matrices.
#include <vle/utils/DateTime.hpp> if
you need to convert dates
This is also true for extensions, which are now part of packages: For example,
#include <vle/extension/DifferenceEquation.hpp> with
e) replace the call to
(mainly in Decision and Executive extensions)
Update the vpz files into
a) using a text editor, remove the xml tag for replicas, remove a line which looks like :
<replicas seed="581869302" number="1" />
b) update the output tag to point output plugins to vle.output ; e.g : replace
<output name="vueHorloge" location="" format="local" plugin="file" >
<output name="vueHorloge" location="" format="local" package="vle.output" plugin="file" >
c) update the dynamics : set the name of the package and the library. The tag “Model” is no more used because there is only one dynamic by library