Loss functions and are defined on the Matrices of Scenarios with and scenarios. Suppose that we need to calculate Loss function that is defined on Matrix of Scenarios:

,

where , ,

,

,

, , .

Loss function equals to the difference of two Loss functions: .

Similarly, is defined the sum of two Loss functions: .

Difference (sum) of two Loss functions is used to avoid generating one large matrix of scenarios (containing all possible differences (sums) of scenarios).

 

Example

 Syntax

calculate

 point: point_1

value:

 avg(L(matrix_I)-L(matrix_II))

 avg(L(matrix_III))

 

 Description

avg is Average Loss function,

 

matrix_I:

 

x1

x2

x3

x4

scenario_benchmark

scenario_probability

1

7

4

-5

8

4

3

-6

-2

11

0.4

0.6

 

The matrix_I is in file matrix_I.txt in Matrix of Scenarios format (see, PSG Matrix in General (Text) Format).

 

matrix_II:

 

x1

x2

3

-2

2

-6

 

The matrix_II is in file matrix_II.txt in Matrix of Scenarios format (see, PSG Matrix in General (Text) Format).

 

matrix_III:

 

x1

x2

-2

4

3

9

2

-7

10

1

 

The matrix_III is in file matrix_III.txt in Matrix of Scenarios format (see, PSG Matrix in General (Text) Format).

 

 

avg function is calculated at point_1:

 

component_name

value

x1

x2

1

1

 

Value of avg(L(matrix_I)-L(matrix_II)) at point_1 equals -5.

Value of avg(L(matrix_III)) at point_1 equals -5.

 

Files problem_diff_of_two_Losses.txt, matrix_I.txt, matrix_II.txt, matrix_III.txt, and point_1.txt are in folder .\Aorda\PSG\Examples\Functions\diff_of_two_losses_test.