Opened 4 years ago

Last modified 20 months ago

#4815 new task

Cleanup Runtime

Reported by: Christian Andersson Owned by: Christian Andersson
Priority: major Milestone:
Component: FMU/JMU runtime Version: trunk
Keywords: Cc:

Description (last modified by Christian Andersson)

It's time to do a little cleanup of runtime. At least these tasks should be performed:

  • Remove duplicates of getting to/from z-vector to valueref
  • Move types in jmi to jmi_types.h
  • Introduce jmi_math.* for mathematical functions such as sin/cos etc.
  • Change jmi_cs.* to jmi_co_simulation with a co_simulation struct and a do_step implementation that both CS FMI versions can use.
  • Remove all the old Jacobian code, coloring/partial derivatives/DAE and init interfaces.
  • Make jmi_math.c/h independent of jmi.h
  • Refactor the IllConditionedJacobian logging, currently it is copied in 3 places
  • Create a new file for collecting all linear algebra operations.
  • Refactor how scaling is updated, see: kin_err, jmi_regularize_and_do_condition_estimate_on_scaled_jacobian, jmi_kinsol_invoke_kinsol and jmi_update_f_scale

There are more things to be done I'm sure but these are the first that comes to mind.

Attachments (1)

jmi_math.patch (40.6 KB) - added by efredriksson 4 years ago.

Download all attachments as: .zip

Change History (31)

Changed 4 years ago by efredriksson

Attachment: jmi_math.patch added

comment:1 Changed 4 years ago by aramle

r8556 Introduced jmi_math.*.

comment:2 Changed 4 years ago by aramle

r8557 Fixed missed redeclaration.

comment:3 Changed 3 years ago by efredriksson

Description: modified (diff)

Added task related to CS.

comment:4 Changed 3 years ago by efredriksson

Description: modified (diff)

Added task related to removing old Jacobian code.

comment:5 Changed 3 years ago by efredriksson

r8993 Major cleanup of run-time

  • Removed old Jacobian/partial derivatives code
  • Removed old DAE and init system interface
  • Moved things between jmi.x and jmi_util.x so they are easier to find
  • There are only one set of index/type to/from value reference functions

comment:6 Changed 3 years ago by efredriksson

Description: modified (diff)

comment:7 Changed 3 years ago by Christian Andersson

changeset:9082

Cleaned up computation of the scaled vector norm. Note though that this should be moved to jmi_maths in the future. Related to ticket:4815

comment:8 Changed 3 years ago by Christian Andersson

Description: modified (diff)

comment:9 Changed 3 years ago by Christian Andersson

Why change jmi_cs.* to jmi_co_simulation.*? This would make it cs inconsistent with me as for me we don't name items model_exchange.

I vote for not changing the name of jmi_cs.*.

comment:10 in reply to:  9 Changed 3 years ago by efredriksson

Replying to chria:

Why change jmi_cs.* to jmi_co_simulation.*? This would make it cs inconsistent with me as for me we don't name items model_exchange.

I vote for not changing the name of jmi_cs.*.

The name change is not that important I just felt it could be clearer. I don't like anything about jmi_me, it should probably be split into jmi_event_iteration, jmi_ode_problem and jmi_fmi (but that is in the future).

comment:11 Changed 3 years ago by efredriksson

Description: modified (diff)

comment:12 Changed 3 years ago by efredriksson

Description: modified (diff)

r9277 Refactored out the "IllConditionedJacobian" logging such that it's in its own function.

comment:13 Changed 3 years ago by efredriksson

r9280 Merging r9277 to trunk: Refactored out the "IllConditionedJacobian" logging such that it's in its own function.

comment:14 Changed 3 years ago by Christian Andersson

changeset:9578

Removed dependencies that should not have been there. Related to ticket:4815

comment:15 Changed 3 years ago by Christian Andersson

changeset:9581

Moved vector operations to use the ones implemented on the NVector module. Related to ticket:4815

comment:16 Changed 3 years ago by Christian Andersson

changeset:9597

Minor cleanup in runtime. Related to ticket:4815

comment:17 Changed 3 years ago by Christian Andersson

changeset:9636

Minor cleanup to Kinsol. Related to ticket:4815

comment:18 Changed 3 years ago by Christian Andersson

changeset:9637

Minor rename of functions. Related to ticket:4815

comment:19 Changed 3 years ago by Christian Andersson

changeset:9638

Minor cleanup and removed many direct usage of direct accesses to DlsMat type. Related to ticket:4815

comment:20 Changed 3 years ago by Christian Andersson

changeset:9641

Minor improvements to the sparse linear solver. Related to ticket:4815

comment:21 Changed 3 years ago by Christian Andersson

changeset:9648

Minor clarification in the Brent solver. Related to ticket:4815

comment:22 Changed 3 years ago by Christian Andersson

Description: modified (diff)

comment:23 Changed 3 years ago by Christian Andersson

changeset:9769

Created new files for collecting all linear algebra routines. Related to ticket:4815

comment:24 Changed 3 years ago by Christian Andersson

changeset:9833

Minor cleanup in runtime. Related to ticket:4815

comment:25 Changed 3 years ago by Christian Andersson

changeset:9834

Removed direct usage of kinsol attributes. Related to ticket:4815

comment:26 Changed 3 years ago by Christian Andersson

changeset:9835

Fixed problem introduced in changeset:9833, related to ticket:4815

comment:27 Changed 3 years ago by aramle

r9887 Clarified option description.

comment:28 Changed 3 years ago by aramle

Milestone: 2.0.x2.1.x

comment:29 Changed 2 years ago by Christian Andersson

Milestone: 2.1.x2.2.x

comment:30 Changed 20 months ago by Christian Andersson

Milestone: 2.2.x

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.