From MMS to OMS to a Minimally Invasive Modeling Framework

brazilianchubbySoftware and s/w Development

Jun 8, 2012 (5 years and 2 months ago)

501 views

From MMS to OMS to a
Minimally Invasive Modeling
Framework
George Leavesley and Olaf David
Colorado State University, USDA,
Fort Collins, CO
Modeling Framework Objectives Include
• Provide an integrated toolbox approach to model
development, testing, and application.
• Easily configured and/or enhanced for user-specific
needs.
• Support multi-disciplinary component and model
integration.
• Flexible approach to enable the incorporation of
continuing advances in science, databases,
computer technology, ...

Open source software design to allow many to share
resources, expertise, knowledge, and costs.
LEVELS OF MODEL FRAMEWORK SUPPORT
• PROCESS
• MODEL
• FULLY COUPLED MODELS
• LOOSELY COUPLED MODELS
• RESOURCE MANAGEMENT DECISION SUPPORT
SYSTEMS
• ANALYSIS AND SUPPORT TOOLS
Single Purpose
Multi-objective,
Complex
Model Builder
MMS Interface
MODULAR MODELING SYSTEM (MMS)
Object User
Interface
Object Modeling System (OMS)
Modeling IDE based on NetBeans
Modeling
Projects
Component
Library
Assembled
Model
Parameter
Editor
Component
Editor
Output
Analysis
• Modular Modeling System (MMS)
– Object Based
– C Language Framework
– Fortran, C module support

Linux/Unix environment
• Object Modeling System (OMS)
– Object Oriented
– Java Language Framework
– Java, C, C++, Fortran module support
– Sun NetBeans environment
– Platform Independent
MMS and OMS Basics
OMS Component-Based Model Structure
• A model is a
hierarchical
assembly of
components
• Sequential
Execution order
• Model Wizard
• Drag and drop
process
• Control components
Time – Space – Process Considerations
Time
Space
Space
Processes
Processes
Access Components Directly from a Library
Connect
Explore
Palette
Use
History of the Object Modeling System (OMS)
Charge: Build a contemporary modeling framework for USDA based on
modular modeling experiences
2001/02 2003/04 2005/06 2007/08/09+
Netbeans Platform
Major Refactoring
Central Version
Control
Standardize
Component API
PRMS
Modeling Projects
USDA CoLab Use
Project Plan/Process
PRMS, CEAP, iFarm
Initial Prototype
Swing based
PRMS, RZWQM
Geospatial Integration
Calibration Tools
Sensitivity Analysis
Uncertainty Analysis
Knowledge Base
Data Provisioning
Deployment Platform
Agency Governance
Webservices
Cloud Computing
CEAP, J2000(S), PRMS,
WWEM, Model Bases
OMS 1.0 2.x
OMS 3.0
OMS 3.0 vs OMS 2.x
• What is common?
– Conceptually similar, Init/Run/Cleanup
• What is different in 3.0?

Minimally invasive approach
• No Framework data types
• No interfaces provided
• Default Multithreading
Framework Invasiveness

How does the use of a particular framework impact an
application's quality and user acceptance?

Quality with respect to

Portability

Reusability

Understandability

Maintainability

User acceptance in terms of required code
modifications, ease of use, support features, …
Technical Framework Invasiveness Issues

Coupling between application and framework code

Framework APIs

Framework Interfaces

Framework Custom Data Types

Mass of boilerplate code

External framework dependencies

Required non-framework APIs

Framework couplings

Language dependencies

Platform dependencies

Organizational dependency
OMS 3.0 vs OMS 2.x
• What is common?
– Conceptually similar, Init/Run/Cleanup
• What is different in 3.0?
– Minimally invasive approach
• No Framework data types
• No interfaces provided
• Default Multithreading

3.0 Annotated POJOS vs. OMS2 API Interface implementations
• 3.0 Component = Plain Old Java Object (POJO) +
Meta data
OMS 3.0 Meta Data
@
Description
@Author
@Bibliography
@Status
@VersionInfo
@SourceInfo
@Keywords
@Label
@Description
@Unit
@In
@Out
@Range
@Role
@Bound
@Label
@Execute
@Initialize
@Finalize
Component Field
Method
Meta Data Purpose
• Execution control and connectivity
• Execution support
• Documentation/Repository support
• Testing support

Runtime consistency support
Example Component
import ngmf.ann.*;
@Description(“Circle computation”)
@Author(“me”)
public class CircleArea {
@Description(“Radius”)
@Range(min=0)
@In public double r;
@Out public double area;
@Execute
public void runme(){
area = Math.PI * r * r;
}
}
Component Metadata Variants
• 3 different syntaxes to provide for the same
Component meta data semantics using (i) Annotations
or (ii) XML
1) Embedded Metadata using Annotations
2) Attached Metadata using Annotations
3) Attached Metadata using XML
Annotation supported Transformations
OpenMI
Component
CCA
Repository
Plain Old Object
OMS 3.0
Annotations
Unit Testing
Annotation Processor
OMS 3.0 vs OMS 2.x
• What is common?
– Conceptually similar, Init/Run/Cleanup
• What is different in 3.0?
– Minimally invasive approach
• No Framework data types
• No interfaces provided
• Default Multithreading
– 3.0 Annotated POJOS vs. OMS2 API Interface implementations
• 3.0 Component = Plain Old Java Object (POJO) +
Meta data

Scalability
Scalability Concept
CPU
RAM
CPU
CPU
RAM
CPU
NAM
RAM
CPU
CPU
CPU
CPU
RAM
CPU
• The same code runs on
• Single CPU
• Multi Core/CPU
• Cluster
• Cloud
Interactive Model Interface Tools - GeoWind
Integrates NASA World Wind and GeoTools
Analysis Tools
• Canned analysis configurations
• Analysis of output data
– Graphs
• TimeSeries Plot
• XY Error
• Flow duration
• Residuals
– Statistics

Table IO/API
ESP Trace Analysis
• Ensemble Streamflow
Prediction (ESP) Tool
• Statistical analysis

Report generation
Hay and Umemoto, 2006, Multiple-Objective Step-Wise Calibration using Luca: U.S.
Geological Survey OFR 2006-1323.
Multiple-Objective Step-Wise
Calibration Tool Using SCE
LUCA -
Selected Current Applications
Conservation Effects Assessment Project
(CEAP)
• Authorized by the 2002 Farm Bill
• Government-wide emphasis on Outcomes
• National Assessment plus Watershed Assessments
• “Scientifically quantify effects of Conservation Practices"
Soil
Climate
Plant/Crop …
NRCS Data Warehouse
OMS Model Interface
PS1
Nutrients
Hydrology 1
Crop
Growth 1
PS2
PS1
Erosion
Wind
Leaching 1
Hydrology 2
Crop
Growth 2
Hydrology 2
Crop
Growth 1
OMS Model A OMS Model B OMS Model C
ARS Science Module Warehouse
OMS Model Engine
OMS Toolbox
Hydrology
Erosion
Crop Growth
Modules..
ARS/CEAP Goal
regionalized models, databases, and scenarios for site-specific watershed
assessment studies and national assessments
Agricultural Water Supply Forecasting
(USDA – NRCS National Water and Climate Center)
Adding a process-model
based daily/weekly/monthly
forecast capability using
OMS to supplement the
current regression-based
seasonal supply forecasts.
Agricultural Water Supply Forecasting
Research Elements:
•Evaluate alternative climate
scenarios in ESP
•Evaluate alternative precip
distribution methods
•Develop an ensemble of
models for forecasting
OMS Briefing
oms.javaforge.com
• MMS Concepts
– Modular structure (init, run, cleanup) and levels of design
– Component attribute descriptions included in code
– Model integration and visualization with OUI
– ESP and multi-objective, stepwise calibration with Luca tools
• OMS 2.x Concepts
– Java-based, object oriented
– Platform independent
– Multiple language support using wrapper technology
– Searchable component repository/library
– Control components available in the model building process
– GeoWind
• OMS 3.0
– Separate OMS API from science components (remove invasiveness)
– Plain Old Java Objects - POJOs
– Scalability – cpu, multi-core, cluster, cloud

Move towards framework interoperability
Summary – Evolution of a Modeling Framework