These instructions explain how to validate a CIM/XML file using CIMTool.
Get the Data
We will use the data from the 2007 CIM Interop Meeting, IOP10. For convenience, you can obtain the key files here: http://files.cimtool.org/IOP10Kit.zip
If you already have the IOP10 files then just download the CIMTool CPSM profile: http://files.cimtool.org/CPSM2007-CIMTool-Profile.owl
Get CIMTool
Download CIMTool from Download
Install according according to the instructions on the download page. There is all-in-one download for those who don't want to mess with java and eclipse. If you have those, or you are not on the Windows platform, download the plugin only.
Setup a Profile
1. Open the CIMTool perspective. If this is the first time you have run eclipse then you will be promted for a workspace location. (The default is reasonable.) You also need dismiss the unhelpful welcome screen. Now select the CIMTool perspective from the menu: Window|Open Perspective| CIMTool.
2. Create a new CIMTool project. Select File|New|CIMTool Project. In the wizard,
- Give the project some meaningful name, such as IOP10
- Supply the CIM XMI file (look for cim11v09combined.xmi) when prompted.
- Be Sure to set the CIM namespace correctly, enter http://iec.ch/TC57/2007/CIM-schema-cim12# where prompted.
3. Add a profile definition to your project by selecting File|Import|Profile. Supply the CPSM2007-CIMTool-Profile.owl you downloaded above.
4. You project is ready. Browse around.
Update: Since IOP10 the concept of a concrete class has been added to the CIMTool validation rules. This tests that a model declares its instances using their concrete class (such as ACLineSegment) and does not declare an instance using an abstract class (such as IdentifiedObject). To update the profile you have just created with concrete class information, open it in the Profile Editor, select the Summary tab, click Reorganise and Repair, check the Stereotype leaf classes as Concrete option, click Finish and, finally, click the Save button to save the profile.
You can browse around by double clicking the profile (under the Profiles folder in the Project Explorer). Then clicking on items in the Outline view. Select the "Element Detail" tab in the middle pane to see descriptions.
Notice that the Project Model view tracks your selections. This shows the the CIM definition that corresponds to the selected profile definition.
Validate a CIM/XML File
Now for the meat of this HOWTO.
1. Switch to the Validation perspective by selecting Window|Open Perspective|Validation.
2. Add a power system model (CIM/XML) file to the project by clicking
the Import Model button
on the Validation Projects view.
3. The wizard will prompt for the CIM/XML file, the project, and the profile to use. After you complete the wizard, the file will be imported and validated. You can monitor progress in the Progress View.
4. Browse results. Click on the .diagnostic file in the Validation Projects view. Now use the outline view to browse validation results. As you do, the Project Model View displays the CIM definition concerned.
Repeat these steps validate more models.
Validate an Incremental CIM/XML File
1. Add an incremental CIM/XML file by clicking the Import Incremental Model button
on the Validation Projects view.
2. The wizard will prompt for the Incremental CIM/XML file, the project, and the base model. The base model can be any previously imported, full model. After you complete the wizard, the incremental model will be imported and validated against the base model and its profile.
Notes
- You will see some diagnostics concerned
NonConformingLoadand related classes. This might reflect an error in the profile definition rather than the power system models. The issue is: should loads be declared with this class or one of its more specific sub-classes?
- Diagnostics are grouped by the class or property concerned. By default only a few diagnostics are shown in each group. The idea is that models tend to have systematic errors. If we show every occurrence of a given error, it is repetitive and tends to hide other types of error.
- It is sometimes good to see all occurrences of a diagnostic, especially for diagnosing electrical topology problems. To do this, select Window|Preferences|CIMTool and uncheck the Limit Validation Output preference. Next, click the plus (+) button and re-import the CIM/XML file.
Cleaning Up
Note that the import buttons
and
cause the contents of the CIM/XML file to be copied into your project.
(That is, within the eclipse workspace.)
The cleanup button
is for deleting power system models and associated
diagnostic results from the project.