Auto-Generation%20of - PowerPoint PPT Presentation

About This Presentation
Title:

Auto-Generation%20of

Description:

What does Auto-Generation of Models Mean? Standard method of building an EASY5 model is: ... Free field format is very forgiving ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 11
Provided by: peterd49
Category:

less

Transcript and Presenter's Notes

Title: Auto-Generation%20of


1
Auto-Generation of EASY5 Models Using XML Data
Brian Ummel EASY5 Product Support March 16, 2000
2
What does Auto-Generation of Models Mean?
  • Standard method of building an EASY5 model is
  • 1. Look up data where it exists (CAD system,
    schematics, documents, or some other analysis
    tool)
  • 2. Convert the representation and data to the
    form EASY5 needs
  • 3. Hand build the corresponding EASY5 model by
    hand
  • The EASY5 GUI tries to make this process as
    simple as possible but building a large model is
    still a lot of work
  • Question Why cant we automate the creation of
    EASY5 models?
  • Answer Lots of reasons
  • Most obvious The current EASY5 model file format
    makes it difficult

3
Current Model File Format
  • The current model file format (i.e. the format of
    files with names of the form model_name.mf.nn) is
    essentially a memory dump of the C structures
    used by EASY5x at run time.
  • Typical piece of an EASY5 model file
  • 0 -1 0 2 1 1 1 1
  • 1
  • 0 1 1 0 1 3320.0 3950.0 3480.0
  • TZAC
  • Nozzle\Dynamics
  • 17 20 997 4096 0 -1
  • 9901181617
  • 1 0 8
  • 0
  • 1 0 9
  • 0
  • 23
  • 23
  • te 0
  • pa 10 0.000000 1.000000
  • fo -1
  • As most of us have learned the hard way, even the
    smallest mistake in this file will result in
    EASY5x being unable to read the file.

4
Why We Use the Current Format
  • Historical Reasons
  • The first implementation of EASY5w used Apollo
    Metafile Graphics which had its own file format
  • Efficiency Reasons
  • The current format can be read directly into
    memory without any interpretation or conversion
  • Even so, it is not all that fast for very large
    models
  • Because of the efficiency issue, the current
    format will be probably be supported for some
    time.
  • So (at least for now) were talking about an
    alternate format for importing models into EASY5.

5
Choosing an Import File Format
  • The import file format must be
  • Easy to write
  • Completely specify the data being imported
  • Not require that the model be completely
    specified
  • Easy and unambiguous to read
  • Amenable to changes required by future EASY5
    enhancements
  • Our primary tasks were
  • 1. Inventing a rich but forgiving syntax
  • 2. Writing a parser for that syntax
  • Then along came XML

6
What is XML?
  • XML is a tagged markup language
  • Tagged means that the data in the file is labeled
    with names indicating the meaning of the data
  • Labels are tags very similar to tags in HTML
  • Significant Difference XML allows you to define
    your own tags
  • Syntax is consistent and very clean - we dont
    have to invent one
  • XML is an ASCII file format
  • Means easy transfer of data between machines
  • Free field format is very forgiving
  • XML is a W3C standard for information transfer
    over the World Wide Web
  • Parsers are widely available
  • XML files are readable by other applications
    (e.g. Web Browsers)

7
XML is an Object Oriented Language
  • Each element (a tagged entry delimited by angle
    brackets lt and /gt or by lt namegt and lt/namegt)
    represents an object
  • Attributes and members specify the properties
    of the object
  • EASY5 objects are primarily components and
    connections
  • In XML an EASY5 library component looks like
  • ltcomponent name LA1 xloc 3200 yloc
    2800 gt
  • ltlibref library gp libmember LA /gt
  • ltinput id GAI name tempSensor_gain
    value 10 /gt
  • ltinput id TC name tempSensor_timeConstan
    t value 0.03 /gt
  • lt/componentgt
  • A port connection looks like
  • ltconnection from_component IN1 to_component
    LA1 gt
  • ltport_connection from_port 2 to_port 1
    /gt
  • lt/connectiongt

8
XML can be Validated
  • Very easy for a XML parser to determine if a XML
    document is Well Formed (ie the punctuation
    is correct).
  • More importantly, the XML specification includes
    a provision for specifying a Document Type
    Definition (DTD) which
  • Is a formal definition of the syntax of a
    particular type of data file expressed using XML
  • Can be used by publicly available XML parsers to
    determine if a file is valid
  • Usage of attributes versus members for
    expressing properties of elements is driven by
    the constraints on what is valid.
  • The format of an EASY5 XML model file is
    specified by a file called easy5_model.dtd
  • The current program which reads EASY5 XML files
    and produces EASY5 metafiles is called ezxml.exe

9
Status of The EASY5 XML Project
  • The current prototype version of ezxml can
    import
  • Flat models (no submodels)
  • Library components (not Fortran or C components)
  • Component locations
  • Port connections (not custom connections)
  • Parameter values of inputs
  • User defined names
  • The submodel structure will be supported next
    (this summer)

10
Plans for The EASY5 XML Project
  • Current Project
  • Enhance the EASY5 model DTD to be able to specify
    everything in the current model file
  • Have the import program support the full DTD
  • Were looking for opportunities to test this work
  • Under consideration
  • Write an export program to support conversion of
    EASY5 models into other types of models (such as
    code generators like GSDS)
Write a Comment
User Comments (0)
About PowerShow.com