Hi Christoph,

unfortunately, there is a bug for equations like Record = function(..). I am still fixing this bug. Anyway your models is a bit tricky because of the inversion of the function foobar.

Mit freundlichen Grüßen,
Kind regards,


Jens Frenkel

_________________________________________________________________


Dipl.-Ing.
Jens Frenkel

*****************************************************************
Technische Universität Dresden
Institut für Verarbeitungsmaschinen und Mobile Arbeitsmaschinen
D-01062 Dresden

Tel: 0351 463-39278
Fax: 0351 463-37731
eMail: [email protected]
*****************************************************************


*****************************************************************
Dresden University of Technology
Institute of Processing Machines and Mobile Machinery
D-01062 Dresden
Germany

Tel: +49 351 463-39278
Fax: +49 351 463-37731
eMail: [email protected]
*****************************************************************



Am 20.12.2010 12:51, schrieb Martin Sjölund:
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-----



Reply via email to