admin:math [Promethee]

Math. engine installation guide

The math. engine is a necessary component for the front-end interface. It is used for all numerical evaluations, as well as formulas or functions interpretation. It relies on the [R] software (see http://www.r-project.org), plus a remote call component named Rserve (see http://www.rforge.net/Rserve/).Nevertheless, it is possible to host this R/Rserve components on a remote machine, and to configure the front-end consistently using the R.server= key in the properties file.

[R] installation

[R] is available for following systems, in both 32 and 64 architectures :

Rserve installation

It is also necessary to install the Rserve library (version > 0.6), one of these ways:
  • automatically at first startup of Promethee (regular way) ⇒ internet connection needed
  • manually using install.packages(“Rserve”) command from your R environment previously installed ⇒ internet connection needed
  • manually with the installation archive from http://cran.r-project.org/web/packages/Rserve/index.html and then using some install.packages(“C:\tmp\Rserve_0.6-xxx.zip”) command from R environment ⇒ internet connection NOT needed
Alternatively, using Linux you can try the apt-get or yum packages manager, but take care that you must use a recent enough version of Rserve.

R as service (remote server)

Once R & Rserve installed on a remote server, you can setup basic script:
  • /opt/Rserve/Rserved
#!/bin/bash
echo " * Starting Rserve ..."
start-stop-daemon --start --chuid myuser --exec /opt/Rserve/Rserve.sh > /tmp/Rserve.log 2>&1 &
echo " * Rserve is running."
exit
  • /opt/Rserve/Rserve.sh
#!/bin/bash
/usr/bin/R CMD /usr/lib/R/bin/Rserve --vanilla --RS-conf /opt/Rserve/Rserve.conf
  • /opt/Rserve/Rserve.conf
remote enable
fileio enable
and then enable at startup: ln -s /opt/Rserve/Rserved /etc/rc2.d/S99Rserve

FAQ

Why do you need an external math. engine for Promethee ?

What are the advantages of hosting R/Rserve on a remote machine or directly on the front-end ?

1) We recommend to use the previous repository of R-project, instead of your distro default one. Usually, the common Linux distributions are not up-to-date and lead to some incompatibility.
© IRSN - All right reserved - Legal information