Opened 8 years ago

#4117 new defect

partial differential create complex ArrayEquation?

Reported by: Vitalij Ruge Owned by: somebody
Priority: normal Milestone: Future
Component: *unknown* Version:
Keywords: Cc: Willi Braun

Description

The following example

model foo
  function f
    input Real[2] x;
    output Real[2] y;
    output Real[2] z;
  algorithm
    y[1] := 2*x[1]^2 + 1; y[2] := 3*x[2]^3 + 2;
    z[1] := -y[1]/2+1/2+7; z[2] := -y[2]/3+2/3-7;
  end f;

  Real[ 2] y(each start = -1);
  Real z1, z2;
equation
  (, y) = f(y);
  der(y[1]) = -z1*y[2] +1;
  der(y[2]) = -z2*y[1] + z1*y[2] +3;
end foo;

failed with

"[/home/vruge/OM/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:5880:7-5880:48:writable] Error: Internal error for Eqn: 1 : $DER$$Pfoo$Pf({y[1], y[2]}, {1.0, 0.0})[2] * $DER.y[1] + $DER$$Pfoo$Pf({y[1], y[2]}, {0.0, 1.0})[2] * $DER.y[2] = $DER.y[2]
array equations currently only supported on form v = functioncall(...)
[/home/vruge/OM/OMCompiler/Compiler/SimCode/SimCodeUtil.mo:552:5-552:146:writable] Error: Internal error function createSimCode failed [Transformation from optimised DAE to simulation code structure failed]
"

Change History (0)

Note: See TracTickets for help on using tickets.