User Tools

Site Tools


01_user_documentation:10_additional_interfaces:headless

Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
01_user_documentation:10_additional_interfaces:headless [2025/01/30 10:54] – removed - external edit (Unknown date) 127.0.0.101_user_documentation:10_additional_interfaces:headless [2025/12/10 13:14] (current) – ↷ Links adapted because of a move operation gaetan
Line 1: Line 1:
 +====== 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 [[01_user_documentation:10_additional_interfaces:http|HTTP server]].  
 +
 +<uml>
 +@startuml
 +hide footbox
 +title Headless
 +
 +User -> GroIMP: Start GroIMP with model
 +GroIMP -> User: Print log & close GroIMP
 +@enduml
 +</uml>
 +
 +
 +If a model is started in headless, GroIMP executes it,logs the console output and afterwards shut down. Capturing any feedback from the simulation must be included in the model.  
 +
 +==== 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 [[01_user_documentation:10_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 ====
 +
 +  * [[01_user_documentation:groimp-platform:interfaces:headless|Headless implementation]]
 +  * [[01_user_documentation:user-guide:advanced-groimp-arguments|Common command line arguments]]
 +
 +==== Tutorials ====
 +  * [[02_user_tutorials:30_additional_interfaces:headless:01_startup-headless-model|Getting started with headless]]
 +  * [[02_old_tutorials:08_technical_features:xparametric-model|Forwarding command line arguments to simulations]]
 +  * [[https://wwwuser.gwdg.de/~groimp/grogra.de/gallery/Technics/renderHeadlessDemo.html|renderHeadlessDemo]].