diff --git a/Modelica_LinearSystems2/Internal/frequencyRangeZeros.mo b/Modelica_LinearSystems2/Internal/frequencyRangeZeros.mo index e844bba0..3ed55e07 100644 --- a/Modelica_LinearSystems2/Internal/frequencyRangeZeros.mo +++ b/Modelica_LinearSystems2/Internal/frequencyRangeZeros.mo @@ -59,8 +59,8 @@ algorithm k2 := z_re/tan_max2; w_max1 := sqrt(k2^2 + z_abs2) - k2; /* - phi1 :=Modelica.Units.Conversions.to_deg(Modelica.Math.atan((w_max1 + z[i].im)/z_re)); - phi2 :=Modelica.Units.Conversions.to_deg(Modelica.Math.atan((w_max1 - z[i].im)/z_re)); + phi1 :=Modelica.Units.Conversions.to_deg(Math.atan((w_max1 + z[i].im)/z_re)); + phi2 :=Modelica.Units.Conversions.to_deg(Math.atan((w_max1 - z[i].im)/z_re)); Modelica.Utilities.Streams.print("phi1, phi2, 180-sum = " + String(phi1) + ", " + String(phi2)+", " +String(180-phi1-phi2)); */ else @@ -81,8 +81,8 @@ algorithm if first then useFullRange := false; - w_min :=Modelica.Units.Conversions.from_Hz(0.1); - w_max :=Modelica.Units.Conversions.from_Hz(1); + w_min := Modelica.Units.Conversions.from_Hz(0.1); + w_max := Modelica.Units.Conversions.from_Hz(1); end if; annotation (Documentation(info=" diff --git a/Modelica_LinearSystems2/Internal/frequencyRangeZeros2.mo b/Modelica_LinearSystems2/Internal/frequencyRangeZeros2.mo index c8b3e867..4711faa3 100644 --- a/Modelica_LinearSystems2/Internal/frequencyRangeZeros2.mo +++ b/Modelica_LinearSystems2/Internal/frequencyRangeZeros2.mo @@ -60,8 +60,8 @@ algorithm k2 := z_re/tan_max2; w_max1 := sqrt(k2^2 + z_abs2) - k2; /* - phi1 :=Modelica.Units.Conversions.to_deg(Modelica.Math.atan((w_max1 + z[i].im)/z_re)); - phi2 :=Modelica.Units.Conversions.to_deg(Modelica.Math.atan((w_max1 - z[i].im)/z_re)); + phi1 :=Modelica.Units.Conversions.to_deg(Math.atan((w_max1 + z[i].im)/z_re)); + phi2 :=Modelica.Units.Conversions.to_deg(Math.atan((w_max1 - z[i].im)/z_re)); Modelica.Utilities.Streams.print("phi1, phi2, 180-sum = " + String(phi1) + ", " + String(phi2)+", " +String(180-phi1-phi2)); */ else @@ -82,8 +82,8 @@ algorithm if first then useFullRange := false; - w_min :=Modelica.Units.Conversions.from_Hz(0.1); - w_max :=Modelica.Units.Conversions.from_Hz(1); + w_min := Modelica.Units.Conversions.from_Hz(0.1); + w_max := Modelica.Units.Conversions.from_Hz(1); end if; annotation (Documentation(info=" diff --git a/Modelica_LinearSystems2/Utilities/Plot/parameterizedCurves.mo b/Modelica_LinearSystems2/Utilities/Plot/parameterizedCurves.mo index 0b646457..1043a80c 100644 --- a/Modelica_LinearSystems2/Utilities/Plot/parameterizedCurves.mo +++ b/Modelica_LinearSystems2/Utilities/Plot/parameterizedCurves.mo @@ -3,13 +3,11 @@ function parameterizedCurves "Plot parametrized curve with one or more branches" extends Modelica.Icons.Function; - import Modelica_LinearSystems2; - import Modelica_LinearSystems2.Utilities.Plot.Internal; + import Modelica_LinearSystems2.Utilities.Plot; - input Modelica_LinearSystems2.Utilities.Plot.Records.ParametrizedCurves diagram + input Plot.Records.ParametrizedCurves diagram "Parametrized curve data points" annotation(Dialog); - input Modelica_LinearSystems2.Utilities.Plot.Records.Device device= - Modelica_LinearSystems2.Utilities.Plot.Records.Device() + input Plot.Records.Device device = Modelica_LinearSystems2.Utilities.Plot.Records.Device() "Properties of device where figure is shown" annotation(Dialog); protected @@ -23,10 +21,8 @@ protected Integer nProperties=size(diagram.curveProperties,1); Integer nBranches=size(diagram.X,1); Integer colors[nBranches,3] "Line colors"; - Modelica_LinearSystems2.Utilities.Plot.Types.LinePattern patterns[nBranches] - "Line patterns"; - Modelica_LinearSystems2.Utilities.Plot.Types.PointSymbol symbols[nBranches] - "Line symbols"; + Plot.Types.LinePattern patterns[nBranches] "Line patterns"; + Plot.Types.PointSymbol symbols[nBranches] "Line symbols"; Real thicknesses[nBranches] "Line thicknesses"; algorithm // Create diagram @@ -69,12 +65,12 @@ algorithm else for i in 1:nBranches loop k := i; - j :=mod(k, nProperties) + 1 + j := mod(k, nProperties) + 1 "if k is replaced by i, Dymola gives an error about assignment of Real to Integer"; - colors[i,:] :=diagram.curveProperties[j].lineColor; - patterns[i] :=diagram.curveProperties[j].linePattern; - symbols[i] :=diagram.curveProperties[j].lineSymbol; - thicknesses[i] :=diagram.curveProperties[j].lineThickness; + colors[i,:] := diagram.curveProperties[j].lineColor; + patterns[i] := diagram.curveProperties[j].linePattern; + symbols[i] := diagram.curveProperties[j].lineSymbol; + thicknesses[i] := diagram.curveProperties[j].lineThickness; end for; DymolaCommands.Plot.plotParametricCurves( x=diagram.X, @@ -87,8 +83,8 @@ algorithm id=id, labelWithS=diagram.labelWithS, colors=colors, - patterns=Internal.convertToDymolaPattern(patterns), - markers=Internal.convertToDymolaMarker(symbols), + patterns=Plot.Internal.convertToDymolaPattern(patterns), + markers=Plot.Internal.convertToDymolaMarker(symbols), thicknesses=thicknesses); end if;