Demonstration Of The Open Mi

Post on 15-Jan-2015

388 Views

Category:

Technology

2 Downloads

Preview:

Click to see full reader

DESCRIPTION

Presentation for the Final OpenMI LIFE workshop "Integrated models and policy- OpenMI solutions for a sustainable future.

Transcript

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Jan Gregersenwww.HydroInform.com

Demonstration of the OpenMI

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

What is OpenMIOpenMI is an open IT-standard that facilitatesLinking of hydrological model and modules

Rainfall module

Rainfall / Precipitation

Rainfall-runoff model

Runoff

River model

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Different approaches to linkingFile based The OpenMI way

Output file

RR model

Write

All together“hardcoded”

River model

Read

Output file

Write

Output file

RR model

Write

River model

Output file

Write

RR model

&

River model

Output file

Write

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Another standard - USB

My model

USB

• Provides freedom of choice for the users

• Provides opportunities for suppliers

Rainfall module

Precipitation

Rainfall-runoff model

River model

Ground water model

Runoff

Leakage

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

DEMO

Rainfall-runoff model

River modelRunoff

OMI file

1 : Setup your models 2 : Configure and run 3 : Inspect the results

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

How does OpenMI workUser Interface

Setup files

Output file

Write

Read

Write

My model

Run

model engine

OMI file

Write

OpenMIStandardInterface

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

.NetOrJava

Fortran, C, c++, Pascal, C#, Java, etc.

OpenMI Standard

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

How OpenMI works

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

From outside all OpenMI compliant components look the same

River model

RR model

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

How does OpenMI work

My model

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

1. Read OMI file2. Create component3. Invoke (call) Initialize

1. Component will read input files and initialize

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

How does OpenMI work

<?xml version="1.0"?><LinkableComponent Type=“RainfallRunoffModelLC" Assembly="..\bin\RainfallRunoffModel.dll"> <Arguments> <Argument Key=“InputFileName" ReadOnly="true" Value=“..\data\MyInputFile.xml" /> </Arguments></LinkableComponent>

The OMI file

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

My model

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

My model

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

1. Query and display exchange items2. User selects output and input3. Create a link object4. Add the link to both components

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

My model

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

GetValues(time)

GetValues(time)

Flow

Return

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

River model and ground water model

My model

GetValues(time) (Leakage)

Leak

age

Wat

er le

velGetValues(time)

(water level)

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Model migrationUser Interface

Setup files

Output file

Write

Read

Write

My model

Run

model engine

OMI file

Write

OpenMIStandardInterface

void Initialize(IArgument[] properties)

string ComponentIDstring ComponentDescriptionstring ModelIDstring ModelDescriptionITimeSpan TimeHorizon

IInputExchangeItem GetInputExchangeItem(int index)IOutputExchangeItem GetOutputExchangeItem(int idex)int InputExchangeItemCountint OutputExchangeItemCount

void AddLink (ILink link)void RemoveLink(string linkID)string Validate()

void Prepare()IValueSet GetValues(ITime time, string linkID)ITimeStamp EarliestInputTime

void Finish()void Dispose()

.NetOrJava

Fortran, C, c++, Pascal, C#, Java, etc.

OpenMI Standard

OpenMI SDK

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

OpenMI is just a standard

Pipistrelle

Frames

And more….

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Looking forward

Precipitation

Rainfall module

OpenMI Version 2.0

Better support for non-model components

No trigger

New concept for data operations and linking

Not only pull-driven

And much more, to be presented later today…..

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Looking further forward

OpenMI LIFE Final workshop, January 2010 www.HydroInform.com

Thank you for your attention

top related