Modelicor is an open-source web service that exposes functions of the OpenModelica shell and compiler through REST API calls. The code lives here on GitHub. The interface accepts the following HTTP requests:
Method | URL | Description |
---|---|---|
GET | /health |
This is a check that the service is up. Should return { "value": "OK" }
|
GET | /api/health |
This is to check that the OpenModelica solver engine is accessible. Should return a health check and the available version of the OpenModelica compiler such as { "value": "OK", "version": "OMCompiler v#.#.#" }
|
POST | /api/solve_file |
This will consume a Modelica file (.mo) and solve it, returning the solution as JSON data. Attach a valid Modelica file to a multipart/form-data request. It must use the .mo extension.The following keys must be present in the form data:
file
|
Reach out to brennan@brennanharris.xyz for questions.