Skip to content

Commit ce9eaa2

Browse files
committed
Rename VectorProduct to ScalarPoduct and add comparisonSignals
1 parent 1da24bb commit ce9eaa2

File tree

3 files changed

+9
-7
lines changed

3 files changed

+9
-7
lines changed

Modelica/Blocks/Math.mo

+2-4
Original file line numberDiff line numberDiff line change
@@ -997,12 +997,11 @@ y = u1 * u2;
997997
Ellipse(lineColor={0,0,127}, extent={{-50,-50},{50,50}})}));
998998
end Product;
999999

1000-
block VectorProduct "Output product of the two inputs with dimension n"
1000+
block ScalarProduct "Output scalar product of the two inputs with dimension n"
10011001
extends Modelica.Blocks.Interfaces.MI2SO;
10021002

10031003
equation
10041004
y = u1 * u2;
1005-
10061005
annotation (
10071006
Documentation(
10081007
info = "<html>
@@ -1055,8 +1054,7 @@ The output <strong>y</strong> is scalar.
10551054
Ellipse(
10561055
extent = {{-50, 50}, {50, -50}},
10571056
lineColor = {0, 0, 255})}));
1058-
1059-
end VectorProduct;
1057+
end ScalarProduct;
10601058

10611059
block Division "Output first input divided by second input"
10621060
extends Interfaces.SI2SO;

ModelicaTest/Blocks.mo

+4-3
Original file line numberDiff line numberDiff line change
@@ -764,20 +764,21 @@ if homotopy is active, the solution accepted by the assert statement (x = 100) i
764764
transformation(extent={{-80,-60},{-60,-40}})));
765765
Modelica.Blocks.Routing.Multiplex3 multiplex3 annotation (Placement(transformation(extent={{-40,-20},{-20,0}})));
766766
Modelica.Blocks.Routing.Multiplex3 multiplex1 annotation (Placement(transformation(extent={{-20,40},{0,60}})));
767-
Modelica.Blocks.Math.VectorProduct vectorProduct(n=3) annotation (Placement(transformation(extent={{30,20},{50,40}})));
767+
Modelica.Blocks.Math.ScalarProduct scalarProduct(n=3) annotation (Placement(transformation(extent={{30,20},{50,40}})));
768768
Modelica.Blocks.Math.NormalizeVector normalizeVector annotation (Placement(transformation(extent={{30,-20},{50,0}})));
769769
equation
770770
connect(sine.y, multiplex3.u1[1]) annotation (Line(points={{-59,30},{-50,30},{-50,-3},{-42,-3}}, color={0,0,127}));
771771
connect(constPos.y, multiplex3.u2[1]) annotation (Line(points={{-59,-10},{-42,-10}}, color={0,0,127}));
772772
connect(constNeg.y, multiplex3.u3[1]) annotation (Line(points={{-59,-50},{-48,-50},{-48,-17},{-42,-17}}, color={0,0,127}));
773773
connect(constPos.y, multiplex1.u1[1]) annotation (Line(points={{-59,-10},{-52,-10},{-52,57},{-22,57}}, color={0,0,127}));
774-
connect(multiplex1.y, vectorProduct.u1) annotation (Line(points={{1,50},{10,50},{10,36},{28,36}}, color={0,0,127}));
775-
connect(multiplex3.y, vectorProduct.u2) annotation (Line(points={{-19,-10},{10,-10},{10,24},{28,24}}, color={0,0,127}));
774+
connect(multiplex1.y, scalarProduct.u1) annotation (Line(points={{1,50},{10,50},{10,36},{28,36}}, color={0,0,127}));
775+
connect(multiplex3.y, scalarProduct.u2) annotation (Line(points={{-19,-10},{10,-10},{10,24},{28,24}}, color={0,0,127}));
776776
connect(multiplex3.y, normalizeVector.u) annotation (Line(points={{-19,-10},{28,-10}}, color={0,0,127}));
777777
connect(constNeg.y, multiplex1.u3[1]) annotation (Line(points={{-59,-50},{-48,-50},{-48,43},{-22,43}}, color={0,0,127}));
778778
connect(sine.y, multiplex1.u2[1]) annotation (Line(points={{-59,30},{-50,30},{-50,50},{-22,50}}, color={0,0,127}));
779779
annotation (experiment(StopTime=1.1));
780780
end Vectors;
781+
781782
model KinematicPTP
782783
extends Modelica.Icons.Example;
783784
Modelica.Blocks.Sources.KinematicPTP kinematicPTP1a(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
time
2+
scalarProduct.y
3+
normalizeVector.y

0 commit comments

Comments
 (0)