Hi Timo,

fixed in revision 9258. There is also fixed the problem with link FMU with interactive.

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 06.06.2011 07:16, schrieb Timo Penndorf:
Hello,

I use Revision r9248 on a 64-bit fedora linux.

There is an error if I want to access real values (with high
indices, maybe the last one in modelDescription.xml) from a fmu.


I got the following code in den XYZ_FMU.c:

// define model size
#define NUMBER_OF_STATES 18
#define NUMBER_OF_EVENT_INDICATORS 36
#define NUMBER_OF_REALS 2861
#define NUMBER_OF_INTEGERS 0
#define NUMBER_OF_STRINGS 0
#define NUMBER_OF_BOOLEANS 0
#define NUMBER_OF_EXTERNALFUNCTIONS 0


The last entry of modelDescription.xml is:

   <ScalarVariable
     name="p_arm3_aussen.sarturis_position_out_mat[3,3]"
     valueReference="2878"
     variability="continuous"
     causality="internal"
     alias="alias">
     <Real   />
   </ScalarVariable>


As you see the value reference is 2878, which means there
are 2879 values in my model (zero based). This is exactly
the NUMBER_OF_STATES + NUMBER_OF_REALS.


In /usr/include/omc/fmu_model_interface.c there is following
code (line 567)

     if (vrOutOfRange(comp, "fmiGetReal", vr[i], NUMBER_OF_REALS))
       return fmiError;

Which means that one can never access scalar variables with a
valueReference greater than NUMBER_OF_REALS. As I understand
both states and depending real values are threated as
scalar variables in fmu without distinction.


Timo





Reply via email to