/* Linearization */
#include "Sum_model.h"
#if defined(__cplusplus)
extern "C" {
#endif

const char *Sum_linear_model_frame()
{
  return "model linear_Sum\n  parameter Integer n = 0; // states\n  parameter Integer k = 2; // top-level inputs\n  parameter Integer l = 1; // top-level outputs\n"
  "  parameter Real x0[0] = {%s};\n"
  "  parameter Real u0[2] = {%s};\n"
  "  parameter Real A[0,0] = zeros(0,0);%s\n"
  "  parameter Real B[0,2] = zeros(0,2);%s\n"
  "  parameter Real C[1,0] = zeros(1,0);%s\n"
  "  parameter Real D[1,2] = [%s];\n"
  "  Real x[0];\n"
  "  input Real u[2](start= u0);\n"
  "  output Real y[1];\n"
  "\n    Real 'u_u' = u[1];\n  Real 'u_u1' = u[2];\n  Real 'y_y' = y[1];\n\n"
  "equation\n  der(x) = A * x + B * u;\n  y = C * x + D * u;\nend linear_Sum;\n";
}
const char *Sum_linear_model_datarecovery_frame()
{
  return "model linear_Sum\n  parameter Integer n = 0; // states\n  parameter Integer k = 2; // top-level inputs\n  parameter Integer l = 1; // top-level outputs\n  parameter Integer nz = 0; // data recovery variables\n"
  "  parameter Real x0[0] = {%s};\n"
  "  parameter Real u0[2] = {%s};\n"
  "  parameter Real z0[0] = {%s};\n"
  "  parameter Real A[0,0] = zeros(0,0);%s\n"
  "  parameter Real B[0,2] = zeros(0,2);%s\n"
  "  parameter Real C[1,0] = zeros(1,0);%s\n"
  "  parameter Real D[1,2] = [%s];\n"
  "  parameter Real Cz[0,0] = zeros(0,0);%s\n"
  "  parameter Real Dz[0,2] = zeros(0,2);%s\n"
  "  Real x[0];\n"
  "  input Real u[2](start= u0);\n"
  "  output Real y[1];\n"
  "  output Real z[0];\n"
  "\n  Real 'u_u' = u[1];\n  Real 'u_u1' = u[2];\n  Real 'y_y' = y[1];\n\n"
  "equation\n  der(x) = A * x + B * u;\n  y = C * x + D * u;\n  z = Cz * x + Dz * u;\nend linear_Sum;\n";
}
#if defined(__cplusplus)
}
#endif

