Top Banner
OpenMI LIFE Final workshop, www.HydroInform.c om Jan Gregersen www.HydroInform.com Demonstration of the OpenMI
18

Demonstration Of The Open Mi

Jan 15, 2015

Download

Technology

Jan Gregersen

Presentation for the Final OpenMI LIFE workshop "Integrated models and policy- OpenMI solutions for a sustainable future.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Demonstration Of The Open Mi

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

Jan Gregersenwww.HydroInform.com

Demonstration of the OpenMI

Page 2: Demonstration Of The Open Mi

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

Page 3: Demonstration Of The Open Mi

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

Page 4: Demonstration Of The Open Mi

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

Page 5: Demonstration Of The Open Mi

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

Page 6: Demonstration Of The Open Mi

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

Page 7: Demonstration Of The Open Mi

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

Page 8: Demonstration Of The Open Mi

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

Page 9: Demonstration Of The Open Mi

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

Page 10: Demonstration Of The Open Mi

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()

Page 11: Demonstration Of The Open Mi

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

Page 12: Demonstration Of The Open Mi

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

Page 13: Demonstration Of The Open Mi

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)

Page 14: Demonstration Of The Open Mi

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

Page 15: Demonstration Of The Open Mi

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

OpenMI is just a standard

Pipistrelle

Frames

And more….

Page 16: Demonstration Of The Open Mi

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…..

Page 17: Demonstration Of The Open Mi

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

Looking further forward

Page 18: Demonstration Of The Open Mi

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

Thank you for your attention