﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
1086	Multiple Function Return Arguments	krsta	krsta	"""When i run this it just says that OMC has stopped working and then nothing happens?""

{{{
function t

input Real hh;

output Real e1;

output Real e2;

algorithm

e1:=hh;

e2:=2*hh;

end t;


model j

Real j1;

Real j2;

equation

(j1,j2)=t(2);

end j;


simulate(j,stopTime=5)
}}}

Another example:

{{{
function f
  input Real x;
  input Real y;
  output Real r1;
  output Real r2;
  output Real r3;
algorithm
  r1 := x;
  r2 := y;
  r3 := x*y;
end f;   

model fCall
  Real x[3];
  Real a, b, c;
equation
  (a, b, c) = f(1.0, 2.0);
  (x[1], x[2], x[3]) = f(3.0, 4.0);
end fCall;

getVersion();
loadFile(""functions.mo"");
instantiateModel(fCall);
f(2.5, 3);
simulate(fCall);

incidence_row_exp TUPLE not impl. yet.incidence_row_exp TUPLE not impl. yet.incidence_row_exp TUPLE not impl. yet.incidence_row_exp TUPLE not impl. yet.""1.4.4""0
true
""fclass fCall
Real x[1];
Real x[2];
Real x[3];
Real a;
Real b;
Real c;
equation
  (a,b,c) = (1.0,2.0,2.0);
  (x[1],x[2],x[3]) = (3.0,4.0,12.0);
end fCall;
""
(2.5,3.0,7.5)
record
    resultFile = ""Simulation failed.
Too few equations, underdetermined system. The model has 6 variables and 2 equations
""
end record
}}}

Probably some problem with multiple function return arguments?"	defect	closed	high				fixed		krsta
