Modelica - how to implement a constructor for recording

What is the best way to implement a constructor for writing? It seems that the function should be able to return the record object in the record instance in some later model above the tree, but I cannot get this to work. At the moment, I just use a bunch parametersat the top of the record, which populates the variables stored in the record, but it seems that this will only work in simple cases.

Can anyone shed some light? Perhaps I should not use a record, but a model. Also does anyone know how PDE works? The book says she is coming, but I saw something else.

+3
source share
2 answers

It seems I don’t have a binding for adding tags (which makes sense since my “reputation” is below yours), so I'm sorry about that. I thought I actually added it at one point, but maybe I'm wrong.

I think you need to clearly understand what you mean by constructor, since it has a very specific meaning in Modelica. If I understand your question correctly, it looks like you want to create an instance of a record with several fields specified in the constructor arguments, and from these arguments many other fields in the record are calculated. It is right?

, . "", , . , " ", . , . 12.6 Modelica 3.2.

PDE, , . , , PDE , . , , , . , . , PDE, , ( ) - , ( CFL).

, .

+3

. , , " 2011 ".

:

http://openmodelica.org/index.php/forum/topic?id=50

modelica, ...: -)

,

+1

Source: https://habr.com/ru/post/1777105/


All Articles