FhSim  3.1.0
Marine systems simulation
Loading...
Searching...
No Matches

Checks whether two ports have equal value.

+ Collaboration diagram for Equal:

This SimObject has two input ports, In1 and In2, and one output port, Out. If In1 and In2 are equal, then Out is set equal to 1 ("true"). Otherwise, Out is set equal to 0 ("false"). Implementation class is Equal.

Author
Lars Tandle Kyllingstad
Date
2012

Example configuration excerpt

<Lib LibName = "fhsim_base"
SimObject = "Boolean/Equal"
Name = "A"
/>
<Connection
A.In1="1"
A.In2="0"
/>

Input Ports

Name Width Description
In1 1 Input 1, real-valued.
In2 1 Input 2, real-valued.

Output Ports

Name Width Description
Out 1 1 if In1 and In2 are equal, 0 otherwise.

Configuration parameters

This SimObject does not contain any configuration parameters.

Initial conditions

This SimObject does not contain any initial conditions.

Full example file

<Contents>
<OBJECTS>
<Lib
LibName="base"
SimObject="Boolean/Equal"
Name="A"
/>
</OBJECTS>
<INTERCONNECTIONS>
<Connection
A.In1="1"
A.In2="0"
/>
</INTERCONNECTIONS>
<INITIALIZATION>
<InitialCondition
/>
</INITIALIZATION>
<SIMULATION>
<Timing TStart="0" TEnd="2.0"/>
<Integrator Method="RK45_i" NumCores="1" LogStates="1" UseRSSNorm="0">
<StepControl StepMax="0.002" StepMin="0.00000001" AbsTol="1e-3" RelTol="1e-3"/>
</Integrator>
</SIMULATION>
<OBSERVERS>
<FileOutput TOutput="0, 1, 30" Select="objects:all"/>
</OBSERVERS>
</Contents>

This SimObject is referred to as Boolean/Equal