%======================================================================= %To solve optimization problem: %Create a new subfolder in ...\PSG\MATLAB: %..\PSG\MATLAB\problem_deterministic_LP_model %Download and unpack the following zipped file from 'Data' to the created folder: %'Mat_data_problem_deterministic_LP_model.zip' %Run program 'problem_deterministic_LP_model.m' %======================================================================= clc; clear; addpath('..'); %Load data: load('.\problem_deterministic_LP_model_data.mat') %Define options for PSG solver: stroptions.Types = 1; stroptions.Precision = 9; %Solve optimization problems: [xout, fval, status, output] = riskprog([], [], [], [], [], d, A, b, [], [], 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 linear component of objective: disp('linear component of objective:'); disp(output.fdval); %Display left hand sides of linear inequality: disp('linear inequality:'); disp(output.fAval'); %Display residual of linear inequality: disp(sprintf('residual of linear inequality = %g', output.rAval)); %Display optimal point: disp('optimal point = '); disp(xout');