Alright, alright. We got it. :) Best regards. Mahder Gebremedhin. ________________________________________ From: owner-openmodelicainter...@ida.liu.se [owner-openmodelicainter...@ida.liu.se] on behalf of Adrian Pop [adrian....@liu.se] Sent: Thursday, February 28, 2013 9:17 PM To: openmodelicainterest@ida.liu.se Cc: Bill Janssen Subject: Re: connect equations ignore missing components?
Hi, Read the Modelica specification, especially conditional components as fixes is in this case. Conditional components can only appear in connect statements and if the condition of the component is false the connect is removed. Cheers, Adrian Pop/ On 2013-02-28 20:37, Bill Janssen wrote: > I'm looking at this model from the MSL, > Modelica.Mechanics.Rotational.Interfaces: > > partial model PartialOneFlangeAndSupport > parameter Boolean useSupport=false > "= true, if support flange enabled, otherwise implicitly grounded"; > Flange_b flange "Flange of shaft"; > Support support if useSupport; > protected > Support internalSupport; > Components.Fixed fixed if not useSupport; > equation > connect(support, internalSupport); > connect(internalSupport, fixed.flange); > > This seems broken to me. Shouldn't there be if-equations around the > connect equations? Either "support" or "fixed" is going to be missing. > Won't that raise errors? How is OpenModelica OK with this? > > Bill >