DAVEtools 0.9.3 README

JavaScript must be enabled in your browser to display the table of contents.

Introduction

DAVEtools is a Java package that can be used to operate on DAVE-ML
models. The package is intended for command-line use as there is no
GUI, but the ModelSweeper tool does use a graphical interface.

Key features of DAVEtools:

NASA open-source code written in Java

Validate checkcases within a DAVE-ML models

Obtain information about a DAVE-ML model

Allow use of DAVE-ML models from within Matlab®

Convert a DAVE-ML model into a Simulink® model, with a validation script

Plot a 3-D response surface for any output, based on any two inputs
in a DAVE-ML model

Components

DAVEtools includes three products in one DAVEtools.jar file

DAVEtools.jar contains:

DAVE

Parses a DAVE-ML file (running any embedded verification
tests) and creates a Model object representing the model
defined in the DAVE-ML source file. Also can be used to
provide information about the model and set inputs/get outputs
from the model.
This class can be called from within the Mathworks Matlab®
environment to allow use of a DAVE-ML model within the Matlab
workspace. A demo script is available here.

DAVE2SL

Generates a Matlab® script that, when executed in Mathwork’s
Simulink® environment, creates a Simulink realization of the
provided DAVE-ML model. It also creates and runs a
verification script, if the DAVE-ML model included checkcases.

ModelSweeper

Provides a GUI-based tool to inspect the outputs of the
DAVE-ML model by plotting a 3D response surface of any output
with respect to a range of values for any two inputs (while
holding other inputs at nominal values).

Catalogs: Parsing/validating against a local copy of DAVEfunc.dtd

One of the less attractive features of working with XML files is
dealing with the appropriate Document Type Definition (DTD) or XML
Schema Definition (XSD) files, which provide various XML utilities the
rules of grammar for that type of XML file.

DAVE-ML makes exclusive use of the older DTD schema for several
reasons which are out-of-scope of this document. However, DTD rules
are powerful enough to provide adequate validation of a DAVE-ML
file.

These rules are in the DAVEfunc.dtd, available for download from
this page. This file should be placed
somewhere convenient for you; you might consider putting it in a
central XML/DTD directory on your computer. Unfortunately, there is
no clear consensus on where to place such local copies, and there are
several competing mechanisms available to notify XML-based parsers
(such as used by DAVEtool) where to find appropriate files. The one we
recommend is
XML
Catalogs.

If you don’t want to download the DTD and set up a catalog file,
DAVEtools will use information found in the DAVE-ML model file (such
as F106.dml) to try to fetch the latest DTD over the network at
run-time. This is much slower than having a local copy of the DTD but
it avoids having to manually download newer copies as the DAVE-ML
specification evolves. If you don’t have a network connection, the
DAVEtools will still work but should advise you that the model was
successfully parsed without validation.

If you do want to do local validation, after downloading
DAVEfunc.dtd somewhere convenient, you will also want to download
the tarball mathml2.tgz MathML2 DTD set from
http://www.w3.org/Math/DTD/. The mathml2.dtd has several related
parts which need to be stored in a particular directory structure
(shown later).

Next, you need to define an XML catalog file which will tell DAVEtools
where to find a local copy of these DTDs.

In the example catalog.xml file listing below, it is assumed that
the DTDs have been stored in a schemas subdirectory under the
working directory:

Continuing with this example, the working directory contents should be
something like what is shown below. The working directory contains a
model file, F106_aero.dml and the catalog.xml file, and a
schemas subdirectory, which is expanded below to show its
contents. Note that all the files in schemas/mathml2 were extracted
from the mathml2.tgz tarball:

Examples

Shown below are typical use cases for DAVEtools in working with any
DAVE-ML model. The examples all use the aerodynamics model of the
HL-20 lifting body, a concept vehicle studied in the 1980s and 1990s
by NASA as a ‘space taxi.’ This open-source aero model has been
realized in DAVE-ML and is available on the
examples page). This database was
used in an approach and landing simulation as described in
NASA
TM 107580.

Command aliases

For the following examples (and for general daily use) it is helpful
to define these aliases in your .cshrc or .bashrc file:

Verify and count elements in a DAVE-ML file

$ dave -c HL20_aero.dml
Verified 25 of 25 embedded checkcases.
File parsing statistics:
Number of variable definitions: 361
Number of breakpoint definitions: 8
Number of gridded table definitions: 72
Number of function definitions: 241
Number of check-case definitions: 25
Parsing took 3.383 seconds.
Implementation statistics:
Number of function interpolation tables: 169
Number of breakpoint sets: 8
Number of data points: 6247
Number of signal lines: 741
Number of blocks: 751
Number of inputs: 16
Number of outputs: 10

Create a Simulink® model

From a command line, the HL-20 aero model creation, verification and
data setup scripts are generated with dave2sl:

Download

Changes since V 0.9

V 0.9.3

Added tally of checkcases to DAVE’s statistics summary (when
used with the -c option). Added support for UML diagram
generation (with two open-source packages) for DAVEtools
development. Separated this change log from the readme
file. Fixed some annoyances related to missing DTDs and/or
network being unavailable. Added support for MathML max,
min, ceiling, and floor elements.

V 0.9.2

Corrected bug in DAVE that didn’t recognize use of binary
minus in MathML2 calculations; fixed bug whereby anonymous
tables shared the same matlab setup data; corrected sense of
return codes from DAVE and DAVE2SL. Improved integration test
framework. Corrected bug in ModelSweeper that caused program
to crash if no checkcases were defined.

V 0.9.1

Added support for minValue and maxValue attributes of
variableDef as allowed in DAVE-ML 2.0 RC 4; fixed error
reporting in creation script generation (aborts were returning
exit status 0 but now report 1).

V 0.9.0

Changed to support the default DAVE-ML namespace (xmlns);
added entity refs to make Eclipse IDE happy; changed for using
build subdirectories to bin to make Eclipse convention;
fleshed out ant build.xml file to rely less on makefiles (but
a makefile is still needed to run the app_tests of DAVE2SL).
Corrected the inability of dave to parse MathML piecewise
elements with more than one piece.
Distribution format switched to zip from tar to be more PC
friendly.
Build system switched to Ant from Make (but some hybrid make
functionality exists, to some version of make is still
required).
Source code management system now uses git instead of
Subversion.
Now producing a single DAVEtools.jar that includes all
products for convenience, including dave, dave2sl, modelsweeper,
xerces and jdom .jar file contents. Slightly different syntax
used to invoke DAVE2SL (default jar entry point) and DAVE.