SlideShare una empresa de Scribd logo
1 de 41
Descargar para leer sin conexión
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

Más contenido relacionado

Destacado

Will the Kindle Save Reading?
Will the Kindle Save Reading?Will the Kindle Save Reading?
Will the Kindle Save Reading?Len Edgerly
 
Emotional design
Emotional designEmotional design
Emotional designKarla Feria
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers TrainingJan Gregersen
 
Identity and Authentication: A computer scientist looks at the analogue world
Identity and Authentication:  A computer scientist looks at the analogue worldIdentity and Authentication:  A computer scientist looks at the analogue world
Identity and Authentication: A computer scientist looks at the analogue worldJ_H_Davenport
 
The Distinguished Club Programme
The Distinguished Club ProgrammeThe Distinguished Club Programme
The Distinguished Club ProgrammeFrances Kazan
 
Its Not The Effort You Put In That Counts, Its The Results You Get Out.“
Its Not The Effort You Put In That Counts, Its The Results You Get Out.“Its Not The Effort You Put In That Counts, Its The Results You Get Out.“
Its Not The Effort You Put In That Counts, Its The Results You Get Out.“Pozzolini
 
Stephen Covey 9010
Stephen Covey   9010Stephen Covey   9010
Stephen Covey 9010vladgliga
 
Svíþjóð
SvíþjóðSvíþjóð
Svíþjóðjanusg
 
Presentatie Sensire Yunio Intranet Klantcase En Techniek
Presentatie Sensire Yunio Intranet Klantcase En TechniekPresentatie Sensire Yunio Intranet Klantcase En Techniek
Presentatie Sensire Yunio Intranet Klantcase En TechniekRalph Jacobs
 
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
 
Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...
Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...
Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...Pozzolini
 
Open Source per Donne / Girl Geek
Open Source per Donne / Girl GeekOpen Source per Donne / Girl Geek
Open Source per Donne / Girl GeekSara Rosso
 
Qliktechcorporateoverview
QliktechcorporateoverviewQliktechcorporateoverview
Qliktechcorporateoverviewivango1
 

Destacado (16)

Will the Kindle Save Reading?
Will the Kindle Save Reading?Will the Kindle Save Reading?
Will the Kindle Save Reading?
 
Emotional design
Emotional designEmotional design
Emotional design
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers Training
 
Identity and Authentication: A computer scientist looks at the analogue world
Identity and Authentication:  A computer scientist looks at the analogue worldIdentity and Authentication:  A computer scientist looks at the analogue world
Identity and Authentication: A computer scientist looks at the analogue world
 
Windows 8
Windows 8Windows 8
Windows 8
 
The Distinguished Club Programme
The Distinguished Club ProgrammeThe Distinguished Club Programme
The Distinguished Club Programme
 
Its Not The Effort You Put In That Counts, Its The Results You Get Out.“
Its Not The Effort You Put In That Counts, Its The Results You Get Out.“Its Not The Effort You Put In That Counts, Its The Results You Get Out.“
Its Not The Effort You Put In That Counts, Its The Results You Get Out.“
 
Stephen Covey 9010
Stephen Covey   9010Stephen Covey   9010
Stephen Covey 9010
 
Svíþjóð
SvíþjóðSvíþjóð
Svíþjóð
 
Md2010 jl-wp7-sl-game-dev
Md2010 jl-wp7-sl-game-devMd2010 jl-wp7-sl-game-dev
Md2010 jl-wp7-sl-game-dev
 
Presentatie Sensire Yunio Intranet Klantcase En Techniek
Presentatie Sensire Yunio Intranet Klantcase En TechniekPresentatie Sensire Yunio Intranet Klantcase En Techniek
Presentatie Sensire Yunio Intranet Klantcase En Techniek
 
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
 
Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...
Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...
Think With Your Brain (Revised Release Of Do We Need Business Intelligence) A...
 
Open Source per Donne / Girl Geek
Open Source per Donne / Girl GeekOpen Source per Donne / Girl Geek
Open Source per Donne / Girl Geek
 
Qliktechcorporateoverview
QliktechcorporateoverviewQliktechcorporateoverview
Qliktechcorporateoverview
 
Busijness Environment
Busijness EnvironmentBusijness Environment
Busijness Environment
 

Similar a 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
 
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
 
UA Mobile 2012 (English)
UA Mobile 2012 (English)UA Mobile 2012 (English)
UA Mobile 2012 (English)dmalykhanov
 

Similar a 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
 
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
 
UA Mobile 2012 (English)
UA Mobile 2012 (English)UA Mobile 2012 (English)
UA Mobile 2012 (English)
 

Último

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
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
 
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
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rick Flair
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
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
 

Último (20)

UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
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
 
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.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...Rise of the Machines: Known As Drones...
Rise of the Machines: Known As Drones...
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
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
 

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