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

How to create submodels with OMEdit?

How to create submodels with OMEdit?

I am trying to make a model of a simple hydraulic circuit with OMEdit as my bachelor's thesis. So far I have been able to model the pressure relief valve. Now I should connect it to the rest of the system. How is that possible? Can I transform it into a submodel (similar to MatLab Simulink)? Is it possible to somehow add a new "Pressure relief valve" block to the library?

I would like to thank you in advance for your cooperation in this matter.

Re: How to create submodels with OMEdit?

You can create your own blocks. But in order to use them in the rest of the system. Right now OMEdit doesn't have the interface to include customs models/blocks to the system. So you need to include them through the code by your own.

Adeel.

Re: How to create submodels with OMEdit?

Does this mean that I must connect every block individually? How is it possible to include them through the code? I tried to create a block but it did not work as I thought.

OMEdit is clearly meant to be based on graphic interface so I am assuming that there is some kind of a submodel creator. Otherwise the models become too large to handle.

By the way, what is the issue with the copy & paste? I can not get it working.

Re: How to create submodels with OMEdit?

Hi Esko,

   I gave a solution in this topic:      http://www.openmodelica.org/index.php/f … pic?id=214

Re: How to create submodels with OMEdit?

Adeel, would it be much effort to implement loading custom libraries at startup? Just by specifying them e.g. in OMEdit-Settings.xml?  That would already help a lot.

I also copied "MyLib" to the Modelica folder and it works fine but that's definitely not the way to go since all references must be changed to Modelica.MyLib. Loading a lib should be quite easy anyway. OMEdit docs say that the MSL is loaded using loadModel(Modelica). Of course this works with any other package. And the parsing for the tree view should be just the same stuff as for the MSL... or am I completely wrong at this point?

Ahoi
Sebastian

Re: How to create submodels with OMEdit?

It won't be too hard to implement it. Hopefully i will implement this stuff ASAP. But for now adding the library to Modelica is the only solution.

Adeel.

There are 0 guests and 0 other users also viewing this topic
You are here: