.Modelica_LinearSystems2.WorkInProgress.Tests.care.care4

Information

Example 4 from Benner benchmarks

Interface

function care4
  extends Modelica.Icons.Function;
  import MatricesMSL = Modelica.Math.Matrices;
  import Modelica_LinearSystems2.Math.Matrices;
  input String outputFile = "";
  output Real X1[8, 8] = Matrices.care(A, B, R, Q, false);
  output Real X2[8, 8] = Matrices.care(A, B, R, Q, true);
  output Real X3[8, 8] = [8.9189179333315727e-001, 7.3663786199205217e-001, 6.0233803898550886e-001, 5.2119369438941698e-001, 5.9291413705093765e-001, 3.4884170426731775e-001, 2.1987251788724343e-001, 1.4147828732718845e-001; 7.3663786199205217e-001, 1.3795283147296966e+000, 1.0764852472252566e+000, 8.0385954540875648e-001, 7.0054708500170060e-001, 5.1907694010695571e-001, 3.3482970113161148e-001, 1.7436126307010602e-001; 6.0233803898550886e-001, 1.0764852472252566e+000, 1.4919719225454409e+000, 1.0138055847275820e+000, 8.0136227954219730e-001, 7.4348008693508494e-001, 4.1924715019049130e-001, 2.0305623101755202e-001; 5.2119369438941698e-001, 8.0385954540875648e-001, 1.0138055847275820e+000, 1.1487703436604533e+000, 7.3268221838065584e-001, 5.3128128249432527e-001, 3.4101748640719931e-001, 1.7321992448577761e-001; 5.9291413705093765e-001, 7.0054708500170060e-001, 8.0136227954219730e-001, 7.3268221838065584e-001, 5.9205254501700877e-001, 4.2933248637928978e-001, 2.8472012561858129e-001, 1.4763528881298796e-001; 3.4884170426731775e-001, 5.1907694010695571e-001, 7.4348008693508494e-001, 5.3128128249432527e-001, 4.2933248637928978e-001, 3.5530939867621736e-001, 2.3769595202736848e-001, 1.2407312100669236e-001; 2.1987251788724343e-001, 3.3482970113161148e-001, 4.1924715019049130e-001, 3.4101748640719931e-001, 2.8472012561858129e-001, 2.3769595202736848e-001, 1.9654065110986793e-001, 1.0236228817160951e-001; 1.4147828732718845e-001, 1.7436126307010602e-001, 2.0305623101755202e-001, 1.7321992448577761e-001, 1.4763528881298796e-001, 1.2407312100669236e-001, 1.0236228817160951e-001, 7.9489693942802808e-002];
  output Real ku1 = Matrices.Internal.k_care_u(A, Q, G, X1);
  output Real ku2 = Matrices.Internal.k_care_u(A, Q, G, X2);
  output Real ku3 = Matrices.Internal.k_care_u(A, Q, G, X3);
end care4;

Generated at 2024-04-28T18:16:21Z by OpenModelicaOpenModelica 1.22.3 using GenerateDoc.mos