====== Additional User interfaces ======
Besides the Graphical user interface that is used in GroIMP by default, it is possible to execute models in other ways. This can be useful for specific scenarios such as larger pipelines or remote execution.
In general a user interface describes how the user communicates with the software (GroIMP).
@startuml
hide footbox
User<->GroIMP: ???
@enduml
For example with the graphical user interface windows and panels are used for this communication:
!pragma teoz true
@startuml
hide footbox
title GUI
participant User
participant "Windows/panels" as gui
participant GroIMP
User -> GroIMP: Start GroIMP
gui<-> GroIMP
& User <-> gui
@enduml
====== Headless mode ======
GroIMP can be started without its graphical interface, in headless. The headless mode executes a provided model and afterwards closes GroIMP. Capturing any feedback from the simulation must be included in the model.
@startuml
hide footbox
title Headless
User -> GroIMP: Start GroIMP with model
GroIMP -> User: Print log & close GroIMP
@enduml
More information on the headless mode:
* [[user-guide:additional_interfaces:headless|GroIMP headless user guide]]
* [[:groimp-platform:interfaces:headless|Headless implementation]]
* [[:user-guide:advanced-groimp-arguments|Common command line arguments]]
A tutorial:
* [[:tutorials:startup-headless-model|Getting started with headless]]
====== Command Line Interface ======
GroIMP can be started without its graphical interface, with a CLI. Unlike the Headless mode, the CLI enables interaction with the model during run time including opening and closing models, running simulations, editing RGG files etc.
@startuml
!pragma teoz true
hide footbox
title CLI
participant User
participant "Interactive command line" as cli
participant GroIMP
User -> GroIMP: Start GroIMP
cli<-> GroIMP
& User <-> cli
@enduml
More documentation on the CLI:
* [[:user-guide:additional_interfaces:cli | CLI user guid]]
* [[:user-guide:additional_interfaces:cli#list_of_commands|List of CLI commands]]
* [[:groimp-platform:interfaces:cli|CLI implementation]]
A tutorial:
* [[:tutorials:startup-cli-model|Getting started with CLI]]
====== HTTP Server ======
It is possible to start GroIMP as a HTTP server to then send model paths via HTTP for GroIMP to execute.
After GroIMP executed the model values can be returned to the HTTP client who send the request. It is possible to send several models in series or in parallel.
@startuml
hide footbox
title HTTP server
User -> GroIMP: Start GroIMP
User -> GroIMP: Send Model-path
GroIMP -> User: Return result
User -> GroIMP: Close GroIMP
@enduml
More information:
* [[:user-guide:additional_interfaces:http| HTTP server user guide]]
* [[:user-guide:additional_interfaces:http#commands|HTTP Server commands]]
* [[:user-guide:additional_interfaces:http#options|HTTP options]]
Tutorial:
* [[:tutorials:http_server|Starting GroIMP as a HTTP Server]]
====== Application Programming Interface ======
GroIMP can be started as an HTTP API that provides a generalized set of commands that allows the interaction with other software. Currently a Python and a R library are provided but any software capable of http requests could interact with GroIMP.
@startuml
!pragma teoz true
hide footbox
title API
participant User
participant ClientScript
participant API
participant GroIMP
User -> GroIMP: Start GroIMP
User -> ClientScript
ClientScript <->API
& API<-> GroIMP
User <- ClientScript
User -> GroIMP: Stop GroIMP
@enduml
More information on the API:
* [[:user-guide:additional_interfaces:api |API user guid]]
* [[https://gitlab.com/grogra/groimp-plugins/api/-/blob/master/commands.md|List of commands]]
* [[:groimp-platform:interfaces:api|API implementation]]
* [[:dev-guide:create-new-api-function|How to create new API commands]]
* [[https://wkurth.grogra.de/oberlaender_msc.pdf| GroLink: implementing and testing a general application programming interface for the plant-modelling platform GroIMP]]
Tutorials:
* [[:Tutorials:Getting-started-with-GroLink-and-GroPy|getting started with GroLink and Python(GroPy)]]
* [[:Tutorials:Getting-started-with-GroLink-and-GroR|getting started with GroLink and R(GroR)]]
* [[:Tutorials:Getting-started-with-GroLink-and-HTTP|getting started with GroLink and HTTP in your web browser]]
* [[:Tutorials:Handeling-data-in-GroLink-Projects|Handling data in GroLink projects]]
* [[:Tutorials:grolink-on-kubernetes|Deploying GroIMP/GroLink on Kubernetes]]
Existing examples:
* [[https://gitlab.com/groimp-api-examples/forester-game | Godot forestry Game]]
* [[https://gitlab.com/groimp-api-examples/pythonnotebook | An jupyter notebook]]
* [[https://gitlab.com/groimp-api-examples/shinyexamples | Two R-Shiny apps to view GroIMP projects in a browser]]
====== GroIMP Server ======
**This Feature is currently not working!!!!**
GroIMP can be started as a server. Then, other instances of GroIMP can connect to the GroIMP server. This enables multiple user concurrently accessing a single model from different devices as well as modelling on a powerful remote server.
@startuml
!pragma teoz true
hide footbox
title GroIMP server
participant User
participant "client GroIMP" as g1
participant "remote GroIMP" as g2
User -> g2: starts server side GroIMP
User -> g1: starts client GroIMP
User <->g1
& g1<->g2
User -> g1: stops client GroIMP
User -> g2: stops server side GroIMP
@enduml
More information:
* [[:groimp-platform:interfaces:groimp_server|GroIMP Server]]
* [[:groimp-platform:interfaces:groimp_server#options|Options]]
Tutorial:
* [[:tutorials:groimp_server|Starting GroIMP as a GroIMP Server]]
====== GreenLab ======
Parts of the GreenLab model were reimplemented in the language XL with additional panels in the GUI.
As the basis, the implementation of the GreenLab model in the software [[http://liama.ia.ac.cn/wiki/projects:greenscilab:download|GreenScilab]], version GreenScilabv1.0_demo, was taken.
More information on the Greenlab plugin:
* [[:greenlab:ch01|Greenlab implementation]]
A tutorial:
* [[:tutorials:greenlab|Getting started with greenlab]]