You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

Description

This transformation can be used to determine the threshold level for a certain location by using location attributes.

The location attributes define for each output location which time series should be used to determine the threshold level. Also the range for each threshold can be defined here.

An example is shown below.

 

 

 

<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2007 sp2 (http://www.altova.com) by WL | Delft Hydraulics (WL | Delft Hydraulics) -->
<transformationModule version="1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.wldelft.nl/fews" xsi:schemaLocation="http://www.wldelft.nl/fews http://fews.wldelft.nl/schemas/version1.0/transformationModule.xsd">
   <variable>
      <variableId>input1</variableId>
      <timeSeriesSet>
         <moduleInstanceId>InputVariableFunctionTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>Q.obs</parameterId>
         <locationId>H-2001</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="day"/>
         <relativeViewPeriod unit="day" start="0" end="10"/>
         <readWriteMode>editing visible to all future task runs</readWriteMode>
      </timeSeriesSet>
   </variable>
   <variable>
      <variableId>input2</variableId>
      <timeSeriesSet>
         <moduleInstanceId>InputVariableFunctionTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>Q.obs</parameterId>
         <locationId>H-2002</locationId>
         <timeSeriesType>external historical</timeSeriesType>
         <timeStep unit="day"/>
         <relativeViewPeriod unit="day" start="0" end="10"/>
         <readWriteMode>editing visible to all future task runs</readWriteMode>
      </timeSeriesSet>
   </variable>
   <variable>
      <variableId>output</variableId>
      <timeSeriesSet>
         <moduleInstanceId>InputVariableFunctionTest</moduleInstanceId>
         <valueType>scalar</valueType>
         <parameterId>Q.obs</parameterId>
         <locationId>H4301</locationId>
         <timeSeriesType>simulated forecasting</timeSeriesType>
         <timeStep unit="day"/>
         <relativeViewPeriod unit="day" start="0" end="10"/>
         <readWriteMode>editing visible to all future task runs</readWriteMode>
      </timeSeriesSet>
   </variable>
   <transformation id="test">
      <multipleLocationAttributes>
         <multipleVariateThresholds>
            <ruleId>ruleId</ruleId>
            <variableAttributeId>variable</variableAttributeId>
            <inputLocationAttributeId>inputLocationId</inputLocationAttributeId>
            <lowerBoundAttributeId>lowerBound</lowerBoundAttributeId>
            <upperBoundAttributeId>upperBound</upperBoundAttributeId>
            <ruleOutcomeAttributeId>ruleOutcome</ruleOutcomeAttributeId>
            <outputVariable>
               <variableId>output</variableId>
            </outputVariable>
         </multipleVariateThresholds>
      </multipleLocationAttributes>
   </transformation>
</transformationModule>
<locationSet id="voorbeeld">
   <csvFile>
      <file>multi_variate_thresholds.csv</file>
      <id>%id%</id>
      <x>%x%</x>
      <y>%y%</y>
      <attributeFile>
         <csvFile>multi_variate_thresholds_attribute.csv</csvFile>
         <id>%id%</id>
         <attribute id="inputLocationId">
            <text>%inputLocationId%</text>
         </attribute>
         <attribute id="variable">
            <text>%variable%</text>
         </attribute>
         <attribute id="ruleId">
            <text>%ruleId%</text>
         </attribute>
         <attribute id="lowerBound">
            <number>%lowerBound%</number>
         </attribute>
         <attribute id="upperBound">
            <number>%upperBound%</number>
         </attribute>
         <attribute id="ruleOutcome">
            <number>%ruleOutcome%</number>
         </attribute>
      </attributeFile>
   </csvFile>
</locationSet>

 

 

id,variable,inputLocationId,ruleId,lowerBound,upperBound,ruleOutcome
H4301,input1,H-2001,ruleA,1,10,1
H4301,input2,H-2002,ruleA,2,4,1
H4301,input1,H-2001,ruleB,10,20,2
H4301,input2,H-2002,ruleB,4,10,2
H4301,input1,H-2001,ruleC,20,30,3

 

 

In the example above the thresholds are defined for output location H4301. The variable defines the id of a variable in the transformation module.

A single variable can define a set of time series with 1 parameter but 1 or more locations. To select a unique time series in this set the input location id is used.

The ruleId defines for which rule the range applies. The lowerBound and upperBound define the range in which the time series defined by the variable and inputLocationId should be so that the

rule applies. If all the conditions which are defined for a certain rule are met then the rule applies and the value which is defined in the ruleOutcome will be written to the output time series.

Note that is technically possible to define multiple ruleOutcomes. The transformation will however always use the first value which is defined in the csv-file.

 

 

 

 

 

 

  • No labels