Example: Function call: bpoe(-1.3,matrix_3r).

 

Parameter = -1.3 and   matrix_3r:

 

x1

x2

x3

x4

scenario_benchmark

scenario_probability

1

7

-2

0

4

-5

8

-3

8

4

-1

-4

3

-6

0

9

-2

11

6

10

0.2

0.2

0.3

0.3

 

at point_1:

 

component_name

value

x1

x2

x3

x4

3.5

3.0309

0

3.3711

 

MATLAB code (.\Aorda\PSG\MATLAB\Examples\Func_value_bpoe.m) for function calculation:

 

%Calculation of functions with PSG Subroutine 'functionvalue'

%Define 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 = [3.5; 3.0309; 0; 3.3711];

%Calculate pm_pen function with parameter 0 at point 'a':

val1 = functionvalue('bpoe', -1.3, H1, c1, p1, a);

%Display function value:

disp(sprintf('functionvalue = %g', val1));

%=======================================================================

%Calculation of functions with PSG Subroutine 'mpsg_function_value'

%Create the PSG matrix 'matrix_1'(structure containing header and matrix body) and pack it to structure 'iargstruc_arr':

iargstruc_arr(1) = matrix_pack('matrix_3r', H1, [],  c1, p1);

%Create the PSG point 'point_1'(structure containing header and matrix body) and pack it to structure 'iargstruc_arr':

iargstruc_arr(2) = point_pack('point_1', a, []);

%Calculate pm_pen function with parameter 0 at point 'point_1':

val2 = mpsg_function_value('bpoe(-1.3,matrix_3r)','point_1',iargstruc_arr);

%Display function value:

disp(sprintf('mpsg_function_value = %g', val2));

 

Program output:

 

functionvalue = 0.666083

mpsg_function_value = 0.666083