See spec section 4.4.5 Conditional Component Declaration
"If the Boolean expression is false the component is not present in the
flattened DAE [its modifier is ignored], and connections to/from the
component are removed."
--
Martin Sjölund
On 02/28/2013 08:37 PM, 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