- π OpenModelica Model Launcher (OML)
The OpenModelica Model Launcher (OML) is a graphical user interface (GUI) application designed to simplify the execution of Modelica simulations. This launcher allows you to:
- Select Modelica model executables.
- Configure simulation parameters such as start time and stop time.
- Execute the selected model and generate output files in
.mat
format. - Visualize the simulation results using Matplotlib for detailed analysis.
-
User-Friendly GUI:
- Simple design using PyQt6 for smooth user interaction.
- Seamless integration of widgets for parameter configuration and model selection.
-
π Platform Support:
- Linux
- Windows
-
ποΈ Simulation Control:
- Configure simulation start and stop times.
- Execute Modelica models using the specified parameters.
- Plot the model output when the "Plot the Output" button is pressed.
- Receive real-time status updates during execution.
-
β οΈ Error Handling and Notifications:- Real-time feedback on simulation success or failure with detailed logs.
- Display user-friendly error and status messages via popups.
-
π Logging:
- Detailed logging system for debugging and analysis (log files and console output).
- Configurable logging to ensure ease of troubleshooting.
Icons from Flaticon.
The following software and dependencies must be installed on your system:
- Python 3.12.0 or higher.
- The following Python libraries installed using
pip
:PyQt6
(for GUI development)logging
(for logging functionality)matplotlib
(for plotting results)scipy
(for handling .mat files)qdarktheme
(for dark theme support)
- OpenModelica simulation executable.
To install the required Python packages:( Only needed for GitHub installation)
pip install -r requirements.txt
or
pip3 install -r requirements.txt
-
Download the Executable:
- Navigate to the Releases section of this repository.
- Find the latest version and download the appropriate executable file for your operating system (e.g.,
.exe
for Windows or a binary for Linux/Mac).
-
Run the Executable:
- For Windows:
- Double-click the
.exe
file to launch the application.
- Double-click the
- For Linux:
- Open a terminal in the directory containing the executable.
- Run the file using:
./ModelLauncher_Lin_V1.0.0
- For Windows:
- Clone this repository to your local system:
git clone https://github.com/mtm-x/OpenModelica-GUI
cd OpenModelica-GUI
- The following Python libraries installed using
pip
:PyQt6
(for GUI development)logging
(for logging functionality)matplotlib
(for plotting results)scipy
(for handling .mat files)qdarktheme
(for dark theme support)
To install the required Python packages:
bash pip install -r requirements.txt
or
bash pip3 install -r requirements.txt
- Run the application:
or
python ModelLauncher.py
python3 ModelLauncher.py
Run the script ModelLauncher.py
using Python or launch the application.
- Select Model File: Click "Choose File" and browse for the Modelica model executable file.
- Set Start and Stop Time:
- Enter the start and stop times for your simulation in the respective fields.
- Ensure that the stop time is greater than the start time.
- Validate Parameters:
- Once your parameters are set, click "Set" to validate the inputs.
- To generate a plot, ensure you check the "Plot the O/p" button before launching.
- Click the "Launch" button to start the simulation.
- The simulation will execute in the background with real-time progress tracking.
- Notifications will display the results, indicating success or failure.
- Click the "History" button to view recent simulation logs.
- Use the "Docs" button to access detailed information about the application and relevant links.
- Model Selection: Choose a Modelica model executable (
*.exe
for Windows). - Define Parameters:
- Enter values for:
- Start Time:
0
- Stop Time:
5
- Start Time:
- Enter values for:
- Simulation Launch:
- Check the "Plot the O/p" option if you need to generate plots.
- Click "Launch" to start the execution.
- Check logs and notification pop-ups for results.
The application uses a centralized logging system to provide detailed analysis and debugging:
- Console output for real-time monitoring.
- Recent simulation data can be viewed using the "History" button.
- Log files are saved as
OPLauncher.log
for deeper diagnostics.
- Home screen
- Themes
- Log History
- Docs
- Plot
OML_Demo.mp4
For additional questions, contact: mahasel.1969@gmail.com
.