tbpsg_loss_values function calculates scenarios of losses (gains) (see Scenario Functions) corresponding to a PSG Matrix and decision vector packed in PSG Point.

 

Syntax

[xout] = tbpsg_loss_values(matrix_name, point_name, toolboxstruc_arr, stroptions)

 

Description

[xout] = tbpsg_loss_values(matrix_name, point_name, toolboxstruc_arr, stroptions) returns vector with scenarios of losses, or gains corresponding to the PSG Matrix with name matrix_name and decision vector (PSG Point) with name point_name. All data should be stored in structure toolboxstruc_arr.

Type of results obtained with the tbpsg_loss_values (losses, or gains) is specified by the run option structure stroptions.

 

Input Arguments

matrix_name

name of PSG Matrix (see PSG Matrix in MATLAB);

point_name

name of PSG Point (see PSG Point in MATLAB);

toolboxstruc_arr

array of PSG data structures (see PSG Data Objects in MATLAB).

stroptions.Type

string specifying type of losses to be calculated: 'loss' =scenarios of losses (by default), 'gain' =  scenarios of gains.

 

Output Arguments

xout

vector of losses of type specified in the option Type.

 

 

Remarks

toolboxstruc_arr should contain PSG Matrix named matrix_name and PSG Point named point_name.

 

Example

Input data:

H1 = [1 4 8 3;7 -5 4 -6;-2 8 -1 0;0 -3 -4 9];

c1 = [-2;11;6;10];

p1 = [0.2;0.2;0.3;0.3];

a = [1;1;1;1];

To pack matrix and point to array of structures "toolboxstruc_arr":

toolboxstruc_arr(1) = tbpsg_matrix_pack('matrix_1', H1, [],  c1, p1);

toolboxstruc_arr(2) = tbpsg_point_pack('point_1', a, []);

Calculate scenarios of losses at point 'point_1':

val = tbpsg_loss_values('matrix_1','point_1',toolboxstruc_arr);

Output:

val =

  -18    11     1     8

 

See also

tbpsg_function_value, tbpsg_function_sensitivity, tbpsg_function_increment