Local Installation

This section describes how to install the FRED Local product using the local installation script on MacOS and Ubuntu systems. If you are looking for an installation solution on another system, please see the alternative instructions using Docker.

Note

The FRED simulation environment is supported on Ubuntu and Mac environments at this time. If you are using a Windows machine, we recommend setting up Ubuntu for Windows per the instructions at https://ubuntu.com/wsl.

Before you install FRED Local, please review the installation requirements.

Installing FRED

This section installs FRED locally, which requires that the FRED synthetic population is available. We also download some FRED models to help verify the installation.

run the FRED installer

For this step you will need the FRED installer which should have been provided to you. Please contact our team at help@epistemix.com if you need help obtaining a new installer. The installer comes as a compressed archive file ending in .tar.gz. If this file is in your Downloads directory, you can move it to your home directory and rename it fred-installer.tar.gz. For example, for FRED version 7.10.0:

$ cd $HOME
$ mv ~/Downloads/fred-7.10.0-macos-M1.tag.gz ./fred-installer.tar.gz

Note

You may have downloaded your installer to a different location than what is assumed above.

Warning

Make sure you have the installer specific to your operating system.

Assuming you have renamed your installer fred-installer.tar.gz, the following steps unpack this file into a directory called tmp that is created as a part of these steps.

This assumes the installer file is in the $HOME directory.

$ cd $HOME
$ mkdir tmp
$ tar -xvf fred-installer.tar.gz --directory $HOME/tmp
. . .
$ cd tmp
$ scripts/install-fred-zip

Success: Installation of FRED complete

**Important**
In order to use FRED you must either
1. Open a new terminal tab or
2. Run the following command: source "/home/jane/.zshrc"

Next Steps:
- Run fred_version to verify your installation.
- Visit our docs: https://docs.epistemix.com/

$ source /home/jane/.zshrc

The installer updates the local .zshrc or .bashrc file so that FRED is initialized whenever a terminal window is opened.

optional: download model tutorials

Epistemix provides a public Tutorials repository with a collection of models that demonstrate essential features of the FRED Modeling Language. The documentation for these models is part of the Epistemix Documentation and you can download this repository from GitHub.

$ cd $FRED_HOME/models
$ git clone https://github.com/Epistemix-com/FRED-tutorials.git
Cloning into 'FRED-tutorials'...
remote: Enumerating objects: 300, done.
remote: Counting objects: 100% (300/300), done.
remote: Compressing objects: 100% (175/175), done.
remote: Total 300 (delta 176), reused 231 (delta 120), pack-reused 0
Receiving objects: 100% (300/300), 2.14 MiB | 6.32 MiB/s, done.
Resolving deltas: 100% (176/176), done.

Verifying the Installation

Now that FRED is installed and available, we can run the sample model to verify that everything is configured correctly. Running a model will access the synthetic population files as well.

verify configuration

We can check that FRED is installed and available by running commands from the FRED Simulation Information Management System (SIMS), which is documented at FRED SIMS. We will verify that the fred_version and fred_job commands both work.

$ fred_version
7.10.0
$ fred_job
usage: fred_job [ -h | -f | -k key | -K key with directory naming (overrides -k) |
-p main.fred | -s start_run_number | -n end_run_number | -m cores | -S | -R restartfile
| -w 0]

If a problem is found, an error message will appear instead.

run a sample model

Now that FRED is configured, you can execute the sample model in the FRED-tutorials directory. We extracted this into the $FRED_HOME/models directory.

You will see a few models in the directory. While any of these can be used, in our example we will use the model in the simpleflu directory, which simulates a pandemic influenza strain in Jefferson Country, Pennsylvania.

By convention, the initial FRED program file for a model is called main.fred and a sample run script file to test the model is called METHODS. The following command executes the METHODS script found in the FRED-tutorials/simpleflu directory within the container. A successful output is shown.

$ cd $FRED_HOME/models/FRED-tutorials/simpleflu
$ ./METHODS

fred_job: starting job simpleflu at Wed Mar 10 15:47:35 GMT 2021

fred_compile -p main.fred
No errors found.
No warnings.

fred_job: running job simpleflu id 55 run 1 ...
fred_job: running job simpleflu id 55 run 2 ...
run_set 0 completed at Wed Mar 10 15:47:37 GMT 2021

fred_job: running job simpleflu id 55 run 3 ...
fred_job: running job simpleflu id 55 run 4 ...
run_set 1 completed at Wed Mar 10 15:47:39 GMT 2021

fred_job: finished job simpleflu 55 at Wed Mar 10 15:47:40 GMT 2021

fred_plot: image_file = daily.pdf
fred_plot: image_file = weekly.pdf

If you run this command more than once, you will see a call to fred_delete in the output as well, which deletes the output from the prior run. This output is not shown here.

The METHODS file calls fred_plot, which creates an image of the results as a PDF file. This and other tutorials are discussed in the FRED Language Tutorials available on the Epistemix Documentation site. Here, the PDF files daily.pdf and weekly.pdf are created in your model directory. You can display these by opening the PDF files directly or in the viewer of your choice to see the results of this simulation.

$ cd $FRED_HOME/models/FRED-tutorials/simpleflu
$ open daily.pdf
$ open weekly.pdf

Next Steps

At this point, your FRED Local installation is complete, verified, and ready! As a next step, new FRED users may want to review more of FRED platform and language documentation on the Epistemix Documentation site.