Message Boards Message Boards

0
|
17703 Views
|
2 Replies
|
6 Total Likes
View groups...
Share
Share this post:

Error: Model is structurally singular in equation

Posted 10 years ago

Hi, can someone explain to me what are the possible reasons for getting the following error and what can I do about it ?

Error: Model is structurally singular in equation

POSTED BY: Mohamed Mahmoud
2 Replies

You get this error message when the model equations are such that a simple structural analysis of the equations reveals that the system cannot be solved. This is a more fine grained condition than merely checking that a model has the same number of variables and equations (checking that the model is globally balanced). For example, the model

model StructurallySingular
  Real x(start = 0);
  Real y;
equation
  der(x) = 1 - x;
  x*x = 1;
end StructurallySingular;

is globally balanced, but there is no way to compute a solution for the variable y. The SystemModeler compiler will detect that the variable y would need to be solved somehow using the two equations given in the model, but as this is not possible you get the message:

Model is structurally singular, the equations
  x ^ 2.0 = 1.0;
  der(x) = 1.0 - x;
do not allow to solve for required variables.

Note that this can be detected without looking at the details of the equations. Compare with the following model which is not structurally singular, but having a singularity that shows up during numeric integration:

model IllConditioned
  Real x(start = 1);
  Real y;
  Real z;
equation
  when time > 0.5 then
    x = 0;
  end when;
  x * y + x * z = 1;
  x * y - x * z = 2;
end IllConditioned;

At time 0.5, the linear system of equations defining y and z given x becomes singular, and you get the message:

Failed to solve linear system
Simulation terminated at time 0.5
POSTED BY: Henrik Tidefelt

I assume you are using Modelica since I saw this error in Modelica site. I suggest you contact Wolfram Modelica support on this. This looks like an internal error, but someone in support would know.

From https://openmodelica.org The error is

(STRUCT_ SINGULAR_EQUATION,SYMBOLIC(),ERROR(), "Model is structurally singular in equation %s."),

POSTED BY: Nasser M. Abbasi
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract