Back to Documentation/Plugin/Task

Plugin for sensitivity analysis using R

The purpose of this plugin is to give access to some sensitivy analysis methods available in the R platform. In this first version, we have integrated the fast99 method.

You can load this plugin in the console, see documentation.

The plugin needs the R software. For now, you have to run R with the Rserve mode. We except to embed a prebuilt R distribution using recent virtualization task (see last blog entry).

Take a look at this sample script:

sensitivity.addFactor("f1", Double, new RFunctionDomain("qunif","-pi","pi"))
sensitivity.addFactor("f2", Double, new RFunctionDomain("qunif","-pi","pi"))
sensitivity.addFactor("f3", Double, new RFunctionDomain("qunif","-pi","pi"))

modelTask = new GroovyTask("model")
modelTask.setCode('sleep(2)\ny = Math.sin(f1) + 7.0 * Math.pow(Math.sin(f2), 2) + 0.1 * Math.pow(f3, 4) * Math.sin(f1)')
sensitivity.setModelTask(modelTask)

reportTask = new GroovyTask("report")
reportTask.setCode('println "First order = ${I1}"\nprintln "Total order = ${It}"')
sensitivity.setReportTask(reportTask)

execution = sensitivity.fast99(1000)
execution.start()

This script produces such a workflow:

Indeed, the plugin provide a worflow when you have only to put:

  • your factors
  • the task for running your model (should provide a y variable as output)
  • a task for dealing with the computed indices

logo cemagref

logo iscpif

logo lifegrid

logo region auvergne

logo patres project