I count only 2 equations. The lhs of r = foobar(x,y,z) is constant, so
it only counts as one (I might be wrong about that though).
--
Martin Sjölund
On 2010-12-20 12:17, Christoph Höger wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi all,
can anbybody tell me, why a System in the following form throws an error?
record R
Real _1;
Real _2;
end R;
model Test
Real x(start=-1.0);
Real y(start=-1.0);
Real z(start=-1.0);
constant R r = R(0.0, 0.0);
equation
x = time;
r = foobar(x,y,z);
end Test;
function foobar
input Real x,y,z;
output R res;
annotation(Library="sine");
external "C";
end foobar;
If I count it right I have 3 variables and 3 equations, but omc reports
only 2 equations?
Unfortunately array equations are not supported yet, so how would I use
multi value external functions?
thanks,
Christoph
- --
Christoph Höger
Technische Universität Berlin
Fakultät IV - Elektrotechnik und Informatik
Übersetzerbau und Programmiersprachen
Sekr. TEL12-2, Ernst-Reuter-Platz 7, 10587 Berlin
Tel.: +49 (30) 314-24890
E-Mail: [email protected]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk0PO14ACgkQhMBO4cVSGS/TJwCeLsFFVsXESTr+uncf8YI7Dqcu
FrQAoIK7Gu8EJVcZCqvA+2B7kXC3k/AL
=z+/x
-----END PGP SIGNATURE-----