OBF-file

From BlueM
Revision as of 11:28, 16 May 2026 by Froehlich (talk | contribs) (→‎Common parameters: remove deprecated objective functions (BlueM.Opt v2.6.0))
Jump to navigation Jump to search

EVO.png BlueM.Opt | Download | Usage | Development

BlueM.Opt input files: MOD · OPT · OBF · CON


Versions:

This file defines the objective functions for the optimization.

The file must have the same filename as the rest of the dataset's files but have the file extension .OBF, and be located in the same directory as the rest of the dataset. (In version prior to v1.8, this file had the file extension .ZIE.)


The file is divided into several blocks, each of which is optional. Each block is identified by its heading:

  • Series: This block defines objective functions that are based on a comparison of simulation time series with a reference time series.
  • ValueFromSeries: This block defines objective functions that are based on a comparison of values that are computed from simulated time series with reference values.
  • Aggregate: Aggregate objective functions

File format

*Objective functions
*===================
*
*Series
*------
*
*|-----|------------------|---------|---|-------|-------|------------|---------|------------------|------------------|-----------------------------|----------|
*| Opt | Name             | Group   | D | OpFac | File  | SimResult  | ObjFunc |           Evaluation period         |       Reference series      | CurValue |
*|     |                  |         |   |       |       |            |         |       Start      |     End          | RefName   | RefFile         |          |
*|-----|------------------|---------|---|-------|-------|------------|---------|------------------|------------------|-----------|-----------------|----------|
 |  P  | Kling-Gupta      |         | + |       |  WEL  | B401_1AB   | KGE     | 30.05.1984 00:00 | 18.06.1984 23:30 |           | seriesfile.zrx  |          |
 |  S  | NashSutcliffe    |         | + |       |  WEL  | B401_1AB   | NSE     | 30.05.1984 00:00 | 18.06.1984 23:30 |           | seriesfile.zrx  |          |
 |  S  | MeanSquaredError |         | - |       |  WEL  | B401_1AB   | MSE     | 30.05.1984 00:00 | 18.06.1984 23:30 |           | seriesfile.zrx  |          |
 |  S  | VolumeError 1    | Bias    | - | 0.5   |  WEL  | B401_1AB   | BIAS    | 30.05.1984 00:00 | 18.06.1984 23:30 |           | seriesfile1.zrx |          |
 |  S  | VolumeError 2    | Bias    | - | 0.5   |  WEL  | B402_1AB   | BIAS    | 30.05.1984 00:00 | 18.06.1984 23:30 |           | seriesfile2.zrx |          |
*|-----|------------------|---------|---|-------|-------|------------|---------|------------------|------------------|-----------|-----------------|----------|
*
*ValueFromSeries
*---------------
*
*|-----|------------------|---------|---|-------|-------|------------|---------|------------------|------------------|-----------------------------|----------|
*| Opt | Name             | Group   | D | OpFac | File  | SimResult  | ObjFunc |           Evaluation period         |       Reference value       | CurValue |
*|     |                  |         |   |       |       |            |         |       Start      |     End          | ValueType | RefValue        |          |
*|-----|------------------|---------|---|-------|-------|------------|---------|------------------|------------------|-----------|-----------------|----------|
 |  S  | LastValue        |         | - |       |  WEL  | B401_1AB   | AE      |                  |                  | End       | 0               |          |
 |  P  | PeakError        |         | - |       |  WEL  | S3  _1ZU   | SE      |                  |                  | Max       | 29.33           |          |
*|-----|------------------|---------|---|-------|-------|------------|---------|------------------|------------------|-----------|-----------------|----------|
*
*Aggregate
*---------
*
*|-----|-----------------|---------|---|----------|
*| Opt | Name            | Group   | D | CurValue |
*|-----|-----------------|---------|---|----------|
 |  P  | MeanVolumeError | Bias    | - |          |
*|-----|-----------------|---------|---|----------|

The width of the columns can be adjusted if necessary, but the column separators (|) must be preserved!

An asterisk (*) at the beginning of the line causes the line to be ignored.

Description

Common parameters

The blocks "Series" and "ValuesFromSeries" share a set of common columns.

Parameter Description
Opt Specifies, whether the objective function is a primary objective function (P) or a secondary objective function (S).
Primary objective functions are used to calculate the fitness of invidual solutions.
Secondary objective functions are evaluated, but are not used to determine the fitness of individuals. Secondary objective functions are useful for specifiying objective functions that are part of an aggregated objective function or for specifying values of interest that should be evaluated, but not optimized towards.
Name Arbitrary name of the objective function
Group
(optional)
Optional group name, only used for calculating aggregated objective functions. Objective functions with the same group name are aggregated to form one aggregated objective function.
Direction
(optional)

Direction of desired optimization:

  • -: The objective function should be minimized (default)
  • +: The objective function should be maximized (this causes the objective function values to be multiplied by -1 internally).
Operator or Factor
(optional)

Optional, only used for aggregated objective functions

  • +: The objective function value is added to the group
  • -: The objective function value is subtracted from the group
  • number: The objective function value is multiplied by the given number and then added to the group
File The file extension of the simulation result file containing the simulation result from which the objective function should be calculated. Supported values:
SimResult The identifier of the simulation result from which the objective function should be calculated.
ObjFunc Specifies which objective function to use (see below for formulas used).

Supported values for comparing values:

  • SE: Squared error
  • AE: Absolute error

Supported values for comparing series:

  • MAE: Mean abolute error
  • SAE: Sum of absolute errors
  • MSE: Mean squared error
  • SSE: Sum of squared errors
  • NSE: Nash-Sutcliffe efficiency
  • lnNSE: Logarithmic Nash-Sutcliffe efficiency
  • KGE: Kling-Gupta efficiency
  • NGT: Relative number of timesteps in which the simulation result is larger than (exceeds) the value of the reference time series [%]
  • SGT: Sum of the simulation values that are larger than the values of the reference time series
  • NLT: Relative number of timesteps in which the simulation result is smaller than the value of the reference time series [%]
  • SLT: Sum of the simulation values that are smaller than the values of the reference time series
  • DET: Coefficient of determination
  • BIAS: Absolute volume error [%]
  • APFB: Annual Peak Flow Bias
Evaluation period
(optional)
Specifies the simulation time period for which the objective function should be evaluated.

Format: dd.mm.yyyy hh:mm
If Start and/or End are left empty, the start and/or end of the entire simulation time period is used.

CurValue
(optional)
An optional value that is displayed in diagrams to serve as an indication of improvement.

"Series"

Parameter Description
RefName
(optional)
Specifies the name of the reference time series. Only necessary if the time series file specified under RefFile contains multiple series (e.g. WEL file).
RefFile The filename of the file containing the reference time series
Warning: The time step size of the reference series must be identical to that of the simulation result! (see #151)

"ValueFromSeries"

Parameter Description
ValueType Specifies how to calculate the value from the simulation result series. Supported values:
  • Max: Maximum value of the simulation result
  • Min: Minimum value of the simulation result
  • Avg: Average value of the simulation result
  • Start: First value of the simulation result
  • End: Last value of the simulation result
  • Sum: Sum of the simulation result
RefValue The reference value with which the computed simulation result should be compared.

Reference

Formulas used for objective functions

NSE

Nash-Sutcliffe efficiency[1]

-∞ ≤ NSE ≤ 1. Larger is better.
[math]\displaystyle{ NSE=1-\frac{\sum_{t=1}^T\left(Q_{obs}^t-Q_{sim}^t\right)^2}{\sum_{t=1}^T\left(Q_{obs}^t-\overline{Q_{obs}}\right)^2} }[/math]

lnNSE

Logarithmic Nash-Sutcliffe efficiency[1]

-∞ ≤ lnNSE ≤ 1. Larger is better.
[math]\displaystyle{ lnNSE=1-\frac{\sum_{t=1}^T\left(ln(Q_{obs}^t+\epsilon)-ln(Q_{sim}^t+\epsilon)\right)^2}{\sum_{t=1}^T\left(ln(Q_{obs}^t+\epsilon)-\overline{ln(Q_{obs}+\epsilon)}\right)^2} }[/math]
ε is set to 1% of the average value of Qobs as recommended by Pushpalatha et al. (2012)[2].

KGE

Kling-Gupta efficiency[3]

-∞ ≤ KGE ≤ 1. Larger is better.
[math]\displaystyle{ \text{KGE} = 1 - \sqrt{ (r - 1)^2 + (\beta - 1)^2 + (\gamma - 1)^2 } }[/math]
with
r: correlation coefficient
β: bias ratio
γ: variability ratio

DET

Coefficient of determination (simple linear regression)

0 ≤ R² ≤ 1:
[math]\displaystyle{ R^2 = \frac{s^2_{xy}}{s^2_x \cdot s^2_y} }[/math]

APFB

Annual Peak Flow Bias[4]

0 ≤ APFB ≤ ∞. Smaller is better.
[math]\displaystyle{ \text{APFB} = \sqrt{ (\mu_{peakQ_s} / \mu_{peakQ_o} - 1)^2 } }[/math]
with
μpeakQs: mean of the simulated annual peak flow series
μpeakQo: mean of the observed annual peak flow series
NOTE: The division into years begins at the start of the defined evaluation period (or simulation period if not defined)

Literature

  1. 1.0 1.1 Nash, J. E. and Sutcliffe, J. V. (1970): River flow forecasting through conceptual models part I — A discussion of principles, Journal of Hydrology, 10 (3), 282–290, DOI:10.1016/0022-1694(70)90255-6.
  2. Pushpalatha, Raji, Perrin, Charles, Le Moine, Nicolas, Andréassian, Vazken (2012): A review of efficiency criteria suitable for evaluating low-flow simulations, Journal of Hydrology, Volumes 420–421, 2012, Pages 171-182, ISSN 0022-1694, https://doi.org/10.1016/j.jhydrol.2011.11.055.
  3. Kling, H., Fuchs, M., Paulin, M. (2012): Runoff conditions in the upper Danube basin under an ensemble of climate change scenarios, Journal of Hydrology, Volumes 424–425, Pages 264-277, ISSN 0022-1694, https://doi.org/10.1016/j.jhydrol.2012.01.011.
  4. Mizukami, N., Rakovec, O., Newman, A. J., Clark, M. P., Wood, A. W., Gupta, H. V., and Kumar, R. (2019): On the choice of calibration metrics for “high-flow” estimation using hydrologic models, Hydrol. Earth Syst. Sci., 23, 2601–2614, https://doi.org/10.5194/hess-23-2601-2019.