Skip to content

Commit

Permalink
Set IdealizedOpAmpLimted.strict to true as default
Browse files Browse the repository at this point in the history
* Restore MSL 3.2.2 behaviour, i.e., without events
* Force events for SignalGenerator example model
  • Loading branch information
beutlich committed Jun 13, 2018
1 parent 68f1beb commit a4083f2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions Modelica/Electrical/Analog/Examples/OpAmps.mo
Original file line number Diff line number Diff line change
Expand Up @@ -711,8 +711,7 @@ package OpAmps "Examples with operational amplifiers"
parameter SI.Capacitance C=1/f/(2*R*log(1 + 2*R1/R2)) "Calculated capacitance to reach the desired frequency f";
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp(
Vps=Vps,
Vns=Vns,
strict=true) annotation (Placement(transformation(extent={{0,-10},{20,10}})));
Vns=Vns) annotation (Placement(transformation(extent={{0,-10},{20,10}})));
Modelica.Electrical.Analog.Basic.Ground ground
annotation (Placement(transformation(extent={{-20,-80},{0,-60}})));
Modelica.Electrical.Analog.Sensors.VoltageSensor vOut annotation (Placement(
Expand Down Expand Up @@ -783,6 +782,7 @@ package OpAmps "Examples with operational amplifiers"
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp1(
Vps=Vps,
Vns=Vns,
strict=false,
homotopyType=Modelica.Blocks.Types.LimiterHomotopy.UpperLimit)
annotation (Placement(transformation(extent={{-60,10},{-40,-10}})));
Modelica.Electrical.Analog.Basic.Resistor r2(R=R2, i(start=Vps/R2))
Expand All @@ -799,7 +799,8 @@ package OpAmps "Examples with operational amplifiers"
Modelica.Electrical.Analog.Ideal.IdealizedOpAmpLimted opAmp2(
Vps=Vps,
Vns=Vns,
v_in(start=0))
v_in(start=0),
strict=false)
annotation (Placement(transformation(extent={{30,-10},{50,10}})));
Modelica.Electrical.Analog.Basic.Capacitor c(C=C, v(fixed=true, start=0))
annotation (Placement(transformation(extent={{50,10},{30,30}})));
Expand Down
2 changes: 1 addition & 1 deletion Modelica/Electrical/Analog/Ideal.mo
Original file line number Diff line number Diff line change
Expand Up @@ -675,7 +675,7 @@ If the input voltage is vin larger than 0, the output voltage is out.v = VMax.
annotation (Dialog(enable=not useSupply));
parameter SI.Voltage Vns=-15 "Negative supply voltage"
annotation (Dialog(enable=not useSupply));
parameter Boolean strict=false "= true, if strict limits with noEvent(..)"
parameter Boolean strict=true "= true, if strict limits with noEvent(..)"
annotation (Evaluate=true, choices(checkBox=true), Dialog(tab="Advanced"));
parameter Modelica.Blocks.Types.LimiterHomotopy homotopyType = Modelica.Blocks.Types.LimiterHomotopy.Linear "Simplified model for homotopy-based initialization"
annotation (Evaluate=true, Dialog(group="Initialization"));
Expand Down

0 comments on commit a4083f2

Please sign in to comment.