User Tools

The Capsis training online

Back to the table of contents

10. Create a new module in Capsis called training

Purpose: use the ant create-module tool to automatically create a new module in Capsis for this exercise session


  • open a terminal, use cd to move in directories
  • move to the practice/capsis4/ directory. This is the Capsis installation directory, all commands below must be typed from here.
  • type and adapt this command before validating (you may keep training and Tra and adapt the 2 others):

// For Windows:
ant create-module -Dname=training -Dprefix=Tra -Dauthor=F._de_Coligny -Dinstitute=INRAE

// For Linux/MacOS:
sh ant create-module -Dname=training -Dprefix=Tra -Dauthor=F._de_Coligny -Dinstitute=INRAE

  • open in an editor (e.g. Textpad, Gedit…) the file capsis4/etc/capsis.models and check the file contains a new entry for your module
  • customise the file localised in capsis4/src/training/, type and description may be changed freely, do not change the rest
  • compile Capsis, including your new module with ant compile, we are expecting a final BUILD SUCCESSFUL:
// Windows:
capsis4> ant compile

// Linux/MacOSX:
capsis4> sh ant compile
  • run Capsis to check the new module
// Windows:
capsis4> capsis

// Linux/MacOSX:
capsis4> sh
  • in Capsis, go to the Help menu, then select About Capsis and select Training in the list. You can see informations about the Training module
  • test the new module under Capsis…
    • Project > New, then choose the Training module and click on the Initialize button.
    • load an input file: capsis4/data/training/training.inv or capsis4/data/template/template.inv (if I removed training.inv by mistake ;-)
    • or load a file created during the Java exercises session: trees.txt

Project creation Model initialisation

  • Click Ok → the initial scene is built and the project appears with its root Step
  • On the left panel of the Capsis main frame, searxh the viewer Called 2D Viewer and double-click it to open it on the current simulation Step

A simple viewer showing the root Step

Back to the table of contents

10._create_a_new_module_in_capsis_called_training.txt · Last modified: 2021/02/03 08:46 by coligny