Wiki Markup |
---|
{scrollbar} |
You can create OpenMI-compliant components using only the official OpenMI standard, which can be downloaded from http://www.openmi.org.
However, it is recommended that you take advantage of the OpenMI software development kit (SDK) provided by OATC. You can download the SDK from http://sourceforge.net/projects/openmi/. This SDK is programmed in C#, so if you are using the Java standard see instruction given here (How to get started with OpenMI 1.x and Java). The SDK also includes the OpenMI standard, which means that you do not need to download the OpenMI standard from http://www.openmi.org if you are using the SDK.
When you download the SDK you simply get a zip-file with the full source code. Only the OpenMI Standard assembly is compiled for you (OpenMI.Standard.dll). Once you start using the SDK it becomes your source code. It is therefor recommended that you change the namespaces to your namespace. One easy way to do this is to use TextPad (can be downloaded for free from http://www.textpad.com/). TextPad has a facility to search and replace in multiple files, so simply find all files of type *.cs and *.proj and drag them into TextPad and subsequently replace all occurrences of "Oatc" with your name.
The SDK is tested with NUnit unit test. When you open the Oatc.OpenMI.Sdk.sln solution file your will see a large number of unit test projects. So, in order to compile the solution file you need to install the NUnit test software on your PC. This can be downloaded from http://nunit.org. Additionally you can use the http://www.testdriven.net software, which will allow you to run unit tests from within your development environment, however, this will not work if you are using the express version of the visual studio.
Once you have compiled SDK and executed all the unit tests you are ready to start creating OpenMI compliant components or to migrate existing model codes to become OpenMI compliant.
There are different option for how to reference, instantiate or use the SDK classes.
- You can add your new projects to the Oatc.OpenMI.Sdk solution and simply reference the SDK projects from you projects.
- You can install the SDK assemblies into the General Assembly cache (GAC) and reference these from whatever project.
- You can reference the SDK assemblies directly as a file reference.
The choice of how to use the SDK is entirely up to you.
You may also find it useful to download the OpenMI configuration editor from http://sourceforge.net/projects/openmi/. Loading your OpenMI-compliant component into the configuration editor is an easy way to make the first test.