Opened 9 years ago

Closed 8 years ago

#3703 closed defect (fixed)

Linearization of CombiTable2D fails

Reported by: hans.hell@… Owned by: Willi Braun
Priority: high Milestone: 1.12.0
Component: Backend Version: v1.9.4-dev-nightly
Keywords: Cc:

Description

in version v1.9.4-dev.beta1.116+gdd6bae1

obviously CombiTable2D is not considered in Linearization.
therefore result in matrix B is not correct
see attached example.

Attachments (5)

LinTab.mo (1.7 KB ) - added by hans.hell@… 9 years ago.
LinTab.png (10.7 KB ) - added by hans.hell@… 9 years ago.
linear_LinTab.mo (563 bytes ) - added by hans.hell@… 9 years ago.
LinTabNEW.mo (1.7 KB ) - added by hans.hell@… 9 years ago.
linear_LinTabNEW.mo (589 bytes ) - added by hans.hell@… 9 years ago.

Download all attachments as: .zip

Change History (15)

by hans.hell@…, 9 years ago

Attachment: LinTab.mo added

by hans.hell@…, 9 years ago

Attachment: LinTab.png added

by hans.hell@…, 9 years ago

Attachment: linear_LinTab.mo added

comment:1 by Willi Braun, 9 years ago

Component: Code GenerationBackend
Owner: changed from Lennart Ochel to Willi Braun
Status: newassigned

comment:2 by hans.hell@…, 9 years ago

Correction: I attached wrong *.mo (table.y == 3.0) --> this cannot work.

In the NEW LinTabNEW.mo with a table ( y =u1+u2 ) should give a linearized system with B !=0.0
sorry for the inconvenience.

by hans.hell@…, 9 years ago

Attachment: LinTabNEW.mo added

by hans.hell@…, 9 years ago

Attachment: linear_LinTabNEW.mo added

comment:3 by Martin Sjölund, 9 years ago

Milestone: 1.9.41.9.5

Milestone pushed to 1.9.5

comment:4 by Martin Sjölund, 9 years ago

Milestone: 1.9.51.10.0

Milestone renamed

comment:5 by hans.hell@…, 8 years ago

in the current version the C-source for derivative calculation is missing! See example below.

modelica_real omc_$DER$$PModelica$PBlocks$PTables$PCombiTable2D$TAB$PgetTableValue(...)
{
  modelica_real _$$PModelica$PBlocks$PTables$PCombiTable2D$TAB$PgetTableValue$funDERy;
  modelica_real _y;
  _tailrecursive: OMC_LABEL_UNUSED
  _return: OMC_LABEL_UNUSED
//
// RETURN never defined
//
  return _$$PModelica$PBlocks$PTables$PCombiTable2D$TAB$PgetTableValue$funDERy;
}



Problem can be solved by manual C-coding of the derivative function (similar to the getTableValue-function). Then the derived A,B matrices are correct.

comment:6 by Martin Sjölund, 8 years ago

If you think getTableValue should have a derivative function, you should open a bug report on modelica.org

comment:7 by Martin Sjölund, 8 years ago

Milestone: 1.10.01.11.0

Ticket retargeted after milestone closed

comment:8 by Martin Sjölund, 8 years ago

Milestone: 1.11.01.12.0

Milestone moved to 1.12.0 due to 1.11.0 already being released.

comment:9 by Willi Braun, 8 years ago

Status: assignedaccepted

The derivative functions is missing due to the fact that functions were removed with the module removedUnusedFunction, which is applied to early.
This should be fixed with OMCompiler#1665.

comment:10 by Willi Braun, 8 years ago

Resolution: fixed
Status: acceptedclosed
Note: See TracTickets for help on using tickets.