--
You received this message because you are subscribed to the Google Groups "JaamSim Users Discussion Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jaamsim-user...@googlegroups.com.
To view this discussion, visit https://groups.google.com/d/msgid/jaamsim-users/d40a39db-8a06-4773-9a27-1aec14edaf48n%40googlegroups.com.
JaamSim exposes a Java API (the JaamSimModel class) that lets external programs load, configure, start, pause, and control simulation runs programmatically. jaamsim.com
What you can do with it✔ Launch a simulation from Java
✔ Run models headlessly (no GUI)
✔ Pause/resume and extract results
So you can embed JaamSim inside a Java application (e.g., a backend service) that you control.
Example flow:
Create a Java app that uses JaamSimModel. jaamsim.com
In that app, call the OpenAI (ChatGPT) API to send prompts to GPT and receive responses.
Based on GPT’s outputs, adjust simulation parameters or make decisions.
Run the simulation and collect results.
EnableHTTPServer and HTTPPort are Input attributes
They are attached to the SimulationModel
They are parsed only by the JML input system
⚠️ Important consequence:
.cfg files (legacy format) do not support these inputs
.jml files do
➡️ This explains exactly why:
“Putting these lines into a .cfg causes errors”
That behavior is expected and correct according to the parser design.
Parsed by legacy input parser
No support for:
HTTP server
JSON
REST endpoints
Parsed by InputAgent / Input system
Supports:
EnableHTTPServer
HTTPPort
Runtime services like HTTP
➡️ This is not a configuration issue
➡️ It is a model-format limitation
GUI property editing is handled by:
When you:
Select SimulationModel
Set EnableHTTPServer = TRUE
Set HTTPPort = 8080
The GUI:
✔ Writes these values into the .jml
✔ The HTTP server starts when the model loads
There is no menu item for ports — it is an object attribute, not a global setting.
From the HTTP controller classes, the following endpoints are implemented:
Examples:
Responses are serialized as JSON using JaamSim’s internal serializers.
➡️ Again: implemented, but undocumented
JaamSim manuals focus on discrete-event modeling
The HTTP server is:
an internal integration feature
used for co-simulation, automation, digital twins
It has not yet been formalized as a public API
So the developer saying “there is no procedure” is true from a documentation standpoint, but false from a code standpoint.
Summary
JaamSim includes an embedded HTTP/REST server implemented under
com.jaamsim.http.The server is enabled via SimulationModel input attributes
EnableHTTPServer and HTTPPort, which are parsed only in .jml models.Legacy .cfg models do not support these inputs and will throw errors.
The feature is implemented in source code but is not documented in the official manuals.