Opened 4 years ago

Last modified 3 years ago

#6346 assigned defect

Enable analytic jacobians for daeMode

Reported by: Francesco Casella Owned by: Karim Adbdelhak
Priority: high Milestone:
Component: Backend Version: 1.16.0
Keywords: Cc: adrien.guironnet@…, Andreas Heuermann

Description

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 compiler flag documentation , which makes no explicit reference to either odeMode nor daeMode, but is clear from the description of 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, 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.

Change History (4)

comment:1 by Francesco Casella, 4 years ago

Cc: adrien.guironnet@… added

comment:2 by Francesco Casella, 4 years ago

Cc: Andreas Heuermann added
Component: *unknown*Backend
Milestone: NeedsInput1.18.0
Owner: changed from somebody to Karim Adbdelhak
Status: newassigned

I tentatively assign this to Karim. We'll discuss this together with you, Andreas and Adrien.

comment:3 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.