Skip to content

Commit be0fe1c

Browse files
committed
Fix failing tests in t_qcqps_master when 'DEFAULT' implies 'FMINCON' (as in MATLAB Online).
- In this case, qcqps_master() can be used to solve LP / QP problems, unlike when explicitly selecting 'FMINCON', which explicitly skipped these tests. - No idea why these tests were failing on MATLAB Online, but passing on MATLAB GitHub runners. Must be something different in the environment that results in small numerical differences.
1 parent 3ae09a1 commit be0fe1c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/t/t_qcqps_master.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@ function t_qcqps_master(quiet)
6969
opt.knitro_opt = artelys_knitro_options([], mpopt);
7070
opt.knitro_opt.ncvx_qcqp_init = 1;
7171
end
72+
if have_feature('fmincon')
73+
%% needed for QP problems when 'DEFAULT' means 'FMINCON'
74+
opt.fmincon_opt.opts.OptimalityTolerance = 1e-8;
75+
end
7276

7377
if does_lp(k)
7478
t = sprintf('%s - 3-d LP : ', names{k});

0 commit comments

Comments
 (0)