Sibilla Shell - quasylab/sibilla GitHub Wiki
Sibilla Shell is a command line interpreter that can be used to interact with the Sibilla core modules and permits performing all the available analysis. This front end can be either used interactively or in a batch mode to execute saved scripts.
To use this front-end, the installation of Sibilla on the host is required.
To use Sibilla Shell via CLI, go to folder shell/build/install/sshell/bin
in the terminal and then type sh sshell
.
A command line interpreter should open, along with the string Simulation environment created
. Now the shell is ready to work.
In the table below, the full list of available command for the shell is presented.
Command Name | Description |
---|---|
modules |
This command shows the list of available modules |
module <name> |
This command loads the module with the given name |
load <filename> |
This command loads the specification from the given file name. This command fails if no module has been yet selected |
env (or environment ) |
This command shows the current assignment of parameters |
set "<name>" <real> |
This command sets the given parameter to the given value |
clear |
This command resets the shell content |
reset "<name>" |
This command resets the given parameter to the default value |
states |
This command shows the list of initial configurations |
init "<name>" |
This command sets initial state to the given value |
replica <num> |
This command sets the number of simulation replicas |
deadline <real> |
This command sets the simulation deadline |
dt <real> |
This command sets the sampling time |
measures |
This command shows the list of available measure |
add measure "<name>" |
This command adds the given measure to the ones collected during the simulation |
add all measures |
This command adds all the available measures to the simulation |
remove measure "<name>" |
This command removes the given measure from the ones collected during the simulation |
remove all measures |
This command removes all measures from the simulation |
save output "<output_folder>" prefix "<prefix>" postfix =<"postfix"> |
This command saves the collected results in the given folder. Each measure will be saved in a csv file named <prefix><measurename><postfix>.csv . The generated file will contain three columns with: time of sampled value, mean, variance and standard deviation |
run "<script_file>" |
This command executes the script in the given file name |
quit |
This command terminates the execution |
In this section an example session of the SIR model is used to show how to use the shell interpreter.
> module "population"
> load "seir_path/seir.pm"
> init "initial"
> add all measures
> deadline 100
> dt 1.5
> replica 100
> simulate
> save output "./results" prefix "sir" postfix "__"