Skip to content

ImproveSolver - #4864

Open
HansOlsson wants to merge 3 commits into
modelica:masterfrom
HansOlsson:FixSolve
Open

HansOlsson wants to merge 3 commits into
modelica:masterfrom
HansOlsson:FixSolve

Conversation

@HansOlsson

@HansOlsson HansOlsson commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Improve non-linear solver in case the starting values are just at the edge (since they might due to round-off be slightly off which causes a failure).

Closes #4719

Note that it is more cautious than the previous fix ( 42f8091 ) to reduce the risk of regressions - but at the cost of making it slightly longer and slightly slower (when it triggers).

We should separately improve the test-cases.

@HansOlsson HansOlsson added this to the MSL4.2.0 milestone Nov 10, 2026
@HansOlsson HansOlsson added the bug Critical/severe issue label Nov 10, 2026
MSL-RegressionTesting-CI

This comment was marked as outdated.

@MSL-RegressionTesting-CI

Copy link
Copy Markdown

@HansOlsson
HansOlsson dismissed MSL-RegressionTesting-CI’s stale review November 10, 2026 14:37

The run was interrupted. CI is being improved.

@HansOlsson

Copy link
Copy Markdown
Contributor Author

Note: I didn't add any test-cases as already the existing test-case shows "Improved".

@MatthiasBSchaefer would it make sense in these cases to change "Regression testing passed successfully" to something "Regression testing passed successfully, with improvements"?

@beutlich beutlich added the L: Math Issue addresses Modelica.Math label Nov 11, 2026
@HansOlsson

Copy link
Copy Markdown
Contributor Author

Note that I didn't remove fc:=fb; - but moved it after the if-statement.

The reason is we compute a new fb in the if-statement and that works around the issue, we should obviously update fc as well, and having it after the if-statement avoids having two separate assignment to fc.

@MSL-RegressionTesting-CI

Copy link
Copy Markdown

@HansOlsson HansOlsson added the L: Media Issue addresses Modelica.Media label Nov 20, 2026
@HansOlsson

Copy link
Copy Markdown
Contributor Author

I added "Media" tag as it fixes an error for a Media-test-case, but the change is purely in the Math-part.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Critical/severe issue L: Math Issue addresses Modelica.Math L: Media Issue addresses Modelica.Media

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Issues with Modelica.Media.Examples.SolveOneNonlinearEquation.InverseIncompressible_sh_T at t=1

3 participants