tbpsg_time function gets preprocessing and solution times for problem from the solution report.

 

Syntax

[output] = tbpsg_time(solution_str, outargstruc_arr)

 

Description

[output] = tbpsg_time(solution_str, outargstruc_arr) returns the time of preprocessing and solution of an 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

solution time of optimization problem, data loading time, and preprocessing time.

 

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

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 solution time of optimization problem, data loading time, and preprocessing time from the solution reports solution_str and outargstruc_arr:

 

>> output = tbpsg_time(solution_str, outargstruc_arr)

 

output =

 

         0.2200         0         0

 

 

See also

tbpsg_isoptimal, tbpsg_objective, tbpsg_constraint, tbpsg_function, tbpsg_point_data, tbpsg_point_vars, tbpsg_matrix_data, tbpsg_matrix_vars, tbpsg_vector_data