User Tools

Site Tools


user-guide:additional_interfaces:headless

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
user-guide:additional_interfaces:headless [2025/01/17 09:29] – created Timuser-guide:additional_interfaces:headless [2025/01/22 15:48] (current) – [Further Info] Tim
Line 1: Line 1:
-====== GroIMP headless user guide ======+====== Headless mode ======
  
 +GroIMP can be started without its graphical interface, in a non interactive headless mode.
 +This mode can either execute a specified model and or a specified GroIMP command and can therefore be used for simple automation or as a base for e.g. the [[user-guide:additional_interfaces:http|HTTP server]].  
  
-GroIMP can be started without its graphical interface, in headless. +<uml> 
 +@startuml 
 +hide footbox 
 +title Headless
  
-==== Get started ====+User -> GroIMP: Start GroIMP with model 
 +GroIMP -> User: Print log & close GroIMP 
 +@enduml 
 +</uml>
  
-You can find an example  
-[[https://wwwuser.gwdg.de/~groimp/grogra.de/gallery/Technics/renderHeadlessDemo.html|here]]. 
  
-Download the example project and run in with ''java -Xverify:none -jar core.jar --headless PATH/TO/THE/MODEL.gsz''+If a model is started in headless, GroIMP executes it,logs the console output and afterwards shut downCapturing any feedback from the simulation must be included in the model.  
-The model will run in background, grow few steps of the plant model, and export several views for each step.+
  
-==== Tutorial ====+==== Running a model headless ==== 
 + 
 +To execute a given model in headless the additional parameter --headless is used: 
 +<code bash> 
 +java -Xverify:none -jar core.jar --headless /path/to/your/model.gsz 
 +</code> 
 + 
 +This will return a list of all installed plugins including versions and then start the model.  
 +Any further actions must be defined in the code of the Model, including the steps of the simulation, the way data is printed/exported and the closing of the workbench at the end. 
 + 
 +For the automated starting of the simulation overwriting the startup function of the simulation is recommended. 
 + 
 + 
 +==== Executing a command headless ==== 
 + 
 +GroIMP is capable of executing any registry command on startup, if this command is provided as full path using the additional command line argument: %%'-- -cmd "/path/to/command" '%%.  
 +This is mostly used to start the [[user-guide:additional_interfaces:http|HTTP server]] but also combining this with a provided model is possible as shown [[https://wwwuser.gwdguser.de/~groimp/grogra.de/gallery/Technics/renderHeadlessDemo2.html | here]]. 
 +====  More documentation ==== 
 + 
 +  * [[:groimp-platform:interfaces:headless|Headless implementation]] 
 +  * [[:user-guide:advanced-groimp-arguments|Common command line arguments]] 
 + 
 +==== Tutorials ==== 
 +  * [[:tutorials:startup-headless-model|Getting started with headless]] 
 +  * [[:Tutorials:xparametric-model|Forwarding command line arguments to simulations]] 
 +  * [[https://wwwuser.gwdg.de/~groimp/grogra.de/gallery/Technics/renderHeadlessDemo.html|renderHeadlessDemo]].
  
-You can have a look at [[:Tutorials:Startup-headless-model|this tutorial]] for more information. 
-Further a tutorial for using command line parameters in the model can be found [[:Tutorials:xparametric-model|here]]  
user-guide/additional_interfaces/headless.1737102594.txt.gz · Last modified: 2025/01/17 09:29 by Tim