0% found this document useful (0 votes)
111 views40 pages

Model Management Tools and Technologies: Michael Tiller Powertrain Research Department Ford Motor Company

This document summarizes tools and technologies for model management, with a focus on Modelica. It discusses version control tools like CVS, web-based collaboration tools, and how Modelica can represent both continuous and discrete behavior. Modelica tools can simulate models, generate documentation, and check for style guidelines. The document also provides examples of using Modelica for control logic and translating models between representations like Simulink and Modelica.

Uploaded by

King Rhondel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views40 pages

Model Management Tools and Technologies: Michael Tiller Powertrain Research Department Ford Motor Company

This document summarizes tools and technologies for model management, with a focus on Modelica. It discusses version control tools like CVS, web-based collaboration tools, and how Modelica can represent both continuous and discrete behavior. Modelica tools can simulate models, generate documentation, and check for style guidelines. The document also provides examples of using Modelica for control logic and translating models between representations like Simulink and Modelica.

Uploaded by

King Rhondel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Model Management

Tools and Technologies

Michael Tiller
Powertrain Research Department
Ford Motor Company
Overview
„ Development Tools
„ Version Control
„ Web-based Tools
„ Modelica – Open Standard
„ Representing behavior
„ Translation
„ Modelica-based applications
Tools
Choosing Tools
„ Tools are like houses:
„ They need a solid foundation to build on
„ You can always add a coat of paint later
Key Principles (for us)
„ Cheap
„ Tools and technologies should be
„ Open – Non-proprietary and well-documented
„ Proven – Scales for real-world applications
„ Mature – Relatively bug-free
„ Treat model development like software
development
„ Leverage tools/libraries as appropriate
„ “Redundancy is the root of all evil”
Tools – Version Control
Version Control Requirements
„ Archive previous versions
„ Archive developer comments on changes
„ Allow branching for parallel development
„ Allow merging for coherent code base
„ Ability to “diff” changes
„ Tag (or label) releases
„ Retrieve versions by tag, branch or date
„ Cross-platform
„ Keyword substitution
„ Binary file support
Version Control Tools
„ ClearCase – used extensively
„ Excellent features
„ Expensive
„ High maintenance
„ CVS – used extensively
„ Good features (missing a few nice ones)
„ Free
„ Fairly simple to install and maintain
„ Perforce – never used
„ Good compromise
CVS User Interfaces
„ Command line
„ Ancillary Tools
„ TkDiff, CSDiff – Diffing and merging
„ Several GUIs
„ WinCVS – primary user interface
„ TkCVS – Works on Windows/Unix
„ CVSWeb – Web based access
„ Good example of an open system
Typical Usage
„ Create a branch for
either a bug fix or
enhancement
„ We use eTracker
„ Bug fix branch names
use eTracker Ids
„ Work in parallel
„ Clearly identifies all
changes
„ Avoid “stepping on toes”
„ Merge changes
WinCVS
„ Create branches and tags
„ View local changes and/or conflicts
„ View “version tree” for a given file
„ Review check-in comments
„ “Sandbox” approach
„ http://www.wincvs.org/
Tools - Utilizing the Intranet
CVS Web
„ Overview of the
filesystem
„ Download specific
versions of files
„ View differences
between files

http://www.freebsd.org/projects/cvsweb.html
Wiki – Collaborative Tool
„ Collaborative environment
„ FAQs, user and developer information
„ Technical discussions
„ Web-based
„ Searchable
„ Active server-side scripting
„ Customizable
„ Free
„ Change tracking, version control and diff-ing
„ http://twiki.org/
Wiki Screen Shots
CORBA
„ Used to allow programs to
communicate and interact over
networks
„ Open standard
„ Cross-platform
„ Supports every major language
„ Have not needed this functionality yet
„ Typical example of thought out solution
Modelica
Unclear Message
„ Not (strictly) about
physical modeling
blah blah
„ Interest in an open
Modelica blah specification
blah causality blah blah
Modelica blah „ Format for model
blah Simulink storage and exchange
„ Features beyond
behavioral descriptions
„ Data handling
„ Code maintenance
Modelica blah
„ Non-proprietary
blah index
reduction blah „ Scalable
Development Effort
„ It requires a considerable effort to
identify all the issues and then develop
solutions
„ We wanted to leverage work already
done
„ The diverse composition of the Modelica
Organization provided many views
Capturing Information
„ Encapsulation (protected, public, encapsulated)

„ Built-in types capture


„ Units, min & max values, nominal values
„ Annotations – Meta Data
„ Non-behavioral (e.g. graphical)
„ All tools must preserve this data
„ Structured/Hierarchical (conceptually like XML)
„ Avoids “kitchen sink” approach
„ Useful for other applications (e.g. FMEA)
Meta-Data
„ Annotations
„ Currently used for several things including
„ “Masks”
„ Laying out components and connections
„ Documentation
„ Completely open-ended
„ Can be associated with models, functions,
packages, model instances, etc
„ Structured comments
„ Possible to store arbitrary data files in the
Modelica model hierarchy
Configuration Management
„ Example: Level of fidelity
„ “Redundancy is the root of all evil”
„ Version control provides different dimension
sometimes misused, e.g.
„ Version 1.3 – Model with base halfshafts
„ Version 1.4 – Model with stiff halfshafts
„ Version 1.5 – Model with slip clutch
„ We build this into the model
„ Parametrically change whether shaft is rigid or
compliant
„ Swap one component for another with a
comparable interface
“Variant” Control
„ Using “Save As” is problematic
„ Variants are nice because they
„ Reference other classes (not copy)
„ Do not alter the “base” model
„ They explicitly list exactly what has
changed (called modifications)
„ Type safe
Example
Reuse another Parametric
model modification
model TransmissionWithFriction
extends Transmission(rigidShaft=true, damping=0.72,
redeclare Ford.Mechanical.Gears.PlanetaryWithLosses
planetary(ratio=Nr/Ns, efficiency=efficiency));
end TransmissionWithFriction;

Topological New component


modification type
GUI Handling
„ Variations are handled similarly to LSM

„ Annotations are used for choices


Representing Behavior
„ Modelica includes both declarative and
procedural semantics
„ Can be used for scripts and functions
„ Can handle both continuous and discrete
behavior
„ Can be used for things like Petri nets, digital circuits and
state charts
„ Different GUIs might be required to build
models
„ Different simulators may provide different
performance for different problem types
Control Logic

Discrete behavior
Control Logic (cont.)
model Tdelay "Transition with one input and one output connection"
parameter Real delay=5;
protected
Boolean activated;
Boolean delay_passed;
Boolean fire;
Real last_activation_time;
equation
//activation of transition
activated = inTransition.state;
//set activation time
when activated then
last_activation_time = time;
end when;
//activated and delay passed
delay_passed = activated and ((time - delay) > last_activation_time);
//fire command
fire = activated and delay_passed and not outTransition.state;
//propagate firing to in and output places
inTransition.fire = fire;
outTransition.set = fire;
end TDelay;
Modelica Applications
Sample Package Structure
definition Libraries definition
(e.g. package) (e.g. package)

definition definition definition definition definition

parameter annotation component component constant equation

component equation annotation


component equation
definition
definition modifications
component equation

annotation annotation

Model definition

component

component

component
Modelica Tools
„ Simulate models
„ Generate documentation
„ Bundle models for distribution
„ Style guideline reporting
„ Other possibilities
„ Specialized diffing/merging
„ Code generator
„ Obfuscation/shrouding
„ Conversion/transformation utilities
„ Formal verification
Example: Dymola Layers
„ Dymola uses
annotations for:
„ Icon graphics
„ Diagram layout (and
drawing elements)
„ Documentation
„ Result
„ All captured in the model
„ Viewable in Dymola
„ Used to generate HTML
documentation
Style Guidelines
„ Typical requirements
„ Naming conventions
„ Documentation
requirements
„ Avoid confusing
constructs
„ Make code more
reusable/maintainable
„ Possible to automate
the process of checking
these guidelines
„ Report Generator
Translating Representations
„ Example: (simple) Simulink diagrams
„ Read “.mdl” file, generate an AST
„ Process AST and then generate
Modelica code
„ Components involved:
„ Continuous: Sum, Sin, Gain
„ Discrete: Triggered Subsystem
Toplevel System
Subsystem
Preserving Information
Block {
BlockType Sin
Name “sine"
Position [120, 70, 150, 100]
SineType “Time-based"
Amplitude "1"
Bias "0"
Frequency "10"
Phase “0“ Simulink.Sin sine(
Samples “10" Bias=0, Amplitude=1, Phase=0,
Offset "0" Frequency=10) annotation(
SampleTime "0" Simulink(Offset="0",
VectorParams1D on SampleTime="0",
} VectorParams1D=on,
Samples="10",
SineType="Time-based"),
extent=[-82,74;-72,84]);
Conclusions
Summary – Tool Philosophy
„ Handle version control and
configuration management differently
„ Use open and mature tools and
technologies as a foundation
„ Be prepared to customize, this requires
„ Open standards
„ Application Programmer Interfaces (APIs)
Summary – Modelica
„ Captures all kinds of behavior
„ Fairly mature and scalable
„ Handles meta-data
„ Avoids the “Save As” syndrome
„ Room for more than simulation tools
„ Doesn’t have to be a monolithic system

You might also like