At 7:34 PM +0100 11/24/06, Giovanni A. Cignoni wrote:
Hi there,

thank for the new versions of the files.

Now we are facing another problem regarding the order of definitions
and uses of variables. The reference manual of DAVE-ML states that
"variableDefs should appear in calculation order" (page 9 of v. 1.9b2).

That "should" is a requirement or just a good practice suggestion?

In the F16 dml there are two cases of variables used before they are
defined (details by G. Mirri are in the following).

I suppose that, at this point in the development of DAVE-ML, the true
requirement is that definitions and uses may appear not in order, but an
ordering must be possible:
- writing them in order is just a good practice for the readability of
  the XML;
- if an ordering is not possible (there is a cycle) the DAVE-ML is not
  valid.

Is this right?

Thanks in advance,
Giovanni A. Cignoni.


-------------------------------------------------------------------------------

F16_aero.dml Revision: 108

 - line 372: definition of variable "cl1" refers to variable "clt" in
   the calculation block (at line 379), but variable "clt" is not yet defined
   (it will be defined later at line 488);

 - line 395: definition of variable "cn1" refers to variable "cnt" in
   the calculation block (at line 402), but variable "cnt" is not yet defined
   (it will be defined later at line 519).


Giovanni,

Thanks again for finding and report this mistake.

It would appear, then, that variableDef order is NOT important, but I still think it is a good idea. As Dan Newman pointed out in his reply, problems may occur with some processors if functions are defined out-of-order.

Your two suggestions are probably exactly right. It IS good practice (IMHO) to define the variables in the order they will be used; if this is not possible, we could end up with a circular reference which would (for a static model) indicate a problem.

I will fix the F16 model and reword the reference guide.

Thanks again for finding these bugs!

-- Bruce Jackson
--
Bruce Jackson <[EMAIL PROTECTED]>  or  http://public.xdi.org/=bjax
Dynamic Systems & Control Branch    Research & Technology Directorate
8 Langley Boulevard, MS 308
NASA Langley Research Center                  Building 1232, Room 316
Hampton, VA 23681-0001             scud://N 37 05'31.7" W 76 22'55.1"
http://dcb.larc.nasa.gov/DCBStaff/ebj/ebj.html      "There is no try"

Reply via email to