Table of Contents
API(GroLink)
Through the GroLink API it is possible to run and interact with GroIMP using HTTP requests. This allows users to open, manipulate and run several models. Additionally the project provides libraries in R and Python to ease the use.
Start GroIMP in API mode
Using the GroIMP API it is possible to use GroIMP as a service, or from a remote server.
Getting started with GroLink and HTTP
To show the usage of the API without a client library this tutorial uses HTTP calls by just opening them in the webbrowser. This Tutorial shows only a limited functionality because HTML hyperlinks can not send a request body.
Getting started with GroLink and GroPy
To improve the usability of the API, the GroLink project includes a Python library, that links Python code to the running API server.
Getting started with GroLink and GroR
Handeling data in GroLink Projects
Many GroIMP projects use external data such as csv or xls files by linking these files in RGG code. This will (with the right path) work on the API in the same way. Except if the GroIMP and the API are executed on another device.
In that case, the data must be included in the gsz-file, the following tutorial describes this process for a simple example.
Sensitivity analysis on GroIMP models using GroR
This wiki explains how to do a sensitivity analysis on GroIMP models using the GroR interface using a Morris screening over input parameters of the "Example08" FSPM model from the gallery as an example.
Deploying GroIMP/GroLink on Kubernetes
This tutorial is a first step towards deploying GroIMP on a compute cluster. This at the moment is more of a prove of concept than a established way of using GroIMP.
The idea is to have several multiple pods running the GroIMP API server GroLink and one pod or job that is scheduling tasks to the GroLink pods. This one pod/job could later be a web service or a deployment job, but for this tutorial its going to be just a small python terminal-Pod we can connect to and run our script by hand. This script than uses python multiprocessing to send API calls to the different GroLink pods in parallel and than collecting the results to a csv file.
The Python script will create a small data set for a sensitivity analysis of a very simple model and execute the model.