Opened 8 years ago

Closed 7 years ago

Last modified 7 years ago

#4456 closed defect (fixed)

PreOptModule evalFunc leads to overdetermined system

Reported by: Patrick Täuber Owned by: Volker Waurich
Priority: normal Milestone: 1.12.0
Component: Backend Version:
Keywords: function evaluation Cc: Volker Waurich

Description

The following model fails, because one of three variables is removed in pre-optimization module evalFunc but there are still three equations:

model evalFuncBug
  Real x[2], y;
equation
  (x,y) = f(x[1]);
end evalFuncBug;

function f
  input Real x1;
  output Real x[2];
  output Real y;
algorithm
  x[1] := 2;
  x[2] := x1 - 2;
  y := x[1] + x[2];
end f;

Change History (5)

comment:1 by Volker Waurich, 8 years ago

Owner: changed from Lennart Ochel to Volker Waurich
Status: newassigned

comment:2 by Volker Waurich, 8 years ago

thats cruel, a funtions input as its output
I'll have a look.

comment:3 by Volker Waurich, 7 years ago

It's fixed. Functions are not evaluated if the functions array-output needs to be expanded. This model is in the testsuite.

comment:4 by Volker Waurich, 7 years ago

Resolution: fixed
Status: assignedclosed

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

Milestone: Future1.12.0

1355755 is in 1.12.0.

Note: See TracTickets for help on using tickets.