tbpsg_vector_constraint_data function gets the values of vector constraints from the solution report.
Syntax
[output] = tbpsg_vector_constraint_data(solution_str, outargstruc_arr)
Description
[output] = tbpsg_vector_constraint_data(solution_str, outargstruc_arr) returns values of vector constraints of the optimization problem extracted from the solution reports solution_str and outargstruc_arr.
Input Arguments
solution_str |
string with solution report; |
outargstruc_arr |
array of output PSG data structures; |
Output Arguments
output |
cell array of values of vector constraints in the optimization problem. |
Example
CVaR problem is defined in section Quick Start with PSG Toolbox.
Open PSG Toolbox:
>> tbpsg_toolbox
Load in PSG Toolbox problem from file .\Aorda\PSG\MATLAB\Examples\Toolbox\problem_cvar.mat
Change Problem Statement with (change function linear in the second constraint with linearmulti = case of vector constraint):
minimize
cvar_risk(0.95, matrix_scenarios)
Constraint: >= 4.5
avg_g(matrix_scenarios)
Constraint: == 1
linearmulti(matrix_budget)
Box: >= point_lowerbounds
Open in PSG Toolbox menu "Save to Workspace" and save problem statement and toolbox structure to Workspace variables problem_statement and toolboxstruc_arr.
Optimize problem using tbpsg_run:
[solution_str,outargstruc_arr]=tbpsg_run(problem_statement, toolboxstruc_arr);
Extract values of vector constraint (second constraint on linearmulti function) from the solution reports solution_str and outargstruc_arr:
>> output = tbpsg_vector_constraint_data(solution_str, outargstruc_arr)
output =
1.0000
See also
tbpsg_isoptimal, tbpsg_objective, tbpsg_function, tbpsg_time, tbpsg_point_data, tbpsg_point_vars, tbpsg_matrix_data, tbpsg_matrix_vars, tbpsg_vector_data