Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Wiki Markup
{scrollbar}

Table of contents

Table of Contents
Include Page
1 Introduction
1 Introduction
Include Page
2 Planning the migration
2 Planning the migration
Include Page
3 Wrapping
3 Wrapping

4. Migration - step by step

The best strategy when migrating a model is to split the process into a number of steps; at the end of each step you can compile your code and run a small test.

The steps needed for migration are described in this chapter.

Include Page
4.1 Step 1 - Changing your engine core
4.1 Step 1 - Changing your engine core
Include Page
4.2 Step 2 - Creating the .Net assemblies
4.2 Step 2 - Creating the .Net assemblies
Include Page
4.3 Step 3 - Accessing the functions in the engine core
4.3 Step 3 - Accessing the functions in the engine core
Include Page
4.4 Step 4 - Implementing the MyEngineDotNetAccess
4.4 Step 4 - Implementing the MyEngineDotNetAccess
Include Page
4.5 Step 5 - Implementing the MyEngineWrapper class
4.5 Step 5 - Implementing the MyEngineWrapper class
Include Page
4.6 Step 6 - Implementing the MyModelLinkablComponent
4.6 Step 6 - Implementing the MyModelLinkablComponent
Include Page
4.7 Step 7 - Implementation of the remaining IEngine methods
4.7 Step 7 - Implementation of the remaining IEngine methods

5. Migration of the Simple River

The previous chapter described the steps involved in migrating a model to the OpenMI.

This chapter shows how the migrated code is developed for the Simple River example.

5.1 The Simple River Wrapper

The Simple River model uses the migration pattern shown in Figure 12. Figure 13 gives a detailed explanation of how the Simple River wrapper works in terms of the wrapper classes.

Fig. 13 Simple River wrapper classes

Include Page
5.2 Implementation of the Initialize method
5.2 Implementation of the Initialize method
Include Page
5.3 Implementing the SetValues method
5.3 Implementing the SetValues method
Include Page
5.4 Implementing the GetValues method
5.4 Implementing the GetValues method
Include Page
5.5 Implementation of the remaining methods
5.5 Implementation of the remaining methods

6. Testing the component

It is important to test the component to check that it is working correctly. Traditionally, the procedure has been to complete implementation and then run the engine to see if it produces the correct results. However, in recent years new methodologies have been developed for testing. The dominant testing method for object oriented programs is unit testing. Unit testing is done in parallel with the implementation. This means that you will be able to find errors earlier and thus save time on debugging your code later.

This chapter discusses the testing of migrated components.

Include Page
6.1 Unit testing
6.1 Unit testing
Include Page
7. Implementing IManageState
7. Implementing IManageState
Include Page
8. The OMI file
8. The OMI file
Include Page
9. The OpenMICompliancyInfo file
9. The OpenMICompliancyInfo file