Marine systems simulation

Performs a simple summation of the input signals.

+ Collaboration diagram for Sum:

A general summation object. It is assumed that the width of all ports are equal. The number of input ports and the width of the ports are decided by input parameters at run-time.

Author
Karl-Johan Reite
Date
21.11.2006 KJR: Initial version.

Example configuration excerpt

<Lib
LibName = "fhsim_base"
SimObject = "Math/Sum"
Name = "A"
PortWidth = "2"
NumInput = "3"
/>
...
<Connection
A.In1 = "10,4"
A.In2 = "-10,42"
A.In3 = "0,-46"
/>

Input Ports

Name Width Description
In1 .. In<NumInput> <PortWidth> The input port

Output Ports

Name Width Description
Out <PortWidth> The elementwise sum of the input signals

Configuration parameters

Name Width Description
PortWidth 1

The number of elements in the input and output ports

NumInput 1 The number of input signals

Initial conditions

There are no initial conditions for this function.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Math/Sum"
Name="A"
PortWidth="5"
NumInput="2"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In1="1,2,3,4,5"
A.In2="5,4,3,2,1"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<INTEGRATION>
<Engine
IntegratorMethod="2"
NumCores="1"
TOutput="0, 1, 30"
LogStates ="1"
stepsize ="0"
HMax="0.002"
HMin="0.00000001"
AbsTol="1e-3" RelTol="1e-3"
UseRSSNormInsteadOfInfNorm="0"
FileOutput="objects:all"
/>
</INTEGRATION>
</Contents>

This SimObject is referred to as Math/Sum