saving . . . saved Function calls of blocks has been deleted. Function calls of blocks has been hidden .
Function calls of blocks
Title
Question
How the function calls to sum, product are made when we simulate main class?

OpenModelica Block-Component-Modeling 09-10 min 20-30 sec 18-04-20, 3:59 p.m. viveklatta

Answers:

Sum mySum(nin = 2) "Number of input signals is 2";
Product myProduct(nin = 2) "Number of input signals is 2";

The above two lines of code are used to instantiate the Sum and Product blocks in the main class.
mySum is the instance name of the Sum block and myProduct is the instance name of the Product block. Therefore in the equation section of the main class, mySum and myProduct are used.
When you simulate the main class, all the equations of Sum and Product blocks (which are already instantiated in the main class) gets appended with the equations of the main class and are solved together.
18-04-20, 5:08 p.m. priyamnayak


Log-in to answer to this question.