Versions Compared

Key

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

...

Anchor
thresholdeventcrossing
thresholdeventcrossing
Run ThresholdEventCrossing module in workflow

Run Threshold Event Crossing module in workflow

...

The ThresholdEventCrossing module is replaced in 2013 by a predefined activity. This predefined activity has the same functionality as the old ThresholdEvent module. You can add the following predefined activity to your workflowDefine module in the ModuleDescriptors.xml file (obsolete since 2013.02):

Code Block
languagexml
titleModuleDescriptorsworkflow.xml (obsolete since 2013.02)
<moduleDescriptor id="ThresholdChecks">
    <description>Module to check on threshold event crossings</description>
	<className>nl.wldelft.fews.system.plugin.threshold.ThresholdEventCrossingModule</className>
</moduleDescriptor>
<activity>
	<runIndependent>false</runIndependent>
	<predefinedActivity>threshold event crossing</predefinedActivity>
 </activity>	

 Do make sure to set the relativeViewPeriod correctly in ThresholdValueSets.xmlCreate entry in ModuleInstanceDescriptors.xml file:

Code Block
languagexml
titleModuleInstanceDescriptorsthresholdvaluesets.xml
<moduleInstanceDescriptor id="ThresholdChecks"><timeSeriesSet>
	<moduleId>ThresholdChecks<<moduleInstanceId>ImportCSV</moduleId>moduleInstanceId>
</moduleInstanceDescriptor>

Add the module to the workflow. Please note:

  • The module will take all external time series into account (external historical and external forecast series created inside and outside the workflow) and only simulated (simulated historical, simulated forecasting) time series which are created within the same workflow.
  • When the module should also only check external time series changed within the current workflow, the attribute "onlyCheckThresholdsOfChangedSeries" in the workflow descriptor file need to be set to true.
  • The module needs to be added at the end of the workflow where the timeseries have been created (e.g. imported or by transformation).
  • The relativeViewPeriod configured for the timeseriesSets in the ThresholdValueSets.xml determines the viewPeriod for which thresholdcrossings are determined. If the timeseries that has been imported or otherwise created is longer than the configured relative view period, the values outside this relativeViewPeriod will not be validated.
  • As a result, the threshold crossing logs are written to the database, and can for example be used in eventActions and shown in the system wide threshold events display.
  • When time series from within a threshold value set should not be taken into account, do not use a <relativeViewPeriod> for them and not a <readWriteMode> that says "read complete forecast".

Run Threshold Event Crossing activity in workflow (2013.02 and later):

The ThresholdEventCrossing module is replaced by a predefined activity. This predefined activity has the same functionality as the old ThresholdEvent module. You can add the following predefined activity to your workflow:

Code Block
languagexml
titleworkflow.xml
<activity>
	<runIndependent>false</runIndependent>
	<predefinedActivity>threshold event crossing</predefinedActivity>
 </activity>	

 Do make sure to set the relativeViewPeriod correctly in ThresholdValueSets.xml:

Code Block
languagexml
titlethresholdvaluesets.xml
<timeSeriesSet>
	<moduleInstanceId>ImportCSV</moduleInstanceId>
	<valueType>scalar</valueType>
	<parameterId>H.obs</parameterId>
	<locationId>Bhadra_Reservoir</locationId>
	<timeSeriesType>external historical</timeSeriesType>
	<timeStep id="daily0600"/>
	<relativeViewPeriod unit="day" start="-365" end="0"/>
	<readWriteMode>add originals</readWriteMode>
</timeSeriesSet>

For the threshold event values to be visible in the ThresholdEvents display the view period needs to be set:

Code Block
languagexml
titlethresholdvaluesets.xml
<eventTimeViewPeriod start="-365" end="48" unit="day"/>

...

	<valueType>scalar</valueType>
	<parameterId>H.obs</parameterId>
	<locationId>Bhadra_Reservoir</locationId>
	<timeSeriesType>external historical</timeSeriesType>
	<timeStep id="daily0600"/>
	<relativeViewPeriod unit="day" start="-5" end="0"/>
	<readWriteMode>read only</readWriteMode>
</timeSeriesSet>

For the threshold event values to be visible in the ThresholdEvents display the view period needs to be set:

Code Block
languagexml
titlethresholdvaluesets.xml
<eventTimeViewPeriod start="-365" end="48" unit="day"/>

If this is not done it will default to -10 day to +10 days. This does not have to be a problem because it is always possible to overrule the view period in the display itself by mean of filtering: double-click 'Event Time' column and a pop-up will appear where the user can set the period for viewing threshold events.

When the predefined activity is added to the workflow. Please note:

  • The module will take all external time series into account (external historical and external forecast series created inside and outside the workflow) and only simulated (simulated historical, simulated forecasting) time series which are created within the same workflow.
  • When the module should only check external time series changed within the current workflow, the attribute "onlyCheckThresholdsOfChangedSeries" in the workflow descriptor file need to be set to true. This need to be added to all workflowdescriptors that have the threshold crossing module included.
  • The module needs to be added at the end of the workflow where the timeseries have been created (e.g. imported or by transformation).
  • The relativeViewPeriod configured for the timeseriesSets in the ThresholdValueSets.xml determines the viewPeriod for which thresholdcrossings are determined. If the timeseries that has been imported or otherwise created is longer than the configured relative view period, the values outside this relativeViewPeriod will not be validated.
  • As a result, the threshold crossing logs are written to the database, and can for example be used in eventActions and shown in the system wide threshold events display.
  • When time series from within a threshold value set should not be taken into account, do not use a <relativeViewPeriod> for them and not a <readWriteMode> that says "read complete forecast".


Seasonal Thresholds

Since 2018.02 thresholds can be made seasonal if a threshold is only valid for part of a year. When not configured the threshold is valid for the entire year.

...