Hybrid model for controlling the spread of tuberculosis (TB) in a Multi-scale environment. Implemented using GAMA PLATFORM
- Download and Install GAMA: Ensure you have the latest version of the GAMA platform installed on your computer. You can download it from the official GAMA website (https://gama-platform.org).
- Open GAMA: Launch the GAMA application.
- Create a New Model: Go to the File menu and select New Model. This will create a new .gaml file.
- Write or Import Your Code: You can either write your code directly in the GAMA editor or import your existing .gaml file using the Import option in the File menu. The .gaml file in this project is nammed MetaPop_HybridTB.gaml
- Set Up Your Experiment: Define the parameters of your experiment in the code, such as the number of agents, environmental settings, etc.
- Run the Model: After importing the code, click the Run button in the toolbar to start the simulation. You can also press F11.
- Visualize the Results: Watch the results of the simulation in the various visualization tabs offered by GAMA (graphs and/or maps for this project).
- Adjust and Iterate: If necessary, adjust the code and rerun the simulation to observe the changes.
GAMA 1.6 or ++
To run these source codes, download GAMAPLATFORM 1.6 or ++ url: https://gama-platform.github.io/download for free. Please be sure that you have JDK or JRE installed in your system. Create a new model and copy/paste the model to your GAMA, File : MetaPop_HybridTB.gaml
Using RStudio
- Open RStudio: Launch RStudio on your computer.
- Open the R Script: Click on File > Open File... and select your .R file.
- Run the Script: You can run the entire script by clicking the Source button at the top of the script editor, or run individual lines by placing the cursor on the line and pressing Ctrl + Enter (Windows/Linux) or Cmd + Enter (Mac).
Using the Command Line
- Open Terminal: Open your terminal or command prompt.
- Navigate to the Directory: Use the cd command to navigate to the directory containing your .R file.
- Run the Script: Use the Rscript command followed by the name of your file.
Using Visual Studio Code
- Install R and VS Code: Ensure you have R installed on your system and Visual Studio Code (VS Code) installed.
- Install R Extension: In VS Code, go to the Extensions view (Ctrl + Shift + X), search for "R", and install the R extension.
- Open the R Script: Open your .R file in VS Code.
- Run the Script: You can run the script by clicking the Run button or using the command palette (Ctrl + Shift + P) and selecting Run Source.
Using R GUI
- Open R GUI: Launch the R GUI on your computer.
- Open the R Script: Click on File > Open Script... and select your .R file.
- Run the Script: Click on Edit > Run all to execute the entire script.
Each of these methods allows you to run R scripts effectively, depending on your preferred environment.