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

Initializing matrix with a reduction expression

Initializing matrix with a reduction expression

Hi Folks,

I am trying to give a start value to an output of a block with size [nRows, nCols]:

Modelica.Blocks.Interfaces.RealOutput[nRows,nCols] value(final start={(startValues[i,j]*factor[i,j] + offset[i,j]) for j in 1:nCols, i in 1:nRows})

the variables startValues, offset and factor are matrices of parameters, that I initialize with the function ones and zeros
I got unfortunatelly from OM shell the following error message:

"Wrong type on builtin attribute start of type Real[2], expected Real"

"Error: Error occurred while flattening model ... "

How I can correctly initialize my matrix using the expression above?

Thanks in Advance,
Erick

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