%======================================================================= %To solve optimization problem: %Create a new subfolder in ...\PSG\MATLAB: %..\PSG\MATLAB\problem_CSection_LOGEXPSUM_POLYNOMABS_Cardinality %Download and unpack the following zipped file from 'Data' to the created folder: %'Mat_data_problem_CSection_LOGEXPSUM_POLYNOMABS_Cardinality.zip' %Run program 'problem_CSection_LOGEXPSUM_POLYNOMABS_Cardinality.m' %======================================================================= clc; clear; addpath('..'); %Load data: load('.\problem_CSection_LOGEXPSUM_POLYNOMABS_Cardinality_data.mat') %Define options for PSG solver: stroptions.LinearizationRisk2 = 'On'; stroptions.Precision = 9; %Define input arguments: string1 = {-1,'logexp_sum'}; string2 = {'cardn'}; w2 = {1e-006}; %Solve optimization problems: [xout, fval, status, output] = riskconstrprog(string1, string2, [], H1, c1, [], w2, H2, [], [], [], r, [], [], [], [], lb, ub, [], stroptions); %Display results: disp(' '); disp('Results: '); %Display status of optimization problem: disp(sprintf('status of optimization problem = %s', status)); %Display solving time: disp(sprintf('solving time = %g', output.solving_time)); %Display objective: disp(sprintf('objective = %g', fval)); %Display function: disp(sprintf('logexp_sum= %g', output.frval1(1))); disp(sprintf('cardn= %g', output.frval2)); %Display optimal point: disp('optimal point = '); disp(xout');