Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

The advantage to this is that for instance peak heights that occured through the years can be used in the correlation display as well as a threshold without storing the same information in different ways.

The <parameterIdFunction> specifies for which parameter the threshold is valid, the enabled function specifies whether the it should be included as threshold or not. This is mainly meant to filter out events needed for the correlation module that is not desired as threshold.

This functionality is specifically designed for multivalued attributes. An important requirement is that for all the functions: <valueFunction>, <labelFunction>, <parameterIdFunction> and <enabledFunction> the location should have the same amount of attribute values.

This can easily be accomplished by storing all attributes in the same multivalued attribute csv file like the example below.

Code Block
languagexmlxml
titleThreshold Value Set
<thresholdValueSet id="EventThresholds" name="EventThresholds">
   <eventThresholdValues>
      <eventThresholdId>LevelWarn</eventThresholdId>
      <valueFunction>@PEAK_HEIGHT_VALUE@</valueFunction>
      <labelFunction>@PEAK_HEIGHT_TIME@</labelFunction>
      <parameterIdFunction>@PEAK_HEIGHT_PAR@</parameterIdFunction>
      <enabledFunction>@PEAK_HEIGHT_ENABLED@</enabledFunction>
   </eventThresholdValues>
   <timeSeriesSet>
      <moduleInstanceId>ThresholdCheck</moduleInstanceId>
      <valueType>scalar</valueType>
      <parameterId>H.m</parameterId>
      <locationSetId>MultiValuedAttributeThresholds</locationSetId>
      <timeSeriesType>external historical</timeSeriesType>
      <timeStep unit="hour" divider="1" multiplier="1"/>
      <readWriteMode>add originals</readWriteMode>
   </timeSeriesSet>
</thresholdValueSet>

...

Code Block

...

code
language
xmlxml
titleLocationSets.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSPY v5 rel. 4 U (http://www.xmlspy.com) by Juzer Dhondia (WL | Delft Hydraulics) -->
<!--Sample XML file generated by XMLSPY v5 rel. 4 U (http://www.xmlspy.com)-->
<locationSets xmlns="http://www.wldelft.nl/fews"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/locationSets.xsd" version="1.1">
  <locationSet id="MultiValuedAttributePeakHeights">
   <csvFile>
      <file>MultiValuedAttributePeakHeightsLocations.csv</file>
      <geoDatum>WGS 1984</geoDatum>
      <id>%ID%</id>
      <name>%NAME%</name>
      <x>%X%</x>
      <y>%Y%</y>
      <z>0</z>
      <attributeFile>
         <csvFile>MultiValuedAttributePeakHeightsLocationAttributes.csv</csvFile>
         <id>%ID%</id>
         <dateTimePattern>dd-MM-yyyy</dateTimePattern>
         <attribute id="PEAK_HEIGHT_PAR">
            <text>%PAR%</text>
         </attribute>
         <attribute id="PEAK_HEIGHT_TIME">
            <dateTime>%TIME%</dateTime>
         </attribute>
         <attribute id="PEAK_HEIGHT_VALUE">
            <number>%VALUE%</number>
         </attribute>
         <attribute id="PEAK_HEIGHT_ENABLED">
            <boolean>%ACTIVE%</boolean>
         </attribute>
      </attributeFile>
   </csvFile>
 </locationSet>
</locationSets>

...