Skip to content
Garima edited this page Feb 1, 2025 · 5 revisions

Welcome to the OpenModelica-GUI wiki!

This is where you will find information regarding all the changes incorporated in the application to make certain features work and my reasons behind adding or discarding them.
Currently, the documentation deals with key changes in the models and how they affect the simulation and overall execution of the application I made as part of screening task for FOSSEE.

Current Look and Start of development

present ui

This app was developed in several stages, some of which were experimental, some test and some checks.
I have used various methods for checks and linting and formatting, each one tested and then improved upon.

I started with a simple UI, with the fields inserted as required by the details documentation.

simple app ui


The Initial UI and Model Errors

Next, I worked on the issues with the labels and small issues like spacing, to make things readable.
Since OpenModelica was pretty new for me, I didn’t get the model to simulate properly with the simple instructions found online. So I started debugging.
Fist check yielded errors in all files, from trivial equations to division by zero errors to lack of potential variables.

error message
error message


Linting and Formatting

Since I have only ever used linters and formatter in organisation code before, setting them up was fun. I had recently worked on openlibrary codebase and they use pre-commit, ruff, black and pyproject.toml for handling their code standard. So I was good. I did have to make a check file for my own to run properly and then add a pylintrc (because apparantly pylint flags some of the standard lib imports too?!?!) Took a while to set up formatting because vs code has quite a few commands which are apparantly depreciated when writing
bc. settings.json


Missing File Error

Afterwards, I got a missing file error for libRunSimulationC.dll . I raised an issue in the OpenModelica repository asking if this was an issue and where to find the file, turns out there was issue with the simulation. This was not visible when I ran the exe file through GUI, as it only caught the process error and showed me a single simulation error output.
error pop-up

So I checked files. The models needed work, so I experimented with small modifications first. But that didn’t work either. So I mailed the team to ask if we were allowed to make changes. Got a yes and got to work.
The detailed documentation about the changes I made and why are in the next page About the Process


Command-line Execution Works!

The simulation first worked for commandline after I set environment variables for user and system.
cmd output

After this worked, I added flags backin code. Worked with LOG flags separately to see which one was giving me error. Once I found out how to make it work, I modified the code as I wanted, i.e., put each feature under its own method while also handling some of the error gracefully.
Next, I worked on the gui and the error handling side by side, experimenting with them.

Adding Flags and Streamlining the output

So since the xml flag needed more space and I wanted to show the output in the app properly, I added a space for that.
After everything, here’s how the app looks now:
application final look