Table of Contents

Automation

What is it ?

An Automation is a mechanism to replay a specific scenario which has been already defined. Automation can be used :

Automation supports input variations. This allow to play the same scenario with different parameters combination. This can be usefull to do for instance a sensitivity analysis on a particular model.

Create an Automation

  1. Create your scenario as usual
  2. Export your scenario : Menu Project → Automation → Export/Run

GUI

Menu Project → Automation → Import

Plan

Variable

You can use internal variable in the string values:

To generate a list of values at once, use the following syntax: [inf:sup:step]. Example: [2.0:3.0:0.2] will generate 2.0, 2.2, 2.4, 2.6, 2.8.

Console mode

To run an automation with 4 threads

Under linux:

sh capsis.sh -p automation tmp/test.xml 4 output.txt

Under windows

capsis -p automation tmp/test.xml 4 output.txt

Convert a model to support automation

Adapt the model

See model architecture and Convert an old architecture module to the new architecture

Adapt the InitialParameters and the EvolutionPameters class

The 2 classes should implement the interface Automatable

The class fields should be annotated to define how they should be processed.

Use the @Ignore annotation if a class field should not be considered as a parameter.

You will need to add these imports:

Exemple

class MyInitParam extends AbstractSettings implements  InitialParameters, Automatable {
 
   @Param
   public String filename;
 
   @RecursiveParam
   public PlotDescription plotDesc;
 
   @ListParam
   public List<TreePosition> treePositions;
 
   @Ignore
   public GScene stand;
 
}

Adapt the Extensions

The extension classes should also implement the Automatable interface. Class field should also be annotated.

Note : PaleoExtension are not supported.