﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
6346	Enable analytic jacobians for daeMode	Francesco Casella	Karim Adbdelhak	"By running this simple model
{{{
model M
  Real x(start = 1, fixed = true),y;
  
equation
  der(x) = -y;
  y + 0.1*sin(y) = x;
  annotation(__OpenModelica_commandLineOptions=""--daeMode --generateSymbolicJacobian"",
             __OpenModelica_simulationFlags(jacobian=""coloredSymbolical"",lv=""LOG_STATS""));
end M;
}}}
I understand that analytic jacobians are not generated in DAE mode, since there is no trace of their computation in the C code and in the declarative debugger.

This is not very clear from the documentation of the {{{--generateSymbolicJacobian}}} [https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/omchelptext.html#omcflag-generatesymbolicjacobian compiler flag documentation]  , which makes no explicit reference to either {{{odeMode}}} nor {{{daeMode}}}, but is clear from the description of [https://openmodelica.org/doc/OpenModelicaUsersGuide/latest/omchelptext.html#omcflag-postoptmodules postOptModules], which states
  symbolicJacobian (Detects the sparse pattern ''of the ODE system'' and calculates also the symbolic Jacobian if flag '--generateSymbolicJacobian' is enabled.)

In fact, [https://github.com/OpenModelica/OpenModelica/blob/c8233fa62ad0c3e01be24d6e4f97134c02204a10/OMCompiler/SimulationRuntime/c/simulation/solver/ida_solver.c#L345 this line of code] should print out an appropriate error message when I try to turn on analytic jacobians in DAE mode, as in the above message. Unfortunately, if I do it in OMEdit, the simulation output is not passed to the simulation output window, so I can't see that (why?).

For the sake of high-speed power grid simulation, computing the jacobian of the DAE in daeMode would be very useful, since most of its nonzero coefficients are parameters and could be computed only once at initialization."	defect	assigned	high		Backend	1.16.0			adrien.guironnet@… Andreas Heuermann
