%This Example for using users m-function Optimization_subroutine.m was created automatically by PSG Toolbox. %Function description: %minimize %meanabs_pen(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) %box: >=parameter_bound, <= parameter_bound_1 %solver: parameter_solver % %value: %meanabs_pen(matrix_style_classification_fidelity_magellan) %meansquare(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) % %Input variables: % %Inputs PSG Type PSG Object Location in Problem Statement Class %matrix_style_classification_fidelity_magellan_benchmark bench matrix_style_classification_fidelity_magellan meanabs_pen(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) double % meanabs_pen(matrix_style_classification_fidelity_magellan) % meansquare(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) %matrix_style_classification_fidelity_magellan_data data matrix_style_classification_fidelity_magellan meanabs_pen(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) double % meanabs_pen(matrix_style_classification_fidelity_magellan) % meansquare(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) %matrix_style_classification_fidelity_magellan_vars vars matrix_style_classification_fidelity_magellan meanabs_pen(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) cell % meanabs_pen(matrix_style_classification_fidelity_magellan) % meansquare(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) %vector_tstyle_data data vector_tstyle meanabs_pen(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) double % meansquare(ltranche(matrix_style_classification_fidelity_magellan,vector_tstyle)) %parameter_bound_data data parameter_bound box: >=parameter_bound, <= parameter_bound_1 double %parameter_bound_1_data data parameter_bound_1 box: >=parameter_bound, <= parameter_bound_1 double %parameter_solver_data data parameter_solver solver: parameter_solver char % %Output variables: % %solution_str = string with solution of problem; %outargstruc_arr = array of output PSG data structures; %Load data from mat-file: load('D:\American Optimal Decisions\PSG\MATLAB_Stan\ready\Linear Regression in Tranche\data_problem_lthranche_style_classification\Optimization_subroutine_data.mat') %Save variables from mat-file to Workspace: tbpsg_export_to_workspace(toolboxstruc_arr) %Run users m-function Optimization_subroutine: [solution_str,outargstruc_arr] = Optimization_subroutine(matrix_style_classification_fidelity_magellan_benchmark,matrix_style_classification_fidelity_magellan_data,matrix_style_classification_fidelity_magellan_vars,vector_tstyle_data,parameter_bound_data,parameter_bound_1_data,parameter_solver_data); %Extract Objective: val_obj = tbpsg_objective(solution_str, outargstruc_arr); disp(' '); disp('Objective = '); disp(val_obj); %Extract optimal solution: point_data = tbpsg_optimal_point_data(solution_str, outargstruc_arr); disp(' '); disp('Optimal point = '); disp(point_data); %Extract structure containing PSG solution reports: output_structure = tbpsg_solution_struct(solution_str, outargstruc_arr); disp(' '); disp('Structure with PSG solution = '); disp(output_structure); %Uncomment the following lines to extract solutions details: %output = tbpsg_isoptimal(solution_str, outargstruc_arr); %output = tbpsg_function_data(solution_str, outargstruc_arr); %output = tbpsg_function_names(solution_str, outargstruc_arr); %output = tbpsg_time(solution_str, outargstruc_arr); %output = tbpsg_optimal_point_vars(solution_str, outargstruc_arr); %output = tbpsg_constraints_vars(solution_str, outargstruc_arr); %output = tbpsg_slack_data(solution_str, outargstruc_arr); %output = tbpsg_dual_data(solution_str, outargstruc_arr); %output = tbpsg_vector_constraint_data(solution_str, outargstruc_arr); %output = tbpsg_vector_dual_data(solution_str, outargstruc_arr); %output = tbpsg_vector_slack_data(solution_str, outargstruc_arr); %output = tbpsg_matrix_data(solution_str, outargstruc_arr); %output = tbpsg_matrix_vars(solution_str, outargstruc_arr); %output = tbpsg_vector_data(solution_str, outargstruc_arr);