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-extract3. 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_PATHdoes not need to be set manually.evolandautomatically prepends/opt/dinamica/usr/lib(derived fromDINAMICA_EGO_8_HOME) toLD_LIBRARY_PATHwhen it invokesDinamicaConsole, so your system-wide library path is never affected.
Create the temporary directory Dinamica uses at runtime:
mkdir -p /tmp/dinamica6. 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 --versionYou 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/binis on yourPATHand that you have reloaded your shell profile. - Shared library errors (
libXXX.so not found) -
evolandsetsLD_LIBRARY_PATHto$DINAMICA_EGO_8_HOME/usr/libfor everyDinamicaConsolecall. If you still see library errors, verify thatDINAMICA_EGO_8_HOMEis set correctly withecho $DINAMICA_EGO_8_HOMEand that the shared libraries exist under that path. - Dinamica falls back to the anterior LULC map with a warning
-
The
DINAMICA_EGO_CLIenvironment variable is not set or points to a wrong path. Double-check the path withecho $DINAMICA_EGO_CLIand that the file is executable.