Skip to contents

Prerequisites for Model Building

See the Sections below for instructions. Short summary of what they do:

  • Install the GNU Scientific Library
  • The auto-generation of code for each model is done using the shell script in icpm-kth/RPN-derivative; that package has several methods for analystic (symbolc) math (the thing that computer algebra systems do), either of this is OK in most cases:

Pick One

maxima is optional

# macOS has a lot of issues with xcode, it loves it for some reason; maybe agree to xcode license
brew install pkg-config gcc gsl maxima
# other linux distributions have some version of this:
# zypper install, apk add, guix install
sudo apt install pkg-config gcc libgsl-dev maxima

Analytical derivatives and Model Code Generation

You may have to adjust this to fit your specific circumstances (do you use zsh? Does it parse .profile?)

git clone https://github.com/icpm-kth/RPN-derivative.git
cd RPN-derivative
make
dir=`pwd`
mkdir -p ~/.local/bin && ln -s "$dir/sh/ode.sh" "$HOME/.local/bin/ode"

RPN-derivative contains a c program that can calculate simple derivatives, it can be installed like this:

# this installs the derivative program in RPN-derivative
make && make test
sudo make install

The ode.sh script will work regardless of whether you run make, but without the above block the --maxima or --yacas backend options are mandatory.

Installation of the R packages

# requires the 'remotes' package
if (!require(remotes)) install.packages(remotes)
remotes::install_github("icpm-kth/SBtabVFGEN",dependencies=TRUE)
remotes::install_github("icpm-kth/rgsl",dependencies=TRUE)
remotes::install_github("icpm-kth/uqsa",dependencies=TRUE)

MPI

If you want to run on several nodes of a cluster via MPI (debian/ubuntu):

sudo apt install libopenmpi-dev

and in R: