====== Installing/running ====== This page describes how to run AmapSim simulator (named gaspp in Linux world and gaspp.exe in windows world) from a command prompt window. It may be convenient to use this policy when intending to perform many automatic simulations through scripts. Nevertheless, most of the time, newprg will allow a more confortable way to run simulations. ===== Syntax ===== there are two calling syntax :\\ Single simulation command : gaspp plant age [seed] [-sGeomSimplification] [-STopoSimplification [-deltaDelta]] [-g[step]] [-gl[step]] [-a[step]] [-oOutputFileName] [-cModule [-eModuleData]] [[-fsstep] -foCustomOutputFormat] [-beginx] [-posxx] [-posyx] [-poszx] plant : name of the plant (if single name, .cfg file will be used for parameter file location) age : age to be computed seed : random number initialisation number -s : GeomSimplification is the simplification level on geometrical output (from 0 to 4, default 1) -S : TopoSimplification is the simplification level on topological computing (from 0 to 3, defoault 0) -delta : birth date threshold to build simplified classes step : output step (only at simulation end by default) -o : output to a particular OutputFileName file (without extension), this MUST be a complete path/filename -g : output linetree format -gl : output opf format -a : output mtg format -n : output natFX format -c : dynamicaly link the module file Module to the simulation kernel -e : provide the current Module with ModuleData as private data configuration file -swap : change bytes output order (switch between little and big endian -fo : load a custom output format module -fs : custom output step -posx : the x world position of this plant (0 by default) -posy : the y world position of this plant (0 by default) -posz : the z world position of this plant (0 by default) -begin : the absolute beginning time for growth simulation (0 by default) Multiple simultaneous simulation command gaspp Scene Scene : a text file describing a scene which means that each line consists in a single command For instance : gaspp "d:/myplant.fpa" 30 1 would compute (in a windows world) the plant species described in the file //d:/myplant.fpa// up to age 30 with random seed 1. There will be no output. gaspp "d:/myplant.fpa" 30 1 -s0 -g2 -o"d:/myOutput/plant" would compute the same plant with geometrical simplification level 0 and output to an internal format every two computing steps. The output will be saved in directory //d:/myOutput// to files with name //plant_xx_1.lig// where xx is the current simulation step age. gaspp "d:/myplant.fpa" 30 1 -S2 -gl -o"d:/myOutput/plant" would compute the same plant with topological simplification level 2 and output to opf format at the end of simulation in a file named //d:/myOutput/plant_30_1.opf//. gaspp "/home/me/parameterFiles/myplant.fpa" 30 1 -S2 -a -o"/home/me/myOutput/plant" -c"/usr/local/bin/light.so" -e"/home/me/data/lightparameter.txt" would perform the same computing (in a linux world) connecting the executable plug-in file ///usr/local/bin/light.so// that uses its own data coming from file ///home/me/data/lightparameter.txt//. The output will be stored in the file ///home/me/myOutput/plant_30_1.mtg// gaspp "d:/myScene.txt" would run a multiple simulation configured in the scene file //d:/myScene.txt//. A scene file is a text file where each line describes a single simulation command. It is important to anderstand that every simulations will be carried out using the same scheduler thus mimicing a simultaneous growth of some individual plants. This feature allows to think about simulating competition between growing plants. Here is an example of a scene file : #plant simulation gaspp D:\merisierv20.fpa 30 0 -gl -s0 -cd:/thevitisnew/release/light.dll -ed:/lightParameter.txt -od:/mir/opf/plant1 posx1 posy1 gaspp D:\merisierv20.fpa 30 0 -gl -s0 -cd:/thevitisnew/release/light.dll -ed:/lightParameter.txt -od:/mir/opf/plant2 posx5 posy1 gaspp D:\merisierv20.fpa 30 0 -gl -s0 -cd:/thevitisnew/release/light.dll -ed:/lightParameter.txt -od:/mir/opf/plant3 posx1 posy5 gaspp D:\merisierv20.fpa 30 0 -gl -s0 -cd:/thevitisnew/release/light.dll -ed:/lightParameter.txt -od:/mir/opf/plant4 posx5 posy5 In this file, any line beginning with a '#' will be skipped. The 4 plant simulation commands will simulate 4 different plants described in the file //D:\merisierv20.fpa//. Each of them will be simulated up to 30 with a random seed 0; an output in opf format to file //d:/mir/opf/plantx_30_0.opf//; and a position on the corner of a square. The core simulator will be connected to the //d:/thevitisnew/release/light.dll// plug-in with light data in the file //d:/lightParameter.txt// (see the light plug-in for more details). ===== Environment variable setup ===== To be ready to run, your system must be aware of the software location. If the software does not run at all (//file not found//) or if it has strange behaviour, this may come from non-accurate environment variable setting. Here are some advice on how to check and adapt it. Under Linux system you should check that both environment variable //PATH// and //LD_LIBRARY_PATH// are correctly set. To do so, open a shell window (Xterm, terminal) from the desktop menu bar and type the command : echo $PATH; echo $LD_LIBRARY_PATH You should see something looking like : .:/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin .:/home/me/bin:/usr/local/lib:/usr/lib If you don't see in both lines the path to the AmapSim installation directory, you will have to add it. To do so, have a look to this web page : https://www.cyberciti.biz/faq/set-environment-variable-linux/ Assume your AmapSim software installation directory is : ///home/me/bin//, after configuration, the same command should display something like : .:/home/me/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin .:/home/me/bin:/usr/local/lib:/usr/lib Under Windows system you should check that environment variable //PATH// is correctly set. To do so, open a cmd window and type echo %PATH% You should see something looking like : C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Common Files\SYSTEM\MSMAPI\1036 If you don't see in the line the path to the AmapSim installation directory, you will have to add it. To do so, have a look to this web page : https://www.ditainfocenter.com/eclipsehelp/index.jsp?topic=/ditaotug_top/installing/windows_settingenvvariables.html