Skip to contents

evoland-plus uses Dinamica EGO as its spatial allocation engine. This vignette explains how to install it so the package can find and use it.

Platform Support

Warning

Dinamica EGO is distributed as a Linux x86 / amd64 AppImage and a Windows installer. It does not run on ARM architectures (e.g. Apple Silicon, Raspberry Pi) or on macOS. The Linux AppImage path described in this vignette is well-tested; the Windows installer has not been tested with evoland-plus.

If you are on an unsupported platform, your best option is to build the Docker image from https://github.com/ethzplus/rocker-geospatial-dinamica/. Because Dinamica EGO cannot be redistributed, the image is not pre-built; you must clone that repository and build it locally. The evoland-plus repository ships a devcontainer configuration, so once the image is built you can open the project directly inside the container from VS Code or any other IDE that supports the devcontainer specification — just make sure a Docker-compatible runtime is running first (e.g. Docker Desktop, OrbStack, Colima, or Portainer).

Installing on Linux x86 / amd64

The steps below mirror the Dockerfile used to build the official container image.

1. Download the AppImage

Download Dinamica EGO 8 from https://dinamicaego.com/dinamica-8/ and save it as DinamicaEGO.AppImage.

2. Extract the AppImage

AppImages are self-contained archives. Run the following to extract Dinamica’s contents into a squashfs-root subdirectory:

chmod +x DinamicaEGO.AppImage
./DinamicaEGO.AppImage --appimage-extract

3. Place the files in /opt/dinamica

Move the contents of the extracted squashfs-root directory (not the directory itself) into /opt/dinamica:

sudo mkdir -p /opt/dinamica
sudo mv squashfs-root/* /opt/dinamica/

4. Install the bundled R package

Dinamica ships its own R package inside the installation directory. Using remotes::install_local() is recommended because it automatically resolves and installs the package’s dependencies (listed in its DESCRIPTION file). The alternative — R CMD INSTALL — would require you to find and install each dependency by hand first.

Rscript -e "remotes::install_local(
  list.files(
    '/opt/dinamica/usr/bin/Data/R',
    pattern = 'Dinamica_.*.tar.gz',
    recursive = TRUE,
    full.names = TRUE
  )
)"

5. Set the required environment variables

Add the following lines to your shell profile (e.g. ~/.bashrc, ~/.profile, or ~/.zshenv for Zsh users) so they are set for every session, then reload the profile or log out and back in:

export DINAMICA_EGO_8_INSTALLATION_DIRECTORY="/opt/dinamica/usr/bin"
export DINAMICA_EGO_CLI="/opt/dinamica/usr/bin/DinamicaConsole"
export DINAMICA_EGO_8_HOME="/opt/dinamica"
export DINAMICA_EGO_8_TEMP_DIR="/tmp/dinamica"
export PATH="$PATH:/opt/dinamica/usr/bin"

Note

LD_LIBRARY_PATH does not need to be set manually. evoland automatically prepends /opt/dinamica/usr/lib (derived from DINAMICA_EGO_8_HOME) to LD_LIBRARY_PATH when it invokes DinamicaConsole, so your system-wide library path is never affected.

Create the temporary directory Dinamica uses at runtime:

mkdir -p /tmp/dinamica

6. Create the Dinamica configuration file

Dinamica looks for a per-user configuration file in your home directory. Create ~/.dinamica_ego_8.conf with at least the following content. The AlternativePathForR key must point to the Rscript binary that evoland uses; verify the correct path with which Rscript in your terminal and update the value accordingly. Adjust the CRAN mirror if you prefer a different one:

AlternativePathForR = "/usr/local/bin/Rscript"
ClConfig = "0"
MemoryAllocationPolicy = "1"
RCranMirror = "https://cloud.r-project.org/"

7. Verify the installation

Check that Dinamica can be found on the PATH:

DinamicaConsole --version

You should see version information printed to the terminal. From R, run the Dinamica-specific test file that ships with evoland to confirm the full integration works:

library(evoland)
tinytest::run_test_file(
  system.file("tinytest", "test_util_dinamica.R", package = "evoland")
)

Alternatively, run the full test suite (takes longer but validates the complete installation):

tinytest::test_package("evoland")

Troubleshooting

DinamicaConsole: command not found
Make sure /opt/dinamica/usr/bin is on your PATH and that you have reloaded your shell profile.
Shared library errors (libXXX.so not found)
evoland sets LD_LIBRARY_PATH to $DINAMICA_EGO_8_HOME/usr/lib for every DinamicaConsole call. If you still see library errors, verify that DINAMICA_EGO_8_HOME is set correctly with echo $DINAMICA_EGO_8_HOME and that the shared libraries exist under that path.
Dinamica falls back to the anterior LULC map with a warning
The DINAMICA_EGO_CLI environment variable is not set or points to a wrong path. Double-check the path with echo $DINAMICA_EGO_CLI and that the file is executable.