SlideShare a Scribd company logo
1 of 41
Introduction to OpenMI
    Jan Gregersen LicTek

    http://www.LicTek.com
Connecting things - When two and two is five




               My model




 USB


                      •   Provides freedom of choice for the users
                      •   Provides opportunities for suppliers

                                                                     Standard

Introduction                                      Jan Gregersen
About this presentation




        •   Examples of use
        •   How to create OpenMI linked systems
            My model
        •   How does OpenMI work
        •   How to migrate models
        •   Hardcoded configurations
        •   Optimization, calibration, ..
        •   Support




Introduction                         Jan Gregersen
Examples of use: Integrated modelling


      Met. Database
      Hymos

              precip
                                                         RR
                                      RR
   RR          My model                                    RR
 Sobek RR
                   Mike She GW                                  RR

         Runoff                                                      RR
             Leakage
                                           RR
 Mike Basin                   GW
                              Level
        flow           ISIS
                                            RR

                                                    RR


Examples of use                                 Jan Gregersen
Examples of use: Hydropower DSS




                                        Web service                Web service
                                        Estimated                  Forecasted:
                                        power price                Precipitation
                                                                   Temperature
                                                                   Evaporation
                                           Use              Use
                              Use
              Numeric model                                       Operates


                                     Hydropower DSS               Define                   or optimization tool
                     HP                                           scenarios
                                                                                    User
                                                                              Use
                               Use        Use         Creates
              Numeric model                                       Simulated
                                                                  Revenue
                                     On-line
                                                                  Water level
                                     Water level in
                                                                  Downstream flow
                                     reservoir




Examples of use                                           Jan Gregersen
Examples of use: Sewer to sewer

                   Mike Urban to Mike Urban


                              Water Level
            My model


Wave
         Model 1                                      Model 2


                               Flow




 Examples of use                      Jan Gregersen
How to create OpenMI linked systems : 1,2 Run



                                                      Model Engine
1: Populate models                                    Input files


                                                      OMI file
           My model



2: Configure




 3: Run


How to create OpenMI linked system    Jan Gregersen
How to create OpenMI linked systems : Demo




                                        River and groundwater models
           RR model




              River model




How to create OpenMI linked system   Jan Gregersen
How does OpenMI work : OpenMI is OO

    Very short introduction to Object Oriented programming

                      Interface Geometry
                      string ID
                      double DistanceToPoint (double x, double y)

            My model

                            implements                              implements



       Class Polygon                                                 Class Polyline
       String ID                                                     String ID
       double Area                                                   double GetDistanceToPoint(double x, double y)
       bool IsPointInside(double x, double y)
       double GetOverlapping Area(Polygon polygon
       double GetDistanceToPoint(double x, double y)


                         inherits


       Class Rectangle
       double diagonal



How does OpenMI work                                       Jan Gregersen
How does OpenMI work : ILinkableComponent


                          From outside all OpenMI compliant
                          components look the same

                          OpenMI.Standard.ILinkableComponent
                             void               Initialize(IArgument[] properties)

                             string             ComponentID
                             string             ComponentDescription
         RR model            string             ModelID
                             string             ModelDescription
                             ITimeSpan          TimeHorizon

                             IInputExchangeItem GetInputExchangeItem(int index)
                             IOutputExchangeItem GetOutputExchangeItem(int idex)
                             int                InputExchangeItemCount
                             int                OutputExchangeItemCount
            River model
                             void               AddLink (ILink link)
                             void               RemoveLink(string linkID)
                             string             Validate()

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

                             void               Finish()
                             void               Dispose()


How does OpenMI work                       Jan Gregersen
How does OpenMI work : GUI Add model



                                                                 void               Initialize(IArgument[] properties)

                                                                 string             ComponentID
                                                                 string             ComponentDescription
                                                                 string             ModelID
                                                                 string             ModelDescription
                      My model                                   ITimeSpan          TimeHorizon

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


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

                                                                 void               Prepare()
                                                                 IValueSet          GetValues(ITime time, string linkID)
                                                                 ITimeStamp         EarliestInputTime
1.    Read OMI file                                              void               Finish()
2.    Create component                                           void               Dispose()

3.    Invoke (call) Initialize
       1.   Component will read input files and initialize




     How does OpenMI work                                    Jan Gregersen
How does OpenMI work : The OMI file




<?xml version=quot;1.0quot;?>
<LinkableComponent Type=“RainfallRunoffModelLCquot; Assembly=quot;..binRainfallRunoffModel.dllquot;>
  <Arguments>
    <Argument Key=“Pathquot; ReadOnly=quot;truequot; Value=“..dataquot; />
  </Arguments>
              My model
</LinkableComponent>




How does OpenMI work                          Jan Gregersen
How does OpenMI work : Model properties


                                     void               Initialize(IArgument[] properties)

                                     string             ComponentID
                                     string             ComponentDescription
     My model                        string             ModelID
                                     string             ModelDescription
                                     ITimeSpan          TimeHorizon

                                     IInputExchangeItem GetInputExchangeItem(int index)
                                     IOutputExchangeItem GetOutputExchangeItem(int idex)
                                     int                InputExchangeItemCount
                                     int                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()




How does OpenMI work              Jan Gregersen
How does OpenMI work : Create and add link

                                               void               Initialize(IArgument[] properties)

                                               string             ComponentID
                                               string             ComponentDescription
                                               string             ModelID
                                               string             ModelDescription
                                               ITimeSpan          TimeHorizon

                                               IInputExchangeItem GetInputExchangeItem(int index)
                   My model                    IOutputExchangeItem GetOutputExchangeItem(int idex)
                                               int                InputExchangeItemCount
                                               int                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 items
2.   User selects output and input
3.   Create a link object
4.   Add the link to both components


     How does OpenMI work                 Jan Gregersen
How does OpenMI work : ExchangeItems




          My model




          Where                        What




                                         How




How does OpenMI work              Jan Gregersen
How does OpenMI Work : GetValues()

                                           void               Initialize(IArgument[] properties)

                                           string             ComponentID
                                           string             ComponentDescription
                                           string             ModelID
                                           string             ModelDescription
                                           ITimeSpan          TimeHorizon

                                           IInputExchangeItem GetInputExchangeItem(int index)
           My model                        IOutputExchangeItem GetOutputExchangeItem(int idex)
                                           int                InputExchangeItemCount
                                           int                OutputExchangeItemCount


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

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




How does OpenMI work                  Jan Gregersen
How does OpenMI Work : GetValues()


ID-Based link                          Geo-referenced bi-directional link



       My model
       GetValues(time)
                                                My model
                                                GetValues(time)




  How does OpenMI work                     Jan Gregersen
How does OpenMI Work : The Standard




                  Jan Gregersen
How to migrate models




How to migrate models               Jan Gregersen
How to migrate models:
             SDK: Balancing stability and flexibility

            The OpenMI Standard                    • Provided by OA
                                                   • Rigid release proceedure
            • The OpenMI.Standard interfaces
                                                   • Non frequent releases
            • The OpenMI standard definition
                                                   • The one and only Standard
            • XSD’s
                                                   • Makes components linkable


              The OpenMI SDK                       • Provided by OATC
               • Source code C# (and Java)         • Flexible release proceedures
               • Default implementaion             • Frequent releases
               • Wrapper                           • One of many
               •Targeting developers               • Makes OpenMI easier
                                                   • OATC.SDK targeting models
                                                   • Not required
            The OpenMI Configuration Editor        • Components compliant to
              • Create linked systems              same version of the standard
              • Run linked systems                 can be linked regardless of
              •Targeting users (e.g. modellers)    which SDK is used.


How to migrate models                    Jan Gregersen
How most models are organized


      User Interface

Run       Write

                    My model
      Input file


           Read


      Engine

           Write


      Output file




      How to migrate models                  Jan Gregersen
OpenMI is linking models



      User Interface

Run       Write

                    My model
      Input file


           Read


      Engine

           Write


      Output file




      How to migrate models                       Jan Gregersen
User Interface
                                  OpenMI.Standard
Run       Write                <<ILinkableComponent>>


                    My model
      Input file


           Read


      Engine

           Write


      Output file




      How to migrate models          Jan Gregersen
User Interface
                                  OpenMI.Standard
Run       Write                <<ILinkableComponent>>


                    My model
      Input file


           Read
                                 GetValues()


      Engine                                            Some
                                                        model
           Write

                                   GetValues()
      Output file




      How to migrate models          Jan Gregersen
How do I set values ?



      User Interface
                                                                      OpenMI.Standard
Run         Write                                                  <<ILinkableComponent>>


                        My model
      Input file
         void               Initialize(IArgument[] properties)

        string              ComponentID
        string
             Read
        string
                            ComponentDescription
                            ModelID
                                                                     GetValues()
        string              ModelDescription
        ITimeSpan          TimeHorizon
        int                InputExchangeItemCount
      Engine
        IInputExchangeItem GetInputExchangeItem(int inputExchangeItemIndex)
        int                OutputExchangeItemCount
                                                                                                Some
        IOutputExchangeItem GetOutputExchangeItem(int outputExchangeItemIndex)                  model
         void Write         AddLink (ILink link)
         void               RemoveLink(string linkID)
         string             Validate()
                                                                       GetValues()
        void                Prepare()
      Output file
        IValueSet           GetValues(ITime time, string linkID)
        ITimeStamp          EarliestInputTime

         void               Finish()
         void               Dispose()


      How to migrate models                                              Jan Gregersen
User Interface

Run       Write

                                         My model            OpenMI.Standard
      Input file                                         <<ILinkableComponent>>


                       Oatc.OpenMI.Sdk
                         <<IEngine>>
           Read                                            GetValues()

      Engine                               SDK                                    Some
                                         (Wrapper)                                model
           Write
                                                            GetValues()
      Output file




      How to migrate models                      Jan Gregersen
// -- Execution control methods (Inherited from IRunEngine) --
                                           void Initialize(Hashtable properties);
                                           bool PerformTimeStep();
                                           void Finish();

                                           //-- Time methods (Inherited from IRunEngine) --
                                           ITime       GetCurrentTime();
      User Interface                       ITime       GetInputTime(string QuantityID, string ElementSetID);
                                           ITimeStamp GetEarliestNeededTime();


Run       Write                            //-- Data access methods (Inherited from IRunEngine) --
                                           void       SetValues(string QuantityID, string ElementSetID, IValueSet values);
                                           IValueSet GetValues(string QuantityID, string ElementSetID);
                                         My model                       OpenMI.Standard
      Input file                                                    <<ILinkableComponent>>
                                           //-- Component description methods (Inherited from IRunEngine) --
                                           double GetMissingValueDefinition();
                                           String GetComponentID();
                       Oatc.OpenMI.Sdk     string GetComponentDescription();
                         <<IEngine>>
           Read                                                           GetValues()
                                           // -- Model description methods --
                                           string GetModelID();
                                           string GetModelDescription();
      Engine                               SDK
                                           double GetTimeHorizon();                                             Some
                                         (Wrapper)                                                              model
                                           // -- Exchange items --
           Write                           int GetInputExchangeItemCount();
                                           int GetOutputExchangeItemCount();
                                                                            GetValues()
                                           org.OpenMI.Backbone GetInputExchangeItem(int exchangeItemIndex);
                                           org.OpenMI.Backbone GetOutputExchangeItem(int exchangeItemIndex);
      Output file




      How to migrate models                          Jan Gregersen
Buffers results from the engine core           Mapping of values associated to one
                                                   ElementSet to be represented on
                                                   another ElementSet


    User Interface
   Mapping of values associated to one array of
   times /timespans to values represented on
   another array of times/timespans                    •Link administration
Run     Write
                                                       •Exception handling
                              My model                 •Events handling
                                                                  OpenMI.Standard
    Input file                                                  <<ILinkableComponent>>
                      t                        t       •And more..
                      Oatc.OpenMI.Sdk
                        <<IEngine>>
         Read                                                     GetValues()

    Engine                                   SDK                                         Some
                                           (Wrapper)                                     model
          Write
                                                                     GetValues()
    Output file




    How to migrate models                          Jan Gregersen
Oatc.OpenMI.Sdk.Wrapper.IEngine

                                                          // -- Execution control methods (Inherited from IRunEngine) --
                                                          void Initialize(Hashtable properties);
                                                          bool PerformTimeStep();
                                                          void Finish();

                                                          //-- Time methods (Inherited from IRunEngine) --
OpenMI.Standard.IlinkableComponent                        ITime       GetCurrentTime();
                                                          ITime       GetInputTime(string QuantityID, string ElementSetID);
void               Initialize(IArgument[] properties)     ITimeStamp GetEarliestNeededTime();

string             ComponentID
                                                          //-- Data access methods (Inherited from IRunEngine) --
string             ComponentDescription
string             ModelID                                void       SetValues(string QuantityID, string ElementSetID, IValueSet values);
string             ModelDescription                       IValueSet GetValues(string QuantityID, string ElementSetID);
ITimeSpan          TimeHorizon
                                                          //-- Component description methods (Inherited from IRunEngine) --
IInputExchangeItem GetInputExchangeItem(int index)
                                                          double GetMissingValueDefinition();
IOutputExchangeItem GetOutputExchangeItem(int idex)
int                InputExchangeItemCount                 String GetComponentID();
int                OutputExchangeItemCount                string GetComponentDescription();

                                                          // -- Model description methods --
void               AddLink (ILink link)
void               RemoveLink(string linkID)              string GetModelID();
string             Validate()                             string GetModelDescription();
                                                          double GetTimeHorizon();
void               Prepare()
IValueSet          GetValues(ITime time, string linkID)   // -- Exchange items --
ITimeStamp         EarliestInputTime
                                                          int GetInputExchangeItemCount();
void               Finish()                               int GetOutputExchangeItemCount();
void               Dispose()                              org.OpenMI.Backbone GetInputExchangeItem(int exchangeItemIndex);
                                                          org.OpenMI.Backbone GetOutputExchangeItem(int exchangeItemIndex);


       How to migrate models                                        Jan Gregersen
Migration design pattern



               << interface >>
     OpenMI.Standard.ILinkableComponent

                                                                         << interface >>
                                                                 Oatc.OpenMI.Sdk.Wrapper.IEngine
               Implements
                                                                           Implements
             << abstract class >>
 Oatc.OpenMI.Sdk.Backbone.LinkableComponent            IEngine
                                                                           << Class >>
                                                                    Rivermodel.EngineWrapper

                  Inherits
                                              access
                                                                               access
             << abstract class >>
    Oatc.OpenMI.Sdk.Wrapper.LinkableEngine         create
                                                                            << Class >>
                                                                         RiverModel.Engine

                 Inherits
                                                                             access

              << Class >>
      Rivermodel.LinkableComponent                                           << dll >>
                                                                          Fortran Engine



How to migrate models                            Jan Gregersen
Five steps to a compliant model



           1. Make sure that your engine is a Dll not a Exe

           2. Separate initialization, Perform time step, and finalization

           3. Implement IEngine

           4. Attach the SDK wrapper

           5. Done

           6. See also the simple river example




How to migrate models                    Jan Gregersen
Remarks about the configuration editor




                                                 • Enables user to create linked
                                                   systems and run these

                                                 • Is using the OpenMI standard
                                                   – not part of the standard

                                                 • We encurage other people to
                                                   create more sofisticated GUI’s




How to migrate models                  Jan Gregersen
Final remarks on model migration

           • The SDK makes model migration easier

           • The SDK is aimed at time stepping numerical models

           • The SDK is not mandatory to use (only the standard matters)

           • SDK and the standard together provides stability and flexibility




How to migrate models                    Jan Gregersen
Hard coded OpenMI configurations




Hardcoded configurations              Jan Gregersen
Calibration




                            GetValues()

                                                    SaveState()


                                                  RestoreState()

                                                 GetValues()
                                                  Measured values

                                                  GetValues()
                                                  GetValues()

                                                  New parameters

                              All time steps     Simulated discharge


                                                       Calc.. New
                            While (M – S)2 > a         parameters




Calibration                               Jan Gregersen
Support through the Internet



                                                • General info
                                                • News & Calendar
                                                • Compliant models
                                                • Documentation

                                       http://sourceforge.net/projects/Openmi
                                                  • Help forum
                                                  • Discussion forum
                                                  • Feature request



                                       http://Wiki.OpenMI.org
                                                  • Getting started
                                                  • HowTo
                                                  • Documentation

Getting help                          Jan Gregersen
www.OpenMI.org




        Jan Gregersen
www.sourceforge.net/projects/openmi




Getting help                Jan Gregersen
Wiki.OpenMI.org




Getting help              Jan Gregersen
People to people


                                   OpenMI Workshops
                                                • OpenMI Life workshops
                                                • Conference workshops
                                                • Specific workshops


                                   OpenMI training
                                             • End users training
                                             • Developers training
                                             • Tailored training


                                   Consulting
                                                • Model provider
                                                • Consultants


Getting help                      Jan Gregersen
Thank you for your attention




                 Jan Gregersen

More Related Content

Viewers also liked

Shape 2013 developing multi targeting windows store and windows phone apps
Shape 2013   developing multi targeting windows store and windows phone appsShape 2013   developing multi targeting windows store and windows phone apps
Shape 2013 developing multi targeting windows store and windows phone appsJose Luis Latorre Millas
 
Central Asian countries
Central Asian countriesCentral Asian countries
Central Asian countriesinvestoralist
 
Surtsey
SurtseySurtsey
Surtseyjanusg
 
Introduction To OpenMI
Introduction To OpenMIIntroduction To OpenMI
Introduction To OpenMIJan Gregersen
 
a kérdőívre
a kérdőívre a kérdőívre
a kérdőívre bara1
 
Innovachron Offering
Innovachron OfferingInnovachron Offering
Innovachron Offeringremicote
 
Central Asian countries
Central Asian countriesCentral Asian countries
Central Asian countriesinvestoralist
 
01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...
01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...
01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...Pozzolini
 
A vilag het_termeszeti_csodaja
A vilag het_termeszeti_csodajaA vilag het_termeszeti_csodaja
A vilag het_termeszeti_csodajabara1
 
Informatie, Middel Voor Gezonde Sturing
Informatie, Middel Voor Gezonde SturingInformatie, Middel Voor Gezonde Sturing
Informatie, Middel Voor Gezonde SturingDaan Blinde
 
Using Market Research to Improve Student Experiences
Using Market Research to Improve Student ExperiencesUsing Market Research to Improve Student Experiences
Using Market Research to Improve Student ExperiencesCass Erbs
 

Viewers also liked (16)

Shape 2013 developing multi targeting windows store and windows phone apps
Shape 2013   developing multi targeting windows store and windows phone appsShape 2013   developing multi targeting windows store and windows phone apps
Shape 2013 developing multi targeting windows store and windows phone apps
 
Central Asian countries
Central Asian countriesCentral Asian countries
Central Asian countries
 
Surtsey
SurtseySurtsey
Surtsey
 
Introduction To OpenMI
Introduction To OpenMIIntroduction To OpenMI
Introduction To OpenMI
 
a kérdőívre
a kérdőívre a kérdőívre
a kérdőívre
 
Innovachron Offering
Innovachron OfferingInnovachron Offering
Innovachron Offering
 
Gallery
GalleryGallery
Gallery
 
Central Asian countries
Central Asian countriesCentral Asian countries
Central Asian countries
 
01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...
01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...
01. Negotiating Presentation For The Seminar Generic 2009 September Beta Rele...
 
Khokhrina
KhokhrinaKhokhrina
Khokhrina
 
A vilag het_termeszeti_csodaja
A vilag het_termeszeti_csodajaA vilag het_termeszeti_csodaja
A vilag het_termeszeti_csodaja
 
Informatie, Middel Voor Gezonde Sturing
Informatie, Middel Voor Gezonde SturingInformatie, Middel Voor Gezonde Sturing
Informatie, Middel Voor Gezonde Sturing
 
Anniversary2012
Anniversary2012Anniversary2012
Anniversary2012
 
Base New Berlin
Base New BerlinBase New Berlin
Base New Berlin
 
Rule Breakers
Rule BreakersRule Breakers
Rule Breakers
 
Using Market Research to Improve Student Experiences
Using Market Research to Improve Student ExperiencesUsing Market Research to Improve Student Experiences
Using Market Research to Improve Student Experiences
 

Similar to Introduction To OpenMI

Jopenmeraverse introduction
Jopenmeraverse introductionJopenmeraverse introduction
Jopenmeraverse introductionJitendra Chauhan
 
Producing simulation sequences by use of a Java-based Framework
Producing simulation sequences by use of a Java-based FrameworkProducing simulation sequences by use of a Java-based Framework
Producing simulation sequences by use of a Java-based FrameworkDaniele Gianni
 
Building Server Applications with EclipseRT
Building Server Applications with EclipseRTBuilding Server Applications with EclipseRT
Building Server Applications with EclipseRTGunnar Wagenknecht
 
Unifi
Unifi Unifi
Unifi hangal
 
Attention is All You Need (Transformer)
Attention is All You Need (Transformer)Attention is All You Need (Transformer)
Attention is All You Need (Transformer)Jeong-Gwan Lee
 
JSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklJSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklChristoph Pickl
 
How to double .net code value
How to double .net code valueHow to double .net code value
How to double .net code valuejavOnet
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers TrainingJan Gregersen
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers TrainingJan Gregersen
 
Testing Rich Domain Models
Testing Rich Domain ModelsTesting Rich Domain Models
Testing Rich Domain ModelsChris Richardson
 
InduSoft VBScript Webinar
 InduSoft VBScript Webinar InduSoft VBScript Webinar
InduSoft VBScript WebinarAVEVA
 
The Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about itThe Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about itJiahao Chen
 
Services Oriented Infrastructure in a Web2.0 World
Services Oriented Infrastructure in a Web2.0 WorldServices Oriented Infrastructure in a Web2.0 World
Services Oriented Infrastructure in a Web2.0 WorldLexumo
 
Shape12 6
Shape12 6Shape12 6
Shape12 6pslulli
 
The essence of deep learning, automatic differentiation
The essence of deep learning, automatic differentiationThe essence of deep learning, automatic differentiation
The essence of deep learning, automatic differentiationPedro Larroy
 
Itinerary Website (Web Development Document)
Itinerary Website (Web Development Document)Itinerary Website (Web Development Document)
Itinerary Website (Web Development Document)Traitet Thepbandansuk
 
Inventing the future Business Programming Language
Inventing the future  Business Programming LanguageInventing the future  Business Programming Language
Inventing the future Business Programming LanguageESUG
 

Similar to Introduction To OpenMI (20)

Jopenmeraverse introduction
Jopenmeraverse introductionJopenmeraverse introduction
Jopenmeraverse introduction
 
Producing simulation sequences by use of a Java-based Framework
Producing simulation sequences by use of a Java-based FrameworkProducing simulation sequences by use of a Java-based Framework
Producing simulation sequences by use of a Java-based Framework
 
Node.JS briefly introduced
Node.JS briefly introducedNode.JS briefly introduced
Node.JS briefly introduced
 
Building Server Applications with EclipseRT
Building Server Applications with EclipseRTBuilding Server Applications with EclipseRT
Building Server Applications with EclipseRT
 
Unifi
Unifi Unifi
Unifi
 
Generator
GeneratorGenerator
Generator
 
SUBJECT
SUBJECTSUBJECT
SUBJECT
 
Attention is All You Need (Transformer)
Attention is All You Need (Transformer)Attention is All You Need (Transformer)
Attention is All You Need (Transformer)
 
JSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph PicklJSUG - Filthy Flex by Christoph Pickl
JSUG - Filthy Flex by Christoph Pickl
 
How to double .net code value
How to double .net code valueHow to double .net code value
How to double .net code value
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers Training
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers Training
 
Testing Rich Domain Models
Testing Rich Domain ModelsTesting Rich Domain Models
Testing Rich Domain Models
 
InduSoft VBScript Webinar
 InduSoft VBScript Webinar InduSoft VBScript Webinar
InduSoft VBScript Webinar
 
The Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about itThe Visualization Toolkit (VTK) and why you might care about it
The Visualization Toolkit (VTK) and why you might care about it
 
Services Oriented Infrastructure in a Web2.0 World
Services Oriented Infrastructure in a Web2.0 WorldServices Oriented Infrastructure in a Web2.0 World
Services Oriented Infrastructure in a Web2.0 World
 
Shape12 6
Shape12 6Shape12 6
Shape12 6
 
The essence of deep learning, automatic differentiation
The essence of deep learning, automatic differentiationThe essence of deep learning, automatic differentiation
The essence of deep learning, automatic differentiation
 
Itinerary Website (Web Development Document)
Itinerary Website (Web Development Document)Itinerary Website (Web Development Document)
Itinerary Website (Web Development Document)
 
Inventing the future Business Programming Language
Inventing the future  Business Programming LanguageInventing the future  Business Programming Language
Inventing the future Business Programming Language
 

Recently uploaded

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DaySri Ambati
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 

Recently uploaded (20)

How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo DayH2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
H2O.ai CEO/Founder: Sri Ambati Keynote at Wells Fargo Day
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 

Introduction To OpenMI

  • 1. Introduction to OpenMI Jan Gregersen LicTek http://www.LicTek.com
  • 2. Connecting things - When two and two is five My model USB • Provides freedom of choice for the users • Provides opportunities for suppliers Standard Introduction Jan Gregersen
  • 3. About this presentation • Examples of use • How to create OpenMI linked systems My model • How does OpenMI work • How to migrate models • Hardcoded configurations • Optimization, calibration, .. • Support Introduction Jan Gregersen
  • 4. Examples of use: Integrated modelling Met. Database Hymos precip RR RR RR My model RR Sobek RR Mike She GW RR Runoff RR Leakage RR Mike Basin GW Level flow ISIS RR RR Examples of use Jan Gregersen
  • 5. Examples of use: Hydropower DSS Web service Web service Estimated Forecasted: power price Precipitation Temperature Evaporation Use Use Use Numeric model Operates Hydropower DSS Define or optimization tool HP scenarios User Use Use Use Creates Numeric model Simulated Revenue On-line Water level Water level in Downstream flow reservoir Examples of use Jan Gregersen
  • 6. Examples of use: Sewer to sewer Mike Urban to Mike Urban Water Level My model Wave Model 1 Model 2 Flow Examples of use Jan Gregersen
  • 7. How to create OpenMI linked systems : 1,2 Run Model Engine 1: Populate models Input files OMI file My model 2: Configure 3: Run How to create OpenMI linked system Jan Gregersen
  • 8. How to create OpenMI linked systems : Demo River and groundwater models RR model River model How to create OpenMI linked system Jan Gregersen
  • 9. How does OpenMI work : OpenMI is OO Very short introduction to Object Oriented programming Interface Geometry string ID double DistanceToPoint (double x, double y) My model implements implements Class Polygon Class Polyline String ID String ID double Area double GetDistanceToPoint(double x, double y) bool IsPointInside(double x, double y) double GetOverlapping Area(Polygon polygon double GetDistanceToPoint(double x, double y) inherits Class Rectangle double diagonal How does OpenMI work Jan Gregersen
  • 10. How does OpenMI work : ILinkableComponent From outside all OpenMI compliant components look the same OpenMI.Standard.ILinkableComponent void Initialize(IArgument[] properties) string ComponentID string ComponentDescription RR model string ModelID string ModelDescription ITimeSpan TimeHorizon IInputExchangeItem GetInputExchangeItem(int index) IOutputExchangeItem GetOutputExchangeItem(int idex) int InputExchangeItemCount int OutputExchangeItemCount River model void AddLink (ILink link) void RemoveLink(string linkID) string Validate() void Prepare() IValueSet GetValues(ITime time, string linkID) ITimeStamp EarliestInputTime void Finish() void Dispose() How does OpenMI work Jan Gregersen
  • 11. How does OpenMI work : GUI Add model void Initialize(IArgument[] properties) string ComponentID string ComponentDescription string ModelID string ModelDescription My model ITimeSpan TimeHorizon IInputExchangeItem GetInputExchangeItem(int index) IOutputExchangeItem GetOutputExchangeItem(int idex) int InputExchangeItemCount int OutputExchangeItemCount void AddLink (ILink link) void RemoveLink(string linkID) string Validate() void Prepare() IValueSet GetValues(ITime time, string linkID) ITimeStamp EarliestInputTime 1. Read OMI file void Finish() 2. Create component void Dispose() 3. Invoke (call) Initialize 1. Component will read input files and initialize How does OpenMI work Jan Gregersen
  • 12. How does OpenMI work : The OMI file <?xml version=quot;1.0quot;?> <LinkableComponent Type=“RainfallRunoffModelLCquot; Assembly=quot;..binRainfallRunoffModel.dllquot;> <Arguments> <Argument Key=“Pathquot; ReadOnly=quot;truequot; Value=“..dataquot; /> </Arguments> My model </LinkableComponent> How does OpenMI work Jan Gregersen
  • 13. How does OpenMI work : Model properties void Initialize(IArgument[] properties) string ComponentID string ComponentDescription My model string ModelID string ModelDescription ITimeSpan TimeHorizon IInputExchangeItem GetInputExchangeItem(int index) IOutputExchangeItem GetOutputExchangeItem(int idex) int InputExchangeItemCount int 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() How does OpenMI work Jan Gregersen
  • 14. How does OpenMI work : Create and add link void Initialize(IArgument[] properties) string ComponentID string ComponentDescription string ModelID string ModelDescription ITimeSpan TimeHorizon IInputExchangeItem GetInputExchangeItem(int index) My model IOutputExchangeItem GetOutputExchangeItem(int idex) int InputExchangeItemCount int 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 items 2. User selects output and input 3. Create a link object 4. Add the link to both components How does OpenMI work Jan Gregersen
  • 15. How does OpenMI work : ExchangeItems My model Where What How How does OpenMI work Jan Gregersen
  • 16. How does OpenMI Work : GetValues() void Initialize(IArgument[] properties) string ComponentID string ComponentDescription string ModelID string ModelDescription ITimeSpan TimeHorizon IInputExchangeItem GetInputExchangeItem(int index) My model IOutputExchangeItem GetOutputExchangeItem(int idex) int InputExchangeItemCount int OutputExchangeItemCount void AddLink (ILink link) void RemoveLink(string linkID) string Validate() void Prepare() IValueSet GetValues(ITime time, string linkID) ITimeStamp EarliestInputTime GetValues(time) void Finish() void Dispose() GetValues(time) How does OpenMI work Jan Gregersen
  • 17. How does OpenMI Work : GetValues() ID-Based link Geo-referenced bi-directional link My model GetValues(time) My model GetValues(time) How does OpenMI work Jan Gregersen
  • 18. How does OpenMI Work : The Standard Jan Gregersen
  • 19. How to migrate models How to migrate models Jan Gregersen
  • 20. How to migrate models: SDK: Balancing stability and flexibility The OpenMI Standard • Provided by OA • Rigid release proceedure • The OpenMI.Standard interfaces • Non frequent releases • The OpenMI standard definition • The one and only Standard • XSD’s • Makes components linkable The OpenMI SDK • Provided by OATC • Source code C# (and Java) • Flexible release proceedures • Default implementaion • Frequent releases • Wrapper • One of many •Targeting developers • Makes OpenMI easier • OATC.SDK targeting models • Not required The OpenMI Configuration Editor • Components compliant to • Create linked systems same version of the standard • Run linked systems can be linked regardless of •Targeting users (e.g. modellers) which SDK is used. How to migrate models Jan Gregersen
  • 21. How most models are organized User Interface Run Write My model Input file Read Engine Write Output file How to migrate models Jan Gregersen
  • 22. OpenMI is linking models User Interface Run Write My model Input file Read Engine Write Output file How to migrate models Jan Gregersen
  • 23. User Interface OpenMI.Standard Run Write <<ILinkableComponent>> My model Input file Read Engine Write Output file How to migrate models Jan Gregersen
  • 24. User Interface OpenMI.Standard Run Write <<ILinkableComponent>> My model Input file Read GetValues() Engine Some model Write GetValues() Output file How to migrate models Jan Gregersen
  • 25. How do I set values ? User Interface OpenMI.Standard Run Write <<ILinkableComponent>> My model Input file void Initialize(IArgument[] properties) string ComponentID string Read string ComponentDescription ModelID GetValues() string ModelDescription ITimeSpan TimeHorizon int InputExchangeItemCount Engine IInputExchangeItem GetInputExchangeItem(int inputExchangeItemIndex) int OutputExchangeItemCount Some IOutputExchangeItem GetOutputExchangeItem(int outputExchangeItemIndex) model void Write AddLink (ILink link) void RemoveLink(string linkID) string Validate() GetValues() void Prepare() Output file IValueSet GetValues(ITime time, string linkID) ITimeStamp EarliestInputTime void Finish() void Dispose() How to migrate models Jan Gregersen
  • 26. User Interface Run Write My model OpenMI.Standard Input file <<ILinkableComponent>> Oatc.OpenMI.Sdk <<IEngine>> Read GetValues() Engine SDK Some (Wrapper) model Write GetValues() Output file How to migrate models Jan Gregersen
  • 27. // -- Execution control methods (Inherited from IRunEngine) -- void Initialize(Hashtable properties); bool PerformTimeStep(); void Finish(); //-- Time methods (Inherited from IRunEngine) -- ITime GetCurrentTime(); User Interface ITime GetInputTime(string QuantityID, string ElementSetID); ITimeStamp GetEarliestNeededTime(); Run Write //-- Data access methods (Inherited from IRunEngine) -- void SetValues(string QuantityID, string ElementSetID, IValueSet values); IValueSet GetValues(string QuantityID, string ElementSetID); My model OpenMI.Standard Input file <<ILinkableComponent>> //-- Component description methods (Inherited from IRunEngine) -- double GetMissingValueDefinition(); String GetComponentID(); Oatc.OpenMI.Sdk string GetComponentDescription(); <<IEngine>> Read GetValues() // -- Model description methods -- string GetModelID(); string GetModelDescription(); Engine SDK double GetTimeHorizon(); Some (Wrapper) model // -- Exchange items -- Write int GetInputExchangeItemCount(); int GetOutputExchangeItemCount(); GetValues() org.OpenMI.Backbone GetInputExchangeItem(int exchangeItemIndex); org.OpenMI.Backbone GetOutputExchangeItem(int exchangeItemIndex); Output file How to migrate models Jan Gregersen
  • 28. Buffers results from the engine core Mapping of values associated to one ElementSet to be represented on another ElementSet User Interface Mapping of values associated to one array of times /timespans to values represented on another array of times/timespans •Link administration Run Write •Exception handling My model •Events handling OpenMI.Standard Input file <<ILinkableComponent>> t t •And more.. Oatc.OpenMI.Sdk <<IEngine>> Read GetValues() Engine SDK Some (Wrapper) model Write GetValues() Output file How to migrate models Jan Gregersen
  • 29. Oatc.OpenMI.Sdk.Wrapper.IEngine // -- Execution control methods (Inherited from IRunEngine) -- void Initialize(Hashtable properties); bool PerformTimeStep(); void Finish(); //-- Time methods (Inherited from IRunEngine) -- OpenMI.Standard.IlinkableComponent ITime GetCurrentTime(); ITime GetInputTime(string QuantityID, string ElementSetID); void Initialize(IArgument[] properties) ITimeStamp GetEarliestNeededTime(); string ComponentID //-- Data access methods (Inherited from IRunEngine) -- string ComponentDescription string ModelID void SetValues(string QuantityID, string ElementSetID, IValueSet values); string ModelDescription IValueSet GetValues(string QuantityID, string ElementSetID); ITimeSpan TimeHorizon //-- Component description methods (Inherited from IRunEngine) -- IInputExchangeItem GetInputExchangeItem(int index) double GetMissingValueDefinition(); IOutputExchangeItem GetOutputExchangeItem(int idex) int InputExchangeItemCount String GetComponentID(); int OutputExchangeItemCount string GetComponentDescription(); // -- Model description methods -- void AddLink (ILink link) void RemoveLink(string linkID) string GetModelID(); string Validate() string GetModelDescription(); double GetTimeHorizon(); void Prepare() IValueSet GetValues(ITime time, string linkID) // -- Exchange items -- ITimeStamp EarliestInputTime int GetInputExchangeItemCount(); void Finish() int GetOutputExchangeItemCount(); void Dispose() org.OpenMI.Backbone GetInputExchangeItem(int exchangeItemIndex); org.OpenMI.Backbone GetOutputExchangeItem(int exchangeItemIndex); How to migrate models Jan Gregersen
  • 30. Migration design pattern << interface >> OpenMI.Standard.ILinkableComponent << interface >> Oatc.OpenMI.Sdk.Wrapper.IEngine Implements Implements << abstract class >> Oatc.OpenMI.Sdk.Backbone.LinkableComponent IEngine << Class >> Rivermodel.EngineWrapper Inherits access access << abstract class >> Oatc.OpenMI.Sdk.Wrapper.LinkableEngine create << Class >> RiverModel.Engine Inherits access << Class >> Rivermodel.LinkableComponent << dll >> Fortran Engine How to migrate models Jan Gregersen
  • 31. Five steps to a compliant model 1. Make sure that your engine is a Dll not a Exe 2. Separate initialization, Perform time step, and finalization 3. Implement IEngine 4. Attach the SDK wrapper 5. Done 6. See also the simple river example How to migrate models Jan Gregersen
  • 32. Remarks about the configuration editor • Enables user to create linked systems and run these • Is using the OpenMI standard – not part of the standard • We encurage other people to create more sofisticated GUI’s How to migrate models Jan Gregersen
  • 33. Final remarks on model migration • The SDK makes model migration easier • The SDK is aimed at time stepping numerical models • The SDK is not mandatory to use (only the standard matters) • SDK and the standard together provides stability and flexibility How to migrate models Jan Gregersen
  • 34. Hard coded OpenMI configurations Hardcoded configurations Jan Gregersen
  • 35. Calibration GetValues() SaveState() RestoreState() GetValues() Measured values GetValues() GetValues() New parameters All time steps Simulated discharge Calc.. New While (M – S)2 > a parameters Calibration Jan Gregersen
  • 36. Support through the Internet • General info • News & Calendar • Compliant models • Documentation http://sourceforge.net/projects/Openmi • Help forum • Discussion forum • Feature request http://Wiki.OpenMI.org • Getting started • HowTo • Documentation Getting help Jan Gregersen
  • 37. www.OpenMI.org Jan Gregersen
  • 40. People to people OpenMI Workshops • OpenMI Life workshops • Conference workshops • Specific workshops OpenMI training • End users training • Developers training • Tailored training Consulting • Model provider • Consultants Getting help Jan Gregersen
  • 41. Thank you for your attention Jan Gregersen