Message Boards Message Boards

0
|
2219 Views
|
5 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Model doesn't run in SM 13.2 but runs in SM 12.3

Posted 1 year ago

Hi,
I have a big model that doesn't run in SM 13.2 (linux Version) but runs in SM 12.3 (Windows version).
I can't show the model because of intellectual property rights.
So, I hope you can give me at least a clue of what is happening.

That's the error I get when I try to validate the model in the 13.2 version:

Equation simplifications (alias elimination, etc) after successful index reduction revealed a structural singularity, where the following equations do not allow to solve for required variables:
    Algorithm no: 1 outvars: {$dynState.set1.s[1,1], $dynState.set1.s[1,2], $dynState.set1.s[1,3], $dynState.set1.s[1,4], $dynState.set1.s[1,5], $dynState.set1.s[1,6], $dynState.set1.s[1,7], $dynState.set1.s[1,8], $dynState.set1.s[1,9], $dynState.set1.s[1,10], $dynState.set1.s[2,1], $dynState.set1.s[2,2], $dynState.set1.s[2,3], $dynState.set1.s[2,4], $dynState.set1.s[2,5], $dynState.set1.s[2,6], $dynState.set1.s[2,7], $dynState.set1.s[2,8], $dynState.set1.s[2,9]...

In my bug-hunt I found something strange, I have a sub-system that when validated in SM 13.2 returns:

Error: Simulation model is not globally balanced, having 43 variables and 34 equations. Validation of model "subsystem_name" completed with 1 error.

When I validate the big model in the 12.3 version I get a lot of notifications and some warnings, but no errors:

... Warning: Equation system in "bigmodel_name".body1.a_0[3] and 202 other variables is too 

complex for checking conditional solvability that might be caused by if-expressions where the variable is only solvable in one of the branches. Warning: Equation system in "bigmodelname".body1.za[1] and 218 other variables is too complex for checking conditional solvability that might be caused by if-expressions where the variable is only solvable in one of the branches. Validation of model "bigmodel_tests".test completed successfully. The model is globally balanced with 1999 variables and 1999 equations. Among these, 1661 equations are trivial.

For the same sub-system, the validation in SM 12.3 returns:

Validation of model "subsystem_name" completed successfully. The model has 45 variables and 36 equations. Among these, 36 equations are trivial.

As far I understand, SM got more restrict rules when evaluating models. Is that a common issue in the newer version? Any hint on how to approach this problem?


SM 13.2 System
Product version: 13.2.0.7
Client: Model Center
Client version: 13.2.0.5
Client creation date: 2022-10-14T10:45:22.617528
Client build revisions: J:28d7cd00c, L:d83e98c31, S:0ae173cfb
Client build type: 64 bit
Kernel version: 13.2.0.6
Kernel creation date: 2022-10-13T12:47:55.408784
Kernel build revisions: J:28d7cd00c, L:d83e98c31, S:7f4cef66e
Kernel root directory: /usr/local/Wolfram/SystemModeler/13.2
Installation directory: /usr/local/Wolfram/SystemModeler/13.2
Platform: Linux Mint 21

SM 12.3 System
Product version: 12.3.1.7
Client: Model Center
Client version: 12.3.1.6
Client creation date: 2021-06-07T11:45:13.640000
Client build revisions: S:1b0160c02, J:1dbf5d051, L:38c242434
Client build type: 64 bit
Kernel version: 12.3.1.7
Kernel creation date: 2021-05-27T14:59:37.824000

POSTED BY: Michel Oliveira
5 Replies

Hi,

Maybe I can give some clue. From time to time, System Modeler gets better at detecting singularities during build. Such development is often introduced as a measure against problems affecting simulation in earlier versions. Sometimes – possibly what is seen here – a model may have been able to simulate with acceptable results in an earlier version despite presence of model singularities, but the quality of such simulation results cannot be guaranteed.

In my bug-hunt I found something strange, I have a sub-system that when validated in SM 13.2 returns:

If this is a sub-system which is not meant to be simulated on its own, it is not a problem that it is not globally balanced. The difference between being reported as an error or not might be due to some change in the classification of whether the model is expected to be usable on its own. Maybe the model has an experiment annotation despite it not being intended for simulation?

Finally, a general recommendation for how to approach the problem would be to look into why some equation systems are so big. Generally speaking, models that work well don't have equation systems of these sizes. However, there are exceptions, for example when the torn size of the system is small. Smaller equation systems not only make the model faster and more reliable to simulate, but also makes it a lot easier for the user to understand and debug.

POSTED BY: Henrik Tidefelt

Hi, sorry for the late response and thanks for your answer.

If this is a sub-system which is not meant to be simulated on its own, it is not a problem that it is not globally balanced.

The sub-system is not meant to be simulated on its own, so I guess that subsystem is fine.

Finally, a general recommendation for how to approach the problem would be to look into why some equation systems are so big. Generally speaking, models that work well don't have equation systems of these sizes.

But how do I know a suitable size? My model is really big and very complex, it has electrical and mechanical domain.

However, there are exceptions, for example when the torn size of the system is small.

What do you mean by torn size? I've searched the term but I didn't found anything clear about it.

NOTE: Sorry, I replied to myself but should be to you. I don't know how to delete.

POSTED BY: Michel Oliveira

But how do I know a suitable size? My model is really big and very complex, it has electrical and mechanical domain.

There is no general answer; within any domain there are applications for models of different level of detail and complexity. How to select the right level of complexity for the task is something to be learned by experience, and is a key aspect of becoming a good modeler.

POSTED BY: Henrik Tidefelt

What do you mean by torn size? I've searched the term but I didn't found anything clear about it.

It is the effective size of an equation system after applying equation system tearing. The effect of tearing can be seen in the Equation Browser (wsm:///ref/UserGuide/SimulationCenterEquationBrowser.html).

POSTED BY: Henrik Tidefelt

NOTE: Sorry, I replied to myself but should be to you. I don't know how to delete.

Obviously me neither.

POSTED BY: Henrik Tidefelt
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