I suppose the following two lines
v = (s*unitCurrent)*(if off then 1 else Ron) + Vknee;
i = (s*unitVoltage)*(if off then Goff else 1) + Goff*Vknee;
should be replaced by:
v = s*(if off then unitVoltage else unitCurrent*Ron) + Vknee;
i = s*(if off then unitVoltage*Goff else unitCurrent) + Goff*Vknee;
otherwise the quantities are horribly wrong?
It's the same for Modelica.Electrical.Analog.Interfaces.IdealSwitch.
Should we fix that for 4.1.0?
What's your opinion, @christiankral @casella @dietmarw @HansOlsson ?