Skip to content

Commit bb0897c

Browse files
committed
Tweak tests for Optimization Toolbox R2024b.
Avoid presolve bug with HiGHS-based `linprog` and `intlinprog` in Optimization Toolbox R2024b. Same bug as before, just a different option to turn off presolve in R2024b (HiGHS 1.7).
1 parent 47f98b7 commit bb0897c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

CHANGES.md

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Change history for MOST
55
since 1.3
66
---------
77

8+
#### 10/7/24
9+
- Tweak tests (again) to avoid warnings and presolve bug with HiGHS-based
10+
`linprog` and `intlinprog` in Optimization Toolbox R2024b.
11+
812
#### 9/12/24
913
- Fix issue with `most_summary()` when ramp results are missing.
1014

docs/src/MOST-manual/MOST-manual.tex

+1
Original file line numberDiff line numberDiff line change
@@ -3476,6 +3476,7 @@ \subsubsection*{Bugs Fixed}
34763476
\item Fix issue \#45 where \code{most()} does not properly handle cases with contingencies defined only in some periods/scenarios.
34773477
\emph{Thanks to Stefano Nicolin.}
34783478
\item Fix issue with \code{most\_summary()} when ramp results are missing.
3479+
\item Tweak tests to work around bug in HiGHS-based `linprog` and `intlinprog` in Optimization Toolbox R2024a and R2024b.
34793480
\end{itemize}
34803481

34813482
\subsubsection*{Incompatible Changes}

lib/t/t_most_uc.m

+5-2
Original file line numberDiff line numberDiff line change
@@ -135,9 +135,12 @@ function t_most_uc(quiet, create_plots, create_pdfs, savedir)
135135
% (except actually in this case it triggers it rather than working
136136
% around it, so we comment it out)
137137
%mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
138-
else mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
138+
elseif have_feature('intlinprog', 'vnum') == 24.001
139+
mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none');
139140
s2 = warning('query', 'optim:intlinprog:IgnoreOptions');
140141
warning('off', 'optim:intlinprog:IgnoreOptions');
142+
elseif have_feature('intlinprog', 'vnum') == 24.002
143+
mpopt = mpoption(mpopt, 'intlinprog.Presolve', 'off');
141144
end
142145
end
143146
if ~verbose
@@ -413,7 +416,7 @@ function t_most_uc(quiet, create_plots, create_pdfs, savedir)
413416

414417
if have_feature('octave')
415418
warning(s1.state, file_in_path_warn_id);
416-
elseif have_feature('intlinprog') && have_feature('intlinprog', 'vnum') >= 24
419+
elseif have_feature('intlinprog') && have_feature('intlinprog', 'vnum') == 24.001
417420
warning(s2.state, 'optim:intlinprog:IgnoreOptions');
418421
end
419422

0 commit comments

Comments
 (0)