﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6201	Acos in implicit function, failing to solve non-linear system	Andreas Heuermann	Andreas Heuermann	"For the following model the runtime needs to solve `x` implicit:

{{{
model impAcos
  Real x(start=1);
equation
  time = acos(x);
end impAcos;
}}}

but will fail to do so. The equation should be well defined ([https://www.wolframalpha.com/input/?i=t+%3D+acos%28x%29%2C+0%3C%3Dt%3C%3D1 print from WolframAlpha]), but the solution at `time=0` is directly on the edge of the domain where `acos` is well defined.

The error message:
{{{
record SimulationResult
    resultFile = """",
    simulationOptions = ""startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-06, method = 'dassl', fileNamePrefix = 'impAcos', options = '', outputFormat = 'mat', variableFilter = '.*', cflags = '', simflags = ''"",
    messages = ""Simulation execution failed for model: impAcos
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
stdout            | warning | While solving non-linear system an assertion failed during initialization.
|                 | |       | | The non-linear solver tries to solve the problem that could take some time.
|                 | |       | | It could help to provide better start-values for the iteration variables.
|                 | |       | | For more information simulate with -lv LOG_NLS_V
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1.01 <= 1.0

[...]

assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | warning | The following assertion has been violated during initialization at time 0.000000
assert            | debug   | Model error: Argument of acos(x) outside the domain -1.0 <= 1 <= 1.0
assert            | debug   | Solving non-linear system 2 failed at time=0.
|                 | |       | For more information please use -lv LOG_NLS.
assert            | info    | simulation terminated by an assertion at initialization
}}}"	defect	closed	critical	1.18.0	Run-time	v1.17.0-dev	fixed	acos, non-linear system, assert	Philip Hannebohm
