Groovy is a high level scripting language based on Java. Its syntax is similar but very simpler thus allowing to write scripts very quickly.
Menu tools→Groovy Console
import capsis.script.C4Script import capsis.kernel.Step; import capsis.kernel.Engine; import maddmodule.script.* // Simple use of the maddmodule s = new C4Script("maddmodule") s.init(new MaddInitialParameters (s.getModel(), s.getDataDir() + "/maddmodel/A.inv")) result = s.evolve(new MaddEvolutionParameters (200)) // Display scenario in Capsis s.updateGUI();
Groovy scripts can be executed directly from the command line without starting the capsis GUI. The scripts are compiled on the fly.
Convention : groovy script should be placed in the myscripts
directory
Windows
capsis -p groovy bin\maddmodule\myscripts\maddscript.groovy
Linux
sh capsis.sh -p groovy bin/maddmodule/myscripts/maddscript.groovy