Control parameters in straff.CPAR#

Prodrisk generally allows constraints to be violated at a specified cost. This cost enters the objective function, and is referred to as a penalty value. Many of the penalty values used can be specified in detail for a given hydro module and for a given time period. The user can also choose between several types of units. Information about penaties, constraints and constraint violations can be found in Prodrisk penalty information.

Penalty Values#

The following penalty values can be specified in detail:

Type

Description

CFlomFram

Cost of spilling in forward simulation

CFlomBak

Cost of spilling in backward recursion

CForbFram

Cost of bypassing in forward simulation

CForbBak

Cost of bypassing in backward recursion

CMamax

Cost of violating soft maximum reservoir constraint

CMamin

Cost of violating minimum reservoir constraint

CStyrbuf

Cost of deviating from the guideline curve for buffer reservoirs

CQmin

Cost of violating minimum discharge constraint

CQfomin

Cost of violating minimum bypass constraint

RampingUpCost

Cost of violating reservoir up ramping constraint

RampingDownCost

Cost of violating reservoir down ramping constraint

Definition and Units#

The global penalty values (CTANK, CSTR_MAGBR, CFORB_STYR and CFLOM_STYR) are defined in prodrisk.CPAR, see Control data in prodrisk.CPAR. These will be used by Prodrisk unless the user defines a file named straff.CPAR with refined penalty values.

The file straff.CPAR allows the user to specify time-dependent and local penalty values. The following three units can be specified:

  • STRAFF/ENERGI (or E)

The unit for penalty value and energy is the same as for the market price, e.g. øre/kWh or €/MWh. This is the same unit used for CTANK in prodrisk.CPAR

  • STRAFF/VOLUM (or V)

Values specified per volume will enter the objective directly, since the hydro decision variables relate to volume.

  • DELTAPRIS (or D)

This unit allows specifying a markup which to be added to the highest market price detected in the input data for the week in question. The resulting penalty value enters the computation similar to the STRAFF/ENERGI unit. The unit is assumed to correspond with the unit used in the price series file.

Converting Penalty Values#

All penalty values specified per energy unit are converted by Prodrisk to a penalty value per volume unit, e.g. øre/m3 if the market price is in øre/kWh. The specified penalty value is multiplied by the energy equivalent at best efficiency, adjusted according to the current head.

Hydro modules with a dummy power station has zero energy equivalent and challenges the validity of the above conversion. To face this challenge, a lower limit on energy equivalent on 0.1 is enforced.

The following conversion factors are used for the reservoir and the different waterways:

  • Discharge: max (local energy equivalent, 0.1)

  • Bypass: max(loss in energy equivalent when bypassing, 0.1)

  • Spillage: max(loss in energy equivalent when spilling, 0.1)

  • Reservoir: The sum of conversion factors for discharge to sea level

We recommend specifying penalty values per volume unit. Penalty values per energy unit are best suited as a common reference for the system, in cases where one seeks a stable ratio between penalty values and market prices for all hydro modules. However, the impact of using penalty values specified per energy unit can be hard to predict, due to the existence of dummy stations with zero energy equivalent and varying head along a serial watercourse. A global reference for penalty values is complicated because:

  • Discharge constraints are rewarded the value of production given by the requirement, in addition to the penalty values.

  • Multiple requirements downstream a serial watercourse will strengthen the local discharge requirement. This is different from reservoir requirements that have a more local impact.

File structure in straff.CPAR#

The file can comprise of two parts. Global default values for each of the penalty types for all weeks and hydro modules are specified in the first part. In the second part, local values for the different penalty types in specific weeks and for specific modules can be specified. The text strings are case insensitive, but should be embraced by single quotation marks. The numerical value and the text string should be separated by a comma, and the decimal point is specified by a dot.

Part 1: The first line should contain the number N of default values being specified in the file. The N subsequent lines should specify a global penalty value on the following format:

'<penalty value type>',<value>,'<unit>'
Example:
'CMamax', 6.0,'straff/energi'

Part 2: The first line in part 2 should contain a valid module number. If such a number is present, the individual values for that module are read as a block. On the following line the number of blocks should be specified. Then the blocks are read in sequence, according to the following format:

'<penalty value type>','<unit>'
<number of periods>
<first week period 1>,<last week period 1>,<value period 1>
<first week period 2>,<last week period 2>,<value period 2>

Example:

'CMamax', 'e'
5
1,11,4.3
12,41,3.3
42,46,3.5
47,51,6.3
52,52,5.3

Once the specified number of blocks specified for the current module has been read, Prodrisk checks for more modules for which penalty values are defined. If no valid module number is found, the reading routine exits. Example, complete straff.CPAR:

1,                              #1 default value
'CMamax',6.0,'straff/energi',   #Cost of violating upper reservoir constraint is 6.0
694,                            #Individual values for module 694
2,                              #2 penalty value types are specified
'CMamin','deltapris',           #First type: CMamin, unit: deltapris
1,                              #One period
1,52,20,                        #In weeks 1-52 the delta penalty value is 20
'CStyrbuf','v',                 #Second type: CStyrbuf, straff/volum
1,                              #One period
1,52,1.34,                      #In weeks 1 to 52 the value is 1.34
695,                            #Individual values for module 695
1,                              #1 penalty value types are specified
'CMamax','e',                   #First type: CMamax, straff/energi
5,                              #Five periods
1,11,4.3,                       #In weeks 1-11 the value is 4.3
12,40,3.3,                      #In weeks 12-40 the value is 3.3
41,46,3.5,                      #In weeks 41-46 the value is 3.5
47,51,6.3,                      #In weeks 47-51 the value is 6.3
52,52,5.3,                      #In week 52-52 the value is 5.3

Penalty values not defined in straff.CPAR#

The values that are not defined in straff.CPAR will be based on control data from the file prodrisk.CPAR. Note that the term “local energy equivalent” may vary between the different water routes, depending on the topology.

CFlomFram is defined as the parameter CFLOM_STYR multiplied by the local energy equivalent.

CFlomBak is by default set to zero.

CForbFram is defined as the parameter CFORB_STYR multiplied by the local energy equivalent.

CForbBak is by default set to zero.

CMamax is defined as the parameter CSTR_MAGBR.

CMamin is defined as the parameter CTANK multiplied by the energy equivalent to sea level.

CStyrbuf is defined as the parameter CSTR_MAGBR.

CQmin is defined as the parameter CTANK multiplied by the local energy equivalent.

CQfomin is defined as the parameter CTANK multiplied by the local energy equivalent.

Penalty values in the API#

To set values from part 1 of straff.cpar, use the setting attributes according to the unit of the penalty according to the following table.

To set values from part 2 of straff.cpar, use the module attributes according to the unit of the penalty according to the following table.