To the target AWS ec2 apply the following changes:
-
Add the following
export
to ~/.profile:export MONGODB=mongodb://<username>:<password>@<database_host>:<port>/admin?readPreference=primary
-
After saving the file, ensure that the above exports are applied:
$ source ~/.profile
It is assumed that Python +3.6.5 has already been installed on the target ec2. What follows are instructions to install the simulation software.
-
Install the software:
$ git clone https://github.com/1057405bcltd/simulator.git
-
Create a Python virtual environment in the same folder:
$ python3.7 -m venv simulator
-
Activate the virtual environment:
source ./simulator/bin/activate
-
$ cd simulator
-
Prepare the simulator environment:
$ source ./Scripts/project
-
Install the required Python packages:
$ pip install -r Python/requirements.txt
Using whatever tool is available, create a document in the configurations
collection in the sim
database (documents must be uniquely named) that describes the details of the planned simulation.
ToDo: Describe the structure of configurations
documents.
Simulator execution is initiated as follows:
$ sim-load <config_name>
$ sim <config_name>
where <config_name> refers to the name of a configurations
document.
Output of a simulation run appears in the following collections:
simulations
: Top-level description of the simulation. Investigation of the consequences of a simulation run normally will begin with this collection.partitions
: A partition is effectively a sub-simulation working within a time subframe of a wider simulation.trades
: Detailed simulation results recorded by the ids of the simulation and partition in which the simulation trade was created.
The following command clears out the results of all simulations (it does NOT, however, delete documents from the configurations
collection).
$ clean