This repository contains the docker recipe to run the ICS project in a virtual environment.
- Download and install Docker Engine.
- Clone the repository.
- Build the docker image using the following command:
docker build -t ics_docker:latest .
- Note: This will take some time to build the image. The image size is around 2.9 GB.
- Note: The image name (ics_docker) and tag (latest) can be changed as per your preference.
- Run the docker image using the following command:
docker run -p 5901:80 -v <path_to_repository\data>:/home/data ics_docker:latest
- Note: Replace
<path_to_repository\data>
with the absolute path to the data folder in the repository. - Note: The port number
5901
can be changed as per your preference.
- Note: Replace
- Open a browser and navigate to http://localhost:5901 to access and interact with the virtual environment. This should provide a LXDE Ubuntu desktop environment.
- Now in this environment we need to run the scripts to generate the input files and run the simulation.
- Open the terminal:
Menu (bottom left corner) -> System Tools -> LXTerminal
- Run the following commands in the terminal to navigate to the home directory and run the ICS project:
cd /home bash run_full_model.sh
- This should generate the input files from agent factory and launch the netlogo 6.3.0 software. The input files will be generated in the
data/input
folder. The output files of the simulation will be generated in thedata/output
folder. - Note:
run_full_model.sh
script will run both the agent factory and netlogo modules. However, if you want to run the agent factory or netlogo modules individually, you can use therun_agent_factory.sh
andrun_netlogo.sh
scripts respectively. This way the netlogo software can be launched separately and the simulation can be run multiple times without having to generate the input files again.
- This should generate the input files from agent factory and launch the netlogo 6.3.0 software. The input files will be generated in the
- Open the terminal:
- Agent Factory :
src/Agent-Factory
- Contains the python script files required to generate the input files for the simulation.
- Netlogo Model :
src/Netlogo-Model
- Contains the netlogo model files required to run the simulation.
- Input Files :
data/input
- Contains the input files for the simulation generated from the agent factory.
- Please add any additional inputs in this folder (ex: IP files).
- Output Files :
data/output
- Contains the output files from the netlogo simulation.
- Simulation State:
data/state
- Contains the state of the simulation. This file can be used to resume the simulation from a previous state. These state files are generated by the export world button in the netlogo interface.
Dockerfile
: Dockerfile- Contains the recipe to build the docker image.
- Provides a VNC based virtual environment to interact and simulate the ICS project.
run_agent_factory.sh
: for generating input files- Contains the script to run the agent factory script inside the docker environment.
run_netlogo.sh
: for launching netlogo simulation- Contains the script to run the netlogo model inside the docker environment.
run_full_model.sh
: for running the full model- Contains the script to run the full model (Agent Factory + Netlogo) inside the docker environment.