4.4 Write a General Adapter
Writing a General Adapter is required before adding a new model. If the data is not “translated”, CHPS cannot use it.
Take a few minutes to familiarize yourself with the major elements in the General Adapter before moving on to the job sheet at the bottom of the page.
The General Adapter module consists of three major elements in the XML file: general settings element, burn-in profile element, and the activities element.
Burn-in is the model spin up and, according to some definitions, includes initial troubleshooting processes.
General Settings
The general settings element defines:
- the working directories associated with the General Adapter instance,
- an optional configuration description,
- time information,
- unit conversions,
- and PI version.
Burn-In Settings
Next, the burn-in profile element defines the burn-in period and initial value for cold state starts.
Activities Settings
The General Adapter module instance carries out a sequence of five activities, which are defined in this order:
- Startup Activities are a cleanup step, run prior to a module run or any export or import of data, to remove old files.
- Import Activities define all the items imported following a successful completion of the module run.
- Execute Activities outline which of the external executables of Java classes to run.
- Export Activities define all items exported through the processing instruction for XML, or PIXML, to the external module.
- Shutdown Activities run following completion of all other activities.
PIXML, the processing instructions for XML, use opening < and closing > tags.
Considerations
Many of the steps in writing a General Adapter remind you to make sure the naming conventions are consistent.
Unless the names match exactly, the adapter cannot do its job and the model run fails.
Take a look at the following job sheet to learn how to write a General Adapter.
Job Sheet: Writing a General Adapter
Reference: Writing a General Adapter (HEC Reference Documentation, Appendix 2)
Instructions: Click here to display regular course navigations once you have clicked on each link.