Skip to main content

General Ecosystem Modelling Framework

Project description

General Ecosystem Modeling Framework

GEMF is a ecosystem modelling framework written in python. It is designed to offer an easy to use method for modelling ecosystems with low- to intermediate complexity.
The framework offers the functionality to handle non-equilibrium, non-linear interactions. For the typical use-cases, user do need to write any code but only provide a model configuration. The use-cases can easily be extended with simple user written functions without needing to change any of the framework code.
The framework offers an easy to use method that fits any parameter of the model to mimic the studied system. For simplicity, the current version of the framework is limited to non-spatially resolved models (box-models).

Installation

On Linux

Python and its package manger (pip) should be preinstalled. Hence, it can simply be installed through:

pip install gemf

On Windows:

Get the latest python version from here. For example the 3.8.3 version installer This also installs pythons integrated package manager (pip).
Then, the following install command can be used in windows "powershell":

python -m pip install gemf

Quick Start

See examples.py. For a set of exemplary framework configurations see configuration_files

Usage

import gemf as 

# A model configuration is defined in a yaml file. To read this file:
model = gemf.load_model_configuration('path/to/model_configuration.yml')

# To draw a graph visualizing the model configuration:
gemf.interaction_graph(model)

# To solve the time integration of this model call:
forward_results = gemf.forward_model(model)
# To also solve the inverse problem as defined in the configuration, call:
inverse_results = gemf.inverse_model(model)

# To plot the results call 
gemf.plot.output_summary(inverse_results)

For details on the yaml configuration file, see README_YAML.md
The presented functions offer many (crucial) options, which are discussed in the documentation.

How does it work?

For a conceptual description of the internals of this library, see README_concept.md

Example

A simple example might be a simple NPZD model as presented below: interaction graph

The user needs to define the compartments and interactions between them. If the model should be fitted, they also need to provide some constraints and some data to fit it to.
After that the model automatically generates a graph to visualize the system and to find potential errors in the configuration.

Once the model is configured the framework handles the time integration as well as the fitting without any further required user-interaction.

The results of such a run might then look like the following: exemplary results

Top left shows the cost of the current model configuration. The cost is a quadratic measure of distance of the current model to the desired model. Top right shows a output of the model after it reached its steady state for every parameter set tested. Bottom left shows the all tested parameters sets. Bottom right shows the full model output of the best fitted model found.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemf-0.3.1.tar.gz (17.1 kB view details)

Uploaded Source

File details

Details for the file gemf-0.3.1.tar.gz.

File metadata

  • Download URL: gemf-0.3.1.tar.gz
  • Upload date:
  • Size: 17.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.3

File hashes

Hashes for gemf-0.3.1.tar.gz
Algorithm Hash digest
SHA256 0985655b7387333cddbfca306f1a2fb61f12e44cff05ebabfc4d17dd3b449254
MD5 ac9bc8cc21ce813a6e112eb53ef8d22e
BLAKE2b-256 70c46bbfe2dc6b5a318f99d44004a743aae8b2671d3086a52eaa7a6a94a8e0e2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page