SlideShare una empresa de Scribd logo
1 de 25
How to make your model OpenMI compliant

               Jan Gregersen LicTek / DHI
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
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 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
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
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


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


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




How to migrate models                    Jan Gregersen
Thank you for your attention




                 Jan Gregersen

Más contenido relacionado

La actualidad más candente

Functional solid
Functional solidFunctional solid
Functional solidMatt Stine
 
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseThe SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseCoen De Roover
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Coen De Roover
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side JavascriptJulie Iskander
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and OperatorsMohamed Samy
 
Detecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJDetecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJCoen De Roover
 
Clean code - Agile Software Craftsmanship
Clean code - Agile Software CraftsmanshipClean code - Agile Software Craftsmanship
Clean code - Agile Software CraftsmanshipYukti Kaura
 
Machine learning Lecture 3
Machine learning Lecture 3Machine learning Lecture 3
Machine learning Lecture 3Srinivasan R
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programmingRiccardo Cardin
 
Esoteric LINQ and Structural Madness
Esoteric LINQ and Structural MadnessEsoteric LINQ and Structural Madness
Esoteric LINQ and Structural MadnessChris Eargle
 
What's New In Python 2.6
What's New In Python 2.6What's New In Python 2.6
What's New In Python 2.6Richard Jones
 
Online java training ppt
Online java training pptOnline java training ppt
Online java training pptvibrantuser
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentalsHCMUTE
 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part IEugene Lazutkin
 

La actualidad más candente (19)

Java unit i
Java unit iJava unit i
Java unit i
 
Functional solid
Functional solidFunctional solid
Functional solid
 
CORBA IDL
CORBA IDLCORBA IDL
CORBA IDL
 
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with EclipseThe SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
The SOUL Tool Suite for Querying Programs in Symbiosis with Eclipse
 
Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012Ekeko Technology Showdown at SoTeSoLa 2012
Ekeko Technology Showdown at SoTeSoLa 2012
 
Introduction to Client-Side Javascript
Introduction to Client-Side JavascriptIntroduction to Client-Side Javascript
Introduction to Client-Side Javascript
 
Android JNI
Android JNIAndroid JNI
Android JNI
 
Data types and Operators
Data types and OperatorsData types and Operators
Data types and Operators
 
Objective c
Objective cObjective c
Objective c
 
Detecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJDetecting aspect-specific code smells using Ekeko for AspectJ
Detecting aspect-specific code smells using Ekeko for AspectJ
 
Clean code - Agile Software Craftsmanship
Clean code - Agile Software CraftsmanshipClean code - Agile Software Craftsmanship
Clean code - Agile Software Craftsmanship
 
Machine learning Lecture 3
Machine learning Lecture 3Machine learning Lecture 3
Machine learning Lecture 3
 
Java - Generic programming
Java - Generic programmingJava - Generic programming
Java - Generic programming
 
Esoteric LINQ and Structural Madness
Esoteric LINQ and Structural MadnessEsoteric LINQ and Structural Madness
Esoteric LINQ and Structural Madness
 
What's New In Python 2.6
What's New In Python 2.6What's New In Python 2.6
What's New In Python 2.6
 
Online java training ppt
Online java training pptOnline java training ppt
Online java training ppt
 
Java fundamentals
Java fundamentalsJava fundamentals
Java fundamentals
 
Exciting JavaScript - Part I
Exciting JavaScript - Part IExciting JavaScript - Part I
Exciting JavaScript - Part I
 
01 objective-c session 1
01  objective-c session 101  objective-c session 1
01 objective-c session 1
 

Destacado

So you want to buy a supercomputer?
So you want to buy a supercomputer?So you want to buy a supercomputer?
So you want to buy a supercomputer?J_H_Davenport
 
Voting Lobbying And Agencies
Voting Lobbying And AgenciesVoting Lobbying And Agencies
Voting Lobbying And Agenciesmtoto
 
Sg Worst Case Debt Scenario
Sg Worst Case Debt ScenarioSg Worst Case Debt Scenario
Sg Worst Case Debt Scenarioinvestoralist
 
From Notebook To Facebook 22082009 1.06
From Notebook To Facebook 22082009 1.06From Notebook To Facebook 22082009 1.06
From Notebook To Facebook 22082009 1.06Pozzolini
 
Version 6 Spbt 2007.Prs
Version 6    Spbt 2007.PrsVersion 6    Spbt 2007.Prs
Version 6 Spbt 2007.Prsgsapnar
 
Brovoinet Presentation Eng
Brovoinet Presentation EngBrovoinet Presentation Eng
Brovoinet Presentation EngIvan Warman
 
innovaChron\'s Workshop Catalog
innovaChron\'s Workshop CataloginnovaChron\'s Workshop Catalog
innovaChron\'s Workshop Catalogremicote
 
The Red Queen Race
The Red Queen RaceThe Red Queen Race
The Red Queen RaceRoan Lavery
 
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
 
Slovak Fashion Night, New York 2009
Slovak Fashion Night, New York 2009Slovak Fashion Night, New York 2009
Slovak Fashion Night, New York 2009eva.klanduchova
 
Velvet Revolution Party, New York 2008
Velvet Revolution Party, New York 2008Velvet Revolution Party, New York 2008
Velvet Revolution Party, New York 2008eva.klanduchova
 
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
 
Innovation 1.07 03042010
Innovation 1.07 03042010Innovation 1.07 03042010
Innovation 1.07 03042010Pozzolini
 
мултимедија видео
мултимедија видеомултимедија видео
мултимедија видеоguesta0d07d
 
Диаграммы планов счетов
Диаграммы планов счетовДиаграммы планов счетов
Диаграммы планов счетовGrigoriy Pechenkin
 
Using WordPress as a website (not a blog)
Using WordPress as a website (not a blog)Using WordPress as a website (not a blog)
Using WordPress as a website (not a blog)Sara Rosso
 
Colongate E
Colongate EColongate E
Colongate Ellarboix
 
Кросс-платформенное моделирование
Кросс-платформенное моделированиеКросс-платформенное моделирование
Кросс-платформенное моделированиеGrigoriy Pechenkin
 

Destacado (20)

So you want to buy a supercomputer?
So you want to buy a supercomputer?So you want to buy a supercomputer?
So you want to buy a supercomputer?
 
Voting Lobbying And Agencies
Voting Lobbying And AgenciesVoting Lobbying And Agencies
Voting Lobbying And Agencies
 
Sg Worst Case Debt Scenario
Sg Worst Case Debt ScenarioSg Worst Case Debt Scenario
Sg Worst Case Debt Scenario
 
From Notebook To Facebook 22082009 1.06
From Notebook To Facebook 22082009 1.06From Notebook To Facebook 22082009 1.06
From Notebook To Facebook 22082009 1.06
 
Version 6 Spbt 2007.Prs
Version 6    Spbt 2007.PrsVersion 6    Spbt 2007.Prs
Version 6 Spbt 2007.Prs
 
Brovoinet Presentation Eng
Brovoinet Presentation EngBrovoinet Presentation Eng
Brovoinet Presentation Eng
 
innovaChron\'s Workshop Catalog
innovaChron\'s Workshop CataloginnovaChron\'s Workshop Catalog
innovaChron\'s Workshop Catalog
 
The Red Queen Race
The Red Queen RaceThe Red Queen Race
The Red Queen Race
 
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
 
Slovak Fashion Night, New York 2009
Slovak Fashion Night, New York 2009Slovak Fashion Night, New York 2009
Slovak Fashion Night, New York 2009
 
Velvet Revolution Party, New York 2008
Velvet Revolution Party, New York 2008Velvet Revolution Party, New York 2008
Velvet Revolution Party, New York 2008
 
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...
 
Kubo kubu
Kubo kubuKubo kubu
Kubo kubu
 
Innovation 1.07 03042010
Innovation 1.07 03042010Innovation 1.07 03042010
Innovation 1.07 03042010
 
мултимедија видео
мултимедија видеомултимедија видео
мултимедија видео
 
Base New Berlin
Base New BerlinBase New Berlin
Base New Berlin
 
Диаграммы планов счетов
Диаграммы планов счетовДиаграммы планов счетов
Диаграммы планов счетов
 
Using WordPress as a website (not a blog)
Using WordPress as a website (not a blog)Using WordPress as a website (not a blog)
Using WordPress as a website (not a blog)
 
Colongate E
Colongate EColongate E
Colongate E
 
Кросс-платформенное моделирование
Кросс-платформенное моделированиеКросс-платформенное моделирование
Кросс-платформенное моделирование
 

Similar a How To Make Your Component Compliant

Demonstration Of The Open Mi
Demonstration Of The Open MiDemonstration Of The Open Mi
Demonstration Of The Open MiJan Gregersen
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).pptAlok Kumar
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Juan Pablo
 
Ida python intro
Ida python introIda python intro
Ida python intro小静 安
 
The Python bites your apple
The Python bites your appleThe Python bites your apple
The Python bites your appleQidan He
 
How do you create a programming language for the JVM?
How do you create a programming language for the JVM?How do you create a programming language for the JVM?
How do you create a programming language for the JVM?Federico Tomassetti
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeDmitri Nesteruk
 
iOS overview
iOS overviewiOS overview
iOS overviewgupta25
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers TrainingJan Gregersen
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers TrainingJan Gregersen
 
Windows 8 für .net Entwickler
Windows 8 für .net EntwicklerWindows 8 für .net Entwickler
Windows 8 für .net EntwicklerPatric Boscolo
 
A Layered Architecture for the Model-driven Development of Distributed Simula...
A Layered Architecture for the Model-driven Development of Distributed Simula...A Layered Architecture for the Model-driven Development of Distributed Simula...
A Layered Architecture for the Model-driven Development of Distributed Simula...Daniele Gianni
 
Cvpr2010 open source vision software, intro and training part-iii introduct...
Cvpr2010 open source vision software, intro and training   part-iii introduct...Cvpr2010 open source vision software, intro and training   part-iii introduct...
Cvpr2010 open source vision software, intro and training part-iii introduct...zukun
 
45 aop-programming
45 aop-programming45 aop-programming
45 aop-programmingdaotuan85
 
devLink - What's New in C# 4?
devLink - What's New in C# 4?devLink - What's New in C# 4?
devLink - What's New in C# 4?Kevin Pilch
 

Similar a How To Make Your Component Compliant (20)

Demonstration Of The Open Mi
Demonstration Of The Open MiDemonstration Of The Open Mi
Demonstration Of The Open Mi
 
Oop c++class(final).ppt
Oop c++class(final).pptOop c++class(final).ppt
Oop c++class(final).ppt
 
Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#Lo Mejor Del Pdc2008 El Futrode C#
Lo Mejor Del Pdc2008 El Futrode C#
 
Ida python intro
Ida python introIda python intro
Ida python intro
 
The Python bites your apple
The Python bites your appleThe Python bites your apple
The Python bites your apple
 
How do you create a programming language for the JVM?
How do you create a programming language for the JVM?How do you create a programming language for the JVM?
How do you create a programming language for the JVM?
 
Clean code
Clean codeClean code
Clean code
 
Unmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/InvokeUnmanaged Parallelization via P/Invoke
Unmanaged Parallelization via P/Invoke
 
1204csharp
1204csharp1204csharp
1204csharp
 
iOS overview
iOS overviewiOS overview
iOS overview
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers Training
 
OpenMI Developers Training
OpenMI Developers TrainingOpenMI Developers Training
OpenMI Developers Training
 
Windows 8 für .net Entwickler
Windows 8 für .net EntwicklerWindows 8 für .net Entwickler
Windows 8 für .net Entwickler
 
A Layered Architecture for the Model-driven Development of Distributed Simula...
A Layered Architecture for the Model-driven Development of Distributed Simula...A Layered Architecture for the Model-driven Development of Distributed Simula...
A Layered Architecture for the Model-driven Development of Distributed Simula...
 
Android ndk
Android ndkAndroid ndk
Android ndk
 
Cvpr2010 open source vision software, intro and training part-iii introduct...
Cvpr2010 open source vision software, intro and training   part-iii introduct...Cvpr2010 open source vision software, intro and training   part-iii introduct...
Cvpr2010 open source vision software, intro and training part-iii introduct...
 
Wrapper class
Wrapper classWrapper class
Wrapper class
 
45 aop-programming
45 aop-programming45 aop-programming
45 aop-programming
 
201005 accelerometer and core Location
201005 accelerometer and core Location201005 accelerometer and core Location
201005 accelerometer and core Location
 
devLink - What's New in C# 4?
devLink - What's New in C# 4?devLink - What's New in C# 4?
devLink - What's New in C# 4?
 

Último

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
 
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
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
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
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
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
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
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
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 

Último (20)

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!
 
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
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
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.
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
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!
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
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...
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 

How To Make Your Component Compliant

  • 1. How to make your model OpenMI compliant Jan Gregersen LicTek / DHI
  • 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. 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
  • 4. 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
  • 5. 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
  • 6. 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
  • 7. 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
  • 8. 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
  • 9. How does OpenMI work : ExchangeItems My model Where What How How does OpenMI work Jan Gregersen
  • 10. 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
  • 11. 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
  • 12. How does OpenMI Work : The Standard Jan Gregersen
  • 13. How to migrate models How to migrate models Jan Gregersen
  • 14. How most models are organized User Interface Run Write My model Input file Read Engine Write Output file How to migrate models Jan Gregersen
  • 15. OpenMI is linking models User Interface Run Write My model Input file Read Engine Write Output file How to migrate models Jan Gregersen
  • 16. User Interface OpenMI.Standard Run Write <<ILinkableComponent>> My model Input file Read Engine Write Output file How to migrate models Jan Gregersen
  • 17. 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
  • 18. 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 • Provided by OATC • Flexible release proceedures • Frequent releases The OpenMI SDK • One of many • Source code C# (and Java) • Makes OpenMI easier • Default implementaion • OATC.SDK targeting models • Wrapper • Not required •Targeting developers • Components compliant to same version of the standard can be linked regardless of which SDK is used. How to migrate models Jan Gregersen
  • 19. 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
  • 20. // -- 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
  • 21. 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
  • 22. 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
  • 23. 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
  • 24. 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 How to migrate models Jan Gregersen
  • 25. Thank you for your attention Jan Gregersen