Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
{scrollbar}
Excerpt
hiddentrue

aggregates data by summing the values

Accumulative

Input
  • inputVariable. (Be careful with using non equidistant input data, this transformation is not designed for that and could give unexpected output values. In case of non-equidistant data the Statistics Serial Sum Transformation might be more suitable)
Options
  • validationRules. It is possible to define a set of validationRules. With these validation rules it is possible to define a set of criteria which determines the outputflag of the calculated value based on the number of missing values and/or doubtfuls values counted in the input values.

...

Below the configuration of the basic example which was described above.

Code Block

				<validationRule>
					<inputMissingPercentage>10</inputMissingPercentage>
					<outputValueFlag>reliable</outputValueFlag>
				</validationRule>
				<validationRule>
					<inputMissingPercentage>100</inputMissingPercentage>
					<outputValueFlag>missing</outputValueFlag>
				</validationRule>

...

Below shows a configuration example in which the rules above are implemented.

Code Block

<validationRule>
  <inputMissingPercentage>15</inputMissingPercentage>
  <outputValueFlag>reliable</outputValueFlag>
</validationRule>
<validationRule>
  <inputMissingPercentage>40</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
</validationRule>
<validationRule>
  <inputMissingPercentage>100</inputMissingPercentage>
  <outputValueFlag>missing</outputValueFlag>
</validationRule>

...

Below an example in which the output is reliable when there are no missing values in the input and when the percentage if missing values is less than 15%. However in the first case the output doesn't get a custom flagsource assigned while in the second case the output gets a custom flagsource assigned which is visible in the GUI to indicate that a output value was calculated but that missing values were found in the input.

Code Block

<validationRule>
  <inputMissingPercentage>0</inputMissingPercentage>
  <outputValueFlag>reliable</outputValueFlag>
</validationRule>
<validationRule>
  <inputMissingPercentage>15</inputMissingPercentage>
  <outputValueFlag>reliable</outputValueFlag>
  <outputCustomFlagSourceId>CA</outputCustomFlagSourceId>
</validationRule>
<validationRule>
  <inputMissingPercentage>40</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
</validationRule>
<validationRule>
  <inputMissingPercentage>100</inputMissingPercentage>
  <outputValueFlag>missing</outputValueFlag>
</validationRule>

...

Below a configuration example

Code Block

<validationRule>
  <inputDoubtfulPercentage>10</inputDoubtfulPercentage>
  <inputMissingPercentage>0</inputMissingPercentage>
  <outputValueFlag>reliable</outputValueFlag>
</validationRule>
<validationRule>
  <inputDoubtfulPercentage>30</inputDoubtfulPercentage>
  <inputMissingPercentage>0</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
  <outputCustomFlagSourceId>D1</outputCustomFlagSourceId>
</validationRule>
<validationRule>
  <inputDoubtfulPercentage>60</inputDoubtfulPercentage>
  <inputMissingPercentage>0</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
  <outputCustomFlagSourceId>D2</outputCustomFlagSourceId>
</validationRule>
<validationRule>
  <inputDoubtfulPercentage>100</inputDoubtfulPercentage>
  <inputMissingPercentage>0</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
  <outputCustomFlagSourceId>D3</outputCustomFlagSourceId>
</validationRule>
<validationRule>
  <inputMissingPercentage>15</inputMissingPercentage>
  <outputValueFlag>reliable</outputValueFlag>
  <outputCustomFlagSourceId>CA</outputCustomFlagSourceId>
</validationRule>
<validationRule>
  <inputMissingPercentage>40</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
</validationRule>
<validationRule>
  <inputMissingPercentage>100</inputMissingPercentage>
  <outputValueFlag>missing</outputValueFlag>
</validationRule>

...

In the examples above the inputMissingValuePercentage and the inputDoubtfulPercentage was configured hard-coded in the configuration file. However it is also possible to make a reference to an attribute of a location. To reference to an attribute the referenced attribute should be placed within @.

Code Block

<inputMissingPercentage>@MV@</inputMissingPercentage>

...

Time

Input value

input flag

Output value

output flag

custom flagsource

1-1-2012 00:15

 

 

 

 

 

1-1-2012 00:30

1

 

 

 

 

1-1-2012 00:45

1

 

 

 

 

1-1-2012 01:00

1

 

3

doubtful

-

1-1-2012 01:15

 

 

 

 

 

1-1-2012 01:30

1

 

 

 

 

1-1-2012 01:45

 

 

 

 

 

1-1-2012 02:00

1

 

NaN

-

-

1-1-2012 02:15

1

 

 

 

 

1-1-2012 02:30

1

doubtful

 

 

 

1-1-2012 02:45

1

 

 

 

 

1-1-2012 03:00

1

 

4

doubtful

D1

1-1-2012 03:15

1

 

 

 

 

1-1-2012 03:30

1

 

 

 

 

1-1-2012 03:45

1

 

 

 

 

1-1-2012 04:00

1

 

4

reliable

 

 

The first output value is set to doubtful. Because in this case the total percentage of missing values is 25%. Which means that the following rule is applied.

Code Block

<validationRule>
  <inputMissingPercentage>40</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
</validationRule>

 

The second output value is a missing value because in this case the percentage of missing values is equal to 50%. This means that in this case the following rule will be appplied.

Code Block

<validationRule>
  <inputMissingPercentage>100</inputMissingPercentage>
  <outputValueFlag>missing</outputValueFlag>
</validationRule>

 

The third output value is set to doubtful. The input doesn't contain missing values but has a single doubtful input value. The percentage of doubtful values in the input is therefore 25% which means that the following rule will be applied.

Code Block

<validationRule>
  <inputDoubtfulPercentage>30</inputDoubtfulPercentage>
  <inputMissingPercentage>0</inputMissingPercentage>
  <outputValueFlag>doubtful</outputValueFlag>
  <outputCustomFlagSourceId>D1</outputCustomFlagSourceId>
</validationRule>

...

Configuration example
Code Block

<transformation id="DebietBerekeningDag">
  <aggregation>
    <accumulative>
      <inputVariable>
        <timeSeriesSet>
          <moduleInstanceId>DebietBerekening</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>Q.berekend.15min</parameterId>
          <locationSetId>HHNK_TMX_debiet</locationSetId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="minute" multiplier="15"/>
          <relativeViewPeriod unit="day" start="-300" end="0"/>
          <readWriteMode>read only</readWriteMode>
          <synchLevel>1</synchLevel>
        </timeSeriesSet>
      </inputVariable>
      <validationRule>
        <inputDoubtfulPercentage>10</inputDoubtfulPercentage>
        <inputMissingPercentage>0</inputMissingPercentage>
        <outputValueFlag>reliable</outputValueFlag>
      </validationRule>
      <validationRule>
        <inputDoubtfulPercentage>30</inputDoubtfulPercentage>
        <inputMissingPercentage>0</inputMissingPercentage>
        <outputValueFlag>doubtful</outputValueFlag>
        <outputCustomFlagSourceId>D1</outputCustomFlagSourceId>
      </validationRule>
      <validationRule>
        <inputDoubtfulPercentage>60</inputDoubtfulPercentage>
        <inputMissingPercentage>0</inputMissingPercentage>
        <outputValueFlag>doubtful</outputValueFlag>
        <outputCustomFlagSourceId>D2</outputCustomFlagSourceId>
      </validationRule>
      <validationRule>
        <inputDoubtfulPercentage>100</inputDoubtfulPercentage>
        <inputMissingPercentage>0</inputMissingPercentage>
        <outputValueFlag>doubtful</outputValueFlag>
        <outputCustomFlagSourceId>D3</outputCustomFlagSourceId>
      </validationRule>
      <validationRule>
        <inputMissingPercentage>0</inputMissingPercentage>
        <outputValueFlag>reliable</outputValueFlag>
      </validationRule>
      <validationRule>
        <inputMissingPercentage>15</inputMissingPercentage>
        <outputValueFlag>reliable</outputValueFlag>
        <outputCustomFlagSourceId>CA</outputCustomFlagSourceId>
      </validationRule>
      <validationRule>
        <inputMissingPercentage>40</inputMissingPercentage>
        <outputValueFlag>doubtful</outputValueFlag>
      </validationRule>
      <validationRule>
        <inputMissingPercentage>100</inputMissingPercentage>
        <outputValueFlag>missing</outputValueFlag>
      </validationRule>
      <outputVariable>
        <timeSeriesSet>
          <moduleInstanceId>DebietBerekening</moduleInstanceId>
          <valueType>scalar</valueType>
          <parameterId>Q.berekend.15min</parameterId>
          <locationSetId>HHNK_TMX_debiet</locationSetId>
          <timeSeriesType>external historical</timeSeriesType>
          <timeStep unit="minute" multiplier="15"/>
          <relativeViewPeriod unit="day" start="-300" end="0"/>
          <readWriteMode>read only</readWriteMode>
          <synchLevel>1</synchLevel>
        </timeSeriesSet>
      </outputVariable>
    </accumulative>
  </aggregation>
</transformation>