Skip to content

Commit c732b76

Browse files
committed
Clarify intlinprog bug workarounds in tests and examples.
1 parent 5fadda2 commit c732b76

File tree

6 files changed

+40
-18
lines changed

6 files changed

+40
-18
lines changed

lib/t/most_ex6_uc.m

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,13 @@ function most_ex6_uc(quiet)
7272
mpopt = mpoption(mpopt, 'intlinprog.TolGapAbs', 0);
7373
mpopt = mpoption(mpopt, 'intlinprog.TolGapRel', 0);
7474
mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6);
75-
%% next line is to work around a bug in intlinprog
76-
% (Technical Support Case #01841662)
77-
% (except actually in this case it triggers it rather than working
78-
% around it, so we comment it out)
79-
%mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
75+
% if have_feature('intlinprog', 'vnum') < 24
76+
% %% next line is to work around a bug in intlinprog < R2024a
77+
% % (Technical Support Case #01841662)
78+
% % (except actually in this case it triggers it rather than working
79+
% % around it, so we comment it out)
80+
% mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
81+
% end
8082
end
8183

8284
casefile = 'ex_case3b';

lib/t/most_ex7_suc.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,13 @@ function most_ex7_suc(quiet)
7272
mpopt = mpoption(mpopt, 'intlinprog.TolGapAbs', 0);
7373
mpopt = mpoption(mpopt, 'intlinprog.TolGapRel', 0);
7474
mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6);
75-
%% next line is to work around a bug in intlinprog
76-
% (Technical Support Case #01841662)
77-
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
75+
if have_feature('intlinprog', 'vnum') < 24
76+
%% next line is to work around a bug in intlinprog < R2024a
77+
% (Technical Support Case #01841662)
78+
% (except actually in this case it triggers it rather than working
79+
% around it, so we comment it out)
80+
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
81+
end
7882
end
7983

8084
casefile = 'ex_case3b';

lib/t/t_most_30b_1_1_0_uc.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,13 @@ function t_most_30b_1_1_0_uc(quiet)
3131
mpopt = mpoption(mpopt, 'intlinprog.TolGapAbs', 0);
3232
mpopt = mpoption(mpopt, 'intlinprog.TolGapRel', 0);
3333
mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6);
34-
%% next line is to work around a bug in intlinprog
35-
% (Technical Support Case #01841662)
36-
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
34+
if have_feature('intlinprog', 'vnum') < 24
35+
%% next line is to work around a bug in intlinprog < R2024a
36+
% (Technical Support Case #01841662)
37+
% (except actually in this case it triggers it rather than working
38+
% around it, so we comment it out)
39+
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
40+
end
3741
end
3842
mpoptac = mpoption(mpopt, 'model', 'AC');
3943
mpoptdc = mpoption(mpopt, 'model', 'DC');

lib/t/t_most_spuc.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,9 +107,13 @@ function t_most_spuc(quiet, create_plots, create_pdfs, savedir)
107107
mpopt = mpoption(mpopt, 'intlinprog.TolGapAbs', 0);
108108
mpopt = mpoption(mpopt, 'intlinprog.TolGapRel', 0);
109109
mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6);
110-
%% next line is to work around a bug in intlinprog
111-
% (Technical Support Case #01841662)
112-
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
110+
if have_feature('intlinprog', 'vnum') < 24
111+
%% next line is to work around a bug in intlinprog < R2024a
112+
% (Technical Support Case #01841662)
113+
% (except actually in this case it triggers it rather than working
114+
% around it, so we comment it out)
115+
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
116+
end
113117
end
114118
if ~verbose
115119
mpopt = mpoption(mpopt, 'out.all', 0);

lib/t/t_most_suc.m

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,13 @@ function t_most_suc(quiet, create_plots, create_pdfs, savedir)
128128
mpopt = mpoption(mpopt, 'intlinprog.TolGapAbs', 0);
129129
mpopt = mpoption(mpopt, 'intlinprog.TolGapRel', 0);
130130
mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6);
131-
%% next line is to work around a bug in intlinprog
132-
% (Technical Support Case #01841662)
133-
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
131+
if have_feature('intlinprog', 'vnum') < 24
132+
%% next line is to work around a bug in intlinprog < R2024a
133+
% (Technical Support Case #01841662)
134+
% (except actually in this case it triggers it rather than working
135+
% around it, so we comment it out)
136+
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
137+
end
134138
end
135139
if ~verbose
136140
mpopt = mpoption(mpopt, 'out.all', 0);

lib/t/t_most_uc.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,16 +132,20 @@ function t_most_uc(quiet, create_plots, create_pdfs, savedir)
132132
%mpopt = mpoption(mpopt, 'intlinprog.RootLPAlgorithm', 'primal-simplex');
133133
mpopt = mpoption(mpopt, 'intlinprog.RootLPAlgorithm', 'dual-simplex');
134134
mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6);
135-
%% next line is to work around a bug in intlinprog
135+
%% next line is to work around a bug in intlinprog < R2024a
136136
% (Technical Support Case #01841662)
137137
% (except actually in this case it triggers it rather than working
138138
% around it, so we comment it out)
139139
%mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
140140
elseif have_feature('intlinprog', 'vnum') == 24.001
141+
%% next line is to work around a bug in intlinprog R2024a
142+
% (Technical Support Case #06920417)
141143
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
142144
s2 = warning('query', 'optim:intlinprog:IgnoreOptions');
143145
warning('off', 'optim:intlinprog:IgnoreOptions');
144146
elseif have_feature('intlinprog', 'vnum') == 24.002
147+
%% next line is to work around a bug in intlinprog R2024b
148+
% (Technical Support Case #07325794)
145149
mpopt = mpoption(mpopt, 'intlinprog.Presolve', 'off');
146150
end
147151
end

0 commit comments

Comments
 (0)