Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

ModelicaML code generation

ModelicaML code generation

Hi everyone!

I am quite new in ModelicaML. I have my class model and connection model for a very simple model. Now I am in the step of code generation and here is my doubt.
I have seen that for a specific class, it creates as many instances of another class as it is used in the connection model.

I have a class Pin that I use in a class Bus. In the connection model I have two instances of the Bus class, and for each instance, there are two connection ports being two instances of Pin class. So, I have four instances of the Pin class. When I generate the code, in the class Bus appears four instances of the Pin class, but by definition (in the class model) the Bus class should only have two instances of the Pin class.

Is this the correct behavior of the code generation or I have some issue in my design?

Greetings!

There are 0 guests and 0 other users also viewing this topic