24
Jimmy C. Mathews Advisors: Dr. Joseph Picone Dr. David Gao Powertrain Design Tools Project The GENERIC MODELING ENVIRONMENT (GME) GME Seminar II ~ The GME Modeling process INTELLIGENT POWERTRAIN DESIGN

INTELLIGENT POWERTRAIN DESIGN

  • Upload
    sukey

  • View
    58

  • Download
    1

Embed Size (px)

DESCRIPTION

INTELLIGENT POWERTRAIN DESIGN. The GENERIC MODELING ENVIRONMENT (GME) GME Seminar II ~ The GME Modeling process. Jimmy C. Mathews Advisors: Dr. Joseph Picone Dr. David Gao Powertrain Design Tools Project. Outline. GME Modeling Concepts GME and the Actual Modeling Process - PowerPoint PPT Presentation

Citation preview

Page 1: INTELLIGENT POWERTRAIN DESIGN

Jimmy C. Mathews

Advisors: Dr. Joseph Picone Dr. David Gao

Powertrain Design Tools Project

The GENERIC MODELING ENVIRONMENT (GME)

GME Seminar II ~ The GME Modeling process

INTELLIGENT POWERTRAIN DESIGN

Page 2: INTELLIGENT POWERTRAIN DESIGN

Page 2 of 24Intelligent Powertrain Design

Outline

• GME Modeling Concepts

• GME and the Actual Modeling Process

• Creating a metamodel

• Introduction to an Application Domain

Page 3: INTELLIGENT POWERTRAIN DESIGN

Page 3 of 24Intelligent Powertrain Design

Review

• The 5 basic modeling types used in MGA

o Model

o Atom

o Reference

o Connections

o Sets

• The Others

o First-Class Objects (FCOs)

o Connector

o Inheritance

Page 4: INTELLIGENT POWERTRAIN DESIGN

Page 4 of 24Intelligent Powertrain Design

Review (contd…) [3]

• Typically has parts - other objects contained within the model. Parts come in these varieties:

- atoms (or atomic parts),

- other models,

- references (which can be thought of as pointers to other objects),

- sets (which can contain other parts), and

- connections.• A special attribute associated with atomic parts allows them to be

designated as link parts.

- act as connection points between models• Can participate in connections, have attributes, and participate in

set membership.

Model

Page 5: INTELLIGENT POWERTRAIN DESIGN

Page 5 of 24Intelligent Powertrain Design

Review (contd…) [3]

Atom• A simple modeling object that does not have internal structure (i.e.

cannot contain other objects), although it can have attributes.• Atoms can be used to represent entities, which are indivisible, and

exist in the context of their parent model.• Can participate in connections, have attributes, and participate in

set membership.

Reference

• Parts that are similar in concept to pointers found in various programming languages.

• Can point to a model, an atomic part of a model, a model embedded in another model, or even another reference part or a set.

• Can participate in connections, have attributes, and participate in set membership.

Page 6: INTELLIGENT POWERTRAIN DESIGN

Page 6 of 24Intelligent Powertrain Design

Review (contd…) [3]

Connections• A line that connects two parts of a model.• Have at least two attributes:

appearance (to aid the modeler in making distinctions between different types of connections).

directionality (as distinguished by the presence or absence of an arrow head at the “destination” end of the line).

• Can have additional attributes, and participate in set membership.

Sets

• A container of parts that “owns” its parts through association, rather than hierarchy.

• Allows the modeler to create sets and subsets of all kinds of parts.

Page 7: INTELLIGENT POWERTRAIN DESIGN

Page 7 of 24Intelligent Powertrain Design

Metamodeling and Metamodeling example

• Metamodeling environment itself is based on GME as is the customized application.

• E.g. A typical application domain like that of networking systems – containing routers, networked computers, other devices and connections between them.

• For the initial problem specification, the metamodeling expert needs at least a vague idea of the modeling application to be implemented. Typically comes in a natural-language description.

• This example application domain may be described as:

“We want to create networking diagrams. The diagrams will contain routers. Each router has several router-ports. We also have hosts (e.g. servers).”

“Routers are identified by name and family. Name is a string, family may be a family of the Cisco and Linux routers. Ports are identified by portname, IP address, speed (in kbps), and type (either "HDLC", "PPP" or "Ethernet").

"Hosts are identified by name and address. Networks are identified by a network address and a netmask."

Page 8: INTELLIGENT POWERTRAIN DESIGN

Page 8 of 24Intelligent Powertrain Design

Metamodeling (contd…)

• Modeling Technique: Unified Modeling Technology especially a subset called UML Class Diagrams.

• Most basic step in metamodeling consists of determining:

Metamodeling

Entities used by the model

Relations between the entities

Network

Router

Host

Router-port

AssociationE.g . connections

between a network and a host / router-

port

ContainmentE.g. linking a

router to a router-port

Mapping of specification concepts onto

entities, relations and

attributes

Difference: In containment, contained entities (e.g. router-ports) are owned by their containers (routers), and contained entity cannot exist without its container.

entities used by the model

relations between them

• Certain entities have specific attributes

E.g. name and family in case of a router.

• GME supports generic modeling concepts that are variations of the UMT entities, relationships and attributes; differences in nomenclature, added features, semantics and constraints.

Page 9: INTELLIGENT POWERTRAIN DESIGN

Page 9 of 24Intelligent Powertrain Design

Metamodeling (contd..)

• Atoms, Models, Connections, Sets and References commonly called First Class Objects (FCOs).

• Emphasize their central role in any modeling project.

• Attributes are “bound” to FCOs; used to store information in an FCO; can contain test, integers, real numbers, or Boolean values.

• Folders are containers for different sections of a modeling project; used merely for organization; each modeling project contains at least one folder at the very top of hierarchy – the root folder.

• Aspects are different “views” of the structure of a model; not always beneficial to present every object contained in a model all at once; allow us to choose what we want to see.

• Constraints are validity rules applied to a model; expressed in Object Constraint Language (OCL).

Page 10: INTELLIGENT POWERTRAIN DESIGN

Page 10 of 24Intelligent Powertrain Design

Creating a Metamodel

1. Start GME, and select "File/New Project...".2. We are creating a metamodel, hence select “MetaGME” as the paradigm.3. Press the "Create New..." button and specify desired data storage path with file

name and extension “.mga”.4. Create a NewParadigmSheet in the root folder by “Insert New Model”,

option “ParadigmSheet”

A new object is created; double click to open a white window; this is effectively the user’s worksheet.

5. Defining entities:

Make sure that current aspect is “ClassDiagram”

Page 11: INTELLIGENT POWERTRAIN DESIGN

Page 11 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

6. Drag “Model” from the part browser. Rename it as our Router.

7. Creating three “Atom” classes, name them Port, Host and Network.

8. Their relations will be represented by “Connection“; default name Connection.

9. Define a base container for routers, networks, hosts, relations; use a “Model” and name it NetDiagram.

10. Need a generic entity that represents "anything that can be directly connected to a network" (i.e. router-ports and hosts); take the form of an abstract baseclass for router-ports and hosts; Create an “FCO” and rename it NetInterface; represents anything that incorporates a network interface.

Page 12: INTELLIGENT POWERTRAIN DESIGN

Page 12 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

13. Ports and Hosts implement NetInterface, Using “Inheritance” connect baseclass (NetInterface) to the subclasses (port, host); Click NetInterface first, cursor changes to , then click Inheritance.

14. Routers contain ports; click the contained object (port) first and then click container (router).

15. Routers, Hosts and Networks are contained in NetDiagram.

12. Generalization, Containment, and Association:

Switch to “AddConnection”

16. GME requires relationships to be contained somewhere, hence containment relationship between NetDiagram and Connection.

17. Need to indicate what objects the relationship “Connection” can associate; this is called Association. The connection source will be Router-ports and Hosts; NetInterface is used to represent both of then; destination will be Network; use

18. Association class “Connection” is specified when we connect this class to the connector dot (in any order).

Page 13: INTELLIGENT POWERTRAIN DESIGN

Page 13 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

19. Attributes Window: Attributes/Preferences/Properties window located in the lower right corner of the screen; shows the attributes, user preferences and properties of the currently selected object.

20. Metaparadigm entity attributes:

– Abstract? (Boolean): only used as generalizations of other (non-abstract) entities; cannot be instantiated as objects in the models; only used for metamodeling purposes; Entities with an <<FCO>> stereotype are always abstract; e.g. an abstract entity, NetInterface.

– In root folder? (Boolean): root folder can contain models and other folders; not all of the models in a metamodel will be contained in a folder; In e.g., only place NetDiagrams in the root folder; Routers should not be placed there, because they must always be assigned to a NetDiagram.

– Icon name/Port icon name (strings): customized bitmap icon that is displayed in the modeling environment. Furthermore, "ports" (a contained object that can be connected to entities outside its container) are displayed as miniature icons atop the parent icon i.e. that of the router; these are the "port icons" and are specified as a separate attribute.

– Name position (list of options): default physical location of the name of the object, in relation to its icon.

Page 14: INTELLIGENT POWERTRAIN DESIGN

Page 14 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

– General preferences (text field): is a "catch-all" place, where we can specify all kinds of additional options.

– In our example, change “In root folder?” option of NetDiagram entity from default value (False) to True.

– Relation entities can also possess attributes.– E.g. open attribute pane for “Connection” line between Router and Port;

change the value of “Object is a port?” from default value (False) to True; this tells GME to treat Port objects as ports of the Router; visible and accessible from outside the parent model (i.e. Router).

– With “Attributes”, metamodel’s UML class diagram is complete (Note: we have not considered “Constraints” in this example).

Page 15: INTELLIGENT POWERTRAIN DESIGN

Page 15 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

21. Creating an Aspect: “Visualization” aspect in the metamodel allows us to define aspects for our application. Create Connectivity "Aspect" on the paradigm sheet.

22. Switch to “Set Edit” editor mode, right-click the new aspect and include all other entities by left-clicking them. (In below fig. could have included NetInterface abstract base class, thus would not have required to include derived classes.

23. Show that Connectivity "Aspect" is contained in both the Models since membership of this aspect indicates that every instance of this meta-entity is visible in this aspect.

24. Switch to “Add Connection” mode and create containment relations of this aspect to both Router and NetDiagram.

Page 16: INTELLIGENT POWERTRAIN DESIGN

Page 16 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

25. Specify Attributes: Attributes are data fields of entities; e.g. name, type, IP address, speed.

26. Difference between attributes of entities that are used in the metamodel, and attributes of entities that metamodel is expected to define!!!

27. Attributes for Router entity – Name and Family; Family ix explicitly specified using <<EnumAttribute>> which provides an enumerated set of options.- Viewable? (Boolean): specifies whether the attribute is visible in the attribute dialog; normally default value, true.- Global Scope? (Boolean): Most attributes are defined in the global scope; With huge metamodels, entity-specific attributes are preferred; not the case now, so the default value - true.- Prompt (string): states the prompt displayed in the attribute dialog; default case, when nothing is specified, the prompt will be the name of the meta entity.- Menu items (multiline string): only applies to <<EnumAttribute>>s; valid options of the attribute are listed here; e.g. "C16xx", "C25xx", "C36xx" and "Linux“; each option entered on a new line. add an additional option "Other", for unlisted types. - DefaultMenuItem (string): default value for this <<EnumAttribute>> is listed here; set it to "Other".

28. Attribute defined; associate with meta-entity; switch to “Add Connection” mode and connect new attribute to entity (here Router).

Page 17: INTELLIGENT POWERTRAIN DESIGN

Page 17 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

29. Two types of attributes, <<FieldAttribute>> and <<BooleanAttribute>>, have the following extra options:- Data type (enumeration): String, Integer, or Double- Default (string): The default value for the attribute- Number of lines (integer): The height of the input space (always set to 1 for Integers

and Doubles)- Default = 'True'? (Boolean): The default value setting for a <<BooleanAttribute>

30. For the example,- <<FieldAttribute>> named IPAddress for port and host and meta-entities; data type string, default value 0.0.0.0; connect to port and host.- <<FieldAttribute>> named IFSpeed; prompt “Speed (kbps)”, data type double, default value 0.0; connect to port.- <<EnumAttribute>>, name IFType; menu items “Ethernet”, “HDLC”, and “PPP”, default value any of the above; connect to port.- Two <<FieldAttribute>>s named NetworkAddress and NetMask; data type string; connect to network.

Page 18: INTELLIGENT POWERTRAIN DESIGN

Page 18 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…)

The “Attributes” aspect of the metamodel in our example will resemble like the following.

Page 19: INTELLIGENT POWERTRAIN DESIGN

Page 19 of 24Intelligent Powertrain Design

Creating a Metamodel (contd…) and Creating a Model

31. Interpret the metamodel and install the new paradigm: Click the cogwheel icon in the toolbar; click "OK" on the "Configure Aspect Mapping" dialog; select the location of the paradigm XML file and name it.

32. If no errors in the metamodel, paradigm is generated!!!33. Creating the first model: Select "File/New Project...”; now select newly installed

paradigm (instead of MetaGME) from paradigm list; choose file name; just as earlier, insert a NewNetdiagram and open it; The part browser now shows Host, Network, and Router; create a host and a network.

34. Test the connections in “Add Connections” mode.35. Enhancing the metamodel and the model icons: Create bitmaps in BMP

format, one each for all objects and two for contained objects (e.g. port); save in a subdirectory named “Icons” in the directory of paradigm file.

36. Open metamodel; open “Attributes” dialogs for each entity; enter the name of corresponding bitmap for “Icon name” and smaller bitmap for “Port icon name”.

Page 20: INTELLIGENT POWERTRAIN DESIGN

Page 20 of 24Intelligent Powertrain Design

Creating a Model

Router

Network

Host

Our First Model!

Page 21: INTELLIGENT POWERTRAIN DESIGN

Page 21 of 24Intelligent Powertrain Design

Re-interpreting a paradigm

37. In example; HOST NETWORK ROUTER PORT SMALL-Port

38. In Re-interpret and re-register the paradigm; registering a new version does not delete the previously registered versions; existing models continue to use the version that they were created in; new models use current version.

39. Upgrade existing models to newer paradigms in two ways;

when opening a model, GME offers an option to attempt an upgrade; in some cases changes are not implemented and GME returns to original paradigm

using "File/Update through XML…“ menu option.

A Typical network

Page 22: INTELLIGENT POWERTRAIN DESIGN

Page 22 of 24Intelligent Powertrain Design

Future Concepts

40. Two basic ways to conquer complexity due to increase in number of devices; transform single diagram in hierarchy of sub-diagrams; use clustering or grouping a set of similar objects into a single unit.

41. Building Interpreters: The Builder Object Network (BON); Writing Interpreter codes.

42. Modeling concepts: Defining and working with References and Sets; Aspects, Folders subtypes and Instances.

43. Adding semantic rules to the Metamodel: Using Multiplicities and Constraints in the Metamodel.

44. Working with XML Data Pattern-Based Generator-Interpreter?????; XML data formats in GME.

45. Building Java Based Interpreters!!!!!!

Page 23: INTELLIGENT POWERTRAIN DESIGN

Page 23 of 24Intelligent Powertrain Design

Relate with MIC-based development [4]

Page 24: INTELLIGENT POWERTRAIN DESIGN

Page 24 of 24Intelligent Powertrain Design

References

1. GME Tutorials; available at http://www.isis.vanderbilt.edu/Projects/gme/Tutorials/

2. GME User’s manual; available at http://www.isis.vanderbilt.edu/Projects/gme/Tutorials/

3. Sprinkle J., “Metamodeling—Part Deux: Modeling the GME modeling process,”.

4. Nordstrom.G, Karsai.G,et.al, “Model Integrated Computing-based Software Design and

Evolution”, Conference on Life Cycle Software Engineering Technology for Modern Avionics,

Missiles, and Smart Weapon Systems, , Huntsville, Alabama, August 2000.