Thanks to JetBrains for sponsorship
This is a web API project based on the OpenModelica project's backend omc.
The goal of this project is to provide users with a backend API based on omc, separating the graphical display of Modelica models, model operations, simulation execution, and Modelica code parsing. In short, it aims to enhance and simplify functionalities based on omc, making it easier for other developers to use.
- Model Compilation
- Model Simulation
- Model Source Code Parsing
- Model Instantiation
- More features are under development
- Official installation of omc, minimum version 1.21
- Golang minimum version 1.21
- MySQL database for storing user information, model information, etc.
- This project does not include a graphical display component; users need to develop their own graphical rendering code
- Install omc: Official Download Link
- Install Golang: Official Download Link
- Clone this project:
git clone https://github.com/whl5627445/myProject
- Configure the database address in the
config
file - Compile the project:
go build main.go
- If you have completed all the configurations and installations according to the installation guide, you just need to run the compiled binary file.
- It is currently recommended to run on a Linux server.
Ensure your configuration file correctly points to the MySQL database and configures other necessary options, such as the path to omc.
Starting the Project
In the project’s root directory, run:
go build main.go
./main
Now, your API server should be up and running, and you can access the respective endpoints to use various features.
FAQ
Ensure you have correctly specified the path to omc in the configuration file and that the omc executable has the appropriate permissions.
Check your database configuration, make sure the database server is running, and the credentials in the configuration file are correct.
Contribution
Contributions to this project are welcome! Please submit Pull Requests or Issues.
If you have any other questions or need further assistance, feel free to contact me.