The Configuration section allows the user to control many of its parameters, initial conditions and general simulation settings. From now on, each set of values to all the required parameters, initial conditions and simulation settings is defined as one model configuration. Every time the user initiates a new LSD web interface (LWI) session, the default model configuration is automatically loaded. From the Configuration section, the user can change any value, load a saved configuration or save the current configuration to her computer.
Configuration values can be of three types: real (floating point) numbers, integer numbers and discrete options (like yes/no). All values have predefined ranges (maximum and minimums or a set of options) and the user is not allowed to input values outside such ranges (an error message is produced).
Please note that not all combinations of configuration values may be adequate for the proper model operation. If unexpected results are obtained after changing several values at once, please try to restore some of them to the default configuration (by pressing the Default button besides any changed value) and execute the simulation again.
Model parameters are predefined and fixed values that are used to compute the model equations. For instance, the user can change parameters to modify simulated agent’s behavioural rules or the applicable institutional rules.
Model initial conditions are the values assumed for variables which lagged values are required by the computation of model equations when the simulation starts.
Simulation settings are values defining the operation of the simulation. timeSteps control the simulation time span. numRuns define how many times the simulation is run (repeated), which allows the analysis of the results as a Monte Carlo experiment. rndSeed controls the initialization of the pseudo-random number generator (PRNG). When multiple simulation runs are set, the PRNG seed is increased by one each time.
Saving the current configuration
At any moment while in the Configuration section, the user has the option to save the current configuration. The configuration is always saved to the user’s computer disk/storage as it is not possible to save it in the LWI server. It is important to regularly save any changes made to the default configuration, as any unsaved information is irreversibly lost whenever the user session expires or is reset (by clicking on Reset Session in Reset section).
To save the current configuration, simply click on Download in Configuration section. A dialog window will open, asking for the name and the destination folder of the configuration file. Configuration files have CSV (comma-separated values) format and “.csv” extension.
Loading an existing configuration
An existing configuration file, previously saved using the Download option, can be loaded at any time, by clicking on Upload in Configuration section. A dialog window will ask for the file containing the saved configuration, assuming the default “.csv” extension.
Resetting all configuration values to the defaults
Clicking Reset All replaces the current configuration values with the default ones. Be careful to use it if you have configuration changes to be saved, as the existing values are lost. If required, click on Download before using this option.
The Execution section controls the execution of the simulation model in the LWI server. Model execution can take from a few seconds to several minutes, according to the selected configuration, in particular the chosen numbers of simulation time steps and runs.
Starting a simulation run
As soon as the user finishes the configuration of the model in the Configuration section, it is possible to start the execution by clicking on Start in the Execution section.
Stopping an unfinished simulation run
At any time the user may interrupt the simulation by clicking in Abort in the Execution section. Stopping the execution before the Status box shows “Simulation completed” aborts the simulation and no data is saved for analysis.
Checking the status of a running simulation
While the execution is going on, “Simulation running” is show in the Status box in the Execution section, together with the elapsed time. User can execute only one simulation instance at a time.
Viewing the simulation log
If there is any error preventing the simulation execution to complete, the Status box will show “Simulation failed” and the execution will be aborted and no data is saved for analysis. User can click on Log in Execution section to check the causes of the failure.
After the execution of the simulation model, when status box in the Execution section shows “Simulation completed”, the produced simulation time series will be available in the Analysis section.
The time series list
The user can select one or more series in time series list to be used when using the command buttons. Clicking once selects the time series and an additional click deselects it.
The time steps range selector
By default the commands in the Analysis section operate over all simulation time steps, from t = 1 to the number of time steps defined in the Configuration section. The user has the option to restrict the range of time steps to use in the analysis, by changing the default values in the Selected Time Steps box.
The scale options
The Scale box provide configuration to the scaling of the vertical axis of time series plots. The Auto option uses auto scaling to show the entire data range present in the series. The Manual option allows the user to select the minimum and maximum values for the vertical axis. The Log option uses a logarithmic scale (natural base) for the vertical plot axis, descriptive statistics and data table, instead of a linear one (Linear option).
The Monte Carlo (MC) plot bands
The MC-band options provide extra information for multi-run simulation plots. MC-bands are only available when numRuns, in Configuration section, is set to more than one run (at least 10 runs are recommended for sensible results). The Confidence option add a standard 95% confidence interval band to each series selected to plot. The Max-min option a band from the minimum to the maximum values obtained in the set of simulation runs.
Showing descriptive statistics
Clicking on Statistics in Analysis section creates a new browser window showing some descriptive statistics for the selected time series, including the mean, the standard deviation, the minimum and maximum values, the number of observations, and the Monte Carlo standard error (when the number of simulation runs is larger than one). If Log is selected, log values (natural base) are used in computations.
Creating data tables
Clicking on Data in Analysis section creates a new browser window containing a table with the selected time series in the columns and the time step values in the rows. If Log is selected, log values (natural base) are presented. At least one and up to 15 series can be selected at a time. However, multiple data windows may be open at any time.
Plotting time series
Clicking on Plot in Analysis section creates a new browser window with the selected time series plots. The horizontal axis represents the simulation time steps and the vertical axis, the selected series values. At least one and up to 15 series can be selected at a time. However, multiple data windows may be open at any time.
After an LWI simulation is successfully executed, the user can download the entire results data as (compressed) text file(s) in CSV (comma-separated values) format. CSV-formatted files can be easily imported in any numerical analysis software, like spreadsheets or statistical packages. File is compressed (zip format) only when there are results from more than one simulation run.
Saving the current configuration
As soon as simulation execution is finished, the results data file can be downloaded to the user’s computer. It is not possible to permanently save simulation results in the LWI server, so it is important to save relevant results before they are irreversibly lost whenever the user session expires or is reset (by clicking on Reset Session in Reset section).
To download any available results data, simply click on Download in Export section. A dialog window will open, asking for the name and the destination folder of the data file(s). Results files have the “.csv” extension by default and may be grouped inside a single compressed file with “.zip” extension.
The LWI data export format
LWI results data files may be zip compressed to allow downloading multiple files. Zip files can be easily decompressed in any platform.
Uncompressed CSV files are comma-separated text files. Columns contain single variables while lines represent variables values at each time step. However, the first line has a special meaning, being the first time step values located in the second line and so on. The first line contains the columns headers with the names of the variables in each column.
The Reset Session button discards any changes made by the user, including configurations, running simulations or results data, and initiates a new LWI session. All configuration values entered by the user is lost. Any executing simulation is aborted and the results, lost.