﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
5761	Symbolic Jacobians not correct for Linearization and FMI	Karim Adbdelhak	Lennart Ochel	"The following simple model does produce ""nan"" entries for the jacobian entries:

{{{
loadString(""
model M
  output Real lang = (u-1)^2;
  input Real u;
  Real x(start=1,fixed=true);
equation
  der(x) = x^2;
end M;
""); getErrorString();

linearize(M, simflags=""-jacobian=coloredSymbolical""); getErrorString();
}}}

The start value of {{{x}}} seems to cause this, with zero there is no problem.

This is the generated linear system code:
{{{
model linear_M
  parameter Integer n = 1 ""number of states"";
  parameter Integer p = 1 ""number of inputs"";
  parameter Integer q = 1 ""number of outputs"";

  parameter Real x0[n] = {-nan};
  parameter Real u0[p] = {0};

  parameter Real A[n, n] = [nan];
  parameter Real B[n, p] = [-nan];
  parameter Real C[q, n] = [nan];
  parameter Real D[q, p] = [-1.999999932736385];

  Real x[n](start=x0);
  input Real u[p](start=u0);
  output Real y[q];

  Real 'x_x' = x[1];
  Real 'u_u' = u[1];
  Real 'y_lang' = y[1];
equation
  der(x) = A * x + B * u;
  y = C * x + D * u;
end linear_M;
}}}

Also setting the start value to 0.9 seems to be changed to 9 which is wierd. 
"	defect	closed	high	1.16.0	FMI	v1.16.0-dev	worksforme	symbolic jacobian linearize	Francesco Casella Karim Adbdelhak Andreas Heuermann
