Hello,
How is Modelica supposed to handle nested components? Is the following code (for a simple electrical circuit) valid or not?
model Circuit
Modelica.Electrical.Analog.Basic.Ground ground;
Modelica.Electrical.Analog.Sources.SineVoltage sineVoltage;
Modelica.Electrical.Analog.Basic.Ground ground1;
ResistorGroup resistorGroup;
equation
connect (ground.p, sineVoltage.p);
connect (sineVoltage.n, resistorGroup.resistor.p);
connect (resistorGroup.resistor1.n, ground1.p);
end Circuit;
model ResistorGroup
Modelica.Electrical.Analog.Basic.Resistor resistor1;
Modelica.Electrical.Analog.Basic.Resistor resistor;
equation
connect (resistor.n, resistor1.p);
end ResistorGroup;
The code works in Dymola, but OMC (1.4.3) gives the following error:
record
resultFile = "Simulation failed.
Model is structurally singular, error found sorting equations 0.0 = 0.0;
for variables
"
end record
Is this a bug in OMC, and if so, is there a workaround?
Thanks,
Jasleen