modelica / ModelicaStandardLibrary

Free (standard conforming) library to model mechanical (1D/3D), electrical (analog, digital, machines), magnetic, thermal, fluid, control systems and hierarchical state machines. Also numerical functions and functions for strings, files and streams are included.
https://doc.modelica.org
BSD 3-Clause "New" or "Revised" License
472 stars 169 forks source link

Connect(p, p) in Modelica.Electrical.Analog.Examples.Utilities.SwitchedCapacitor? #4245

Closed TongYuan-MC closed 8 months ago

TongYuan-MC commented 9 months ago

What is the purpose of connect(p, p)?Whether it is a valid connect-equation? image

AHaumer commented 9 months ago

I suppose that is a bug. If you release the mouse button during a connection too early, you get such a connection with zero length. To me it seems that it doesn't affect the results, but we should remove it.

HansOlsson commented 9 months ago

I suppose that is a bug. If you release the mouse button during a connection too early, you get such a connection with zero length. To me it seems that it doesn't affect the results, but we should remove it.

Agreed. Specifically it doesn't impact the result if there are other connection(s) to p, and two lines above we see another connection to p: connect(IdealCommutingSwitch1.n1, p).