The ARTIS model codebase. This repository contains the demo version and the full model.
This project uses Python 3.10.9 which can be downloaded here and RStudio which can be downloaded here.
It should take approximately 10 minutes to run this full installation.
NOTE: This protocol may not be successful for every individual local machine. The interaction in package versions and computer architecture (i.e. arm64 M1, M2 chips) may complicate this virtual environment set up. We are working on setting up a portable docker image to increase the reproducibility of this code.
pwd
in the terminal.python3 -m venv [RESULT FROM pwd]/venv
(ie. python3 -m venv /home/artis-model/venv
)source venv/bin/activate
in terminal.pip3 install qpsolvers
in terminal.pip3 install quadprog
in terminal.pip3 install cvxopt
in terminal.pip list
.deactivate
in terminal.Note: You only need to install the solvers the first time you run this code. Warnings about the latest version of pip may also appear during the installation - these are okay, but errors are not.
Running the demo for the ARTIS model should take approximately 10 minutes. To run the demo for ARTIS run the 02-artis-pipeline.R
script and then run the 04-build-artis-timeseries.R
script.
The outputs of the demo will appear in the demo/outputs
directory. Within this folder demo/outputs/custom_ts
will contain all the final files that if run on the full model inputs would be used to create the results of the ARTIS research paper.
Please find below descriptions of main files:
demo/outputs/custom_ts/mid_custom_ts.csv
: This is the demo version of the main ARTIS trade records table.demo/outputs/custom_ts/summary_consumption_midpoint.csv
: This is the demo version of the main ARTIS seafood consumption records table.The following diagrams describes how ARTIS trade records are obtained.
The following diagrams describe the how the codebase follows the workflow illustrated above.