diff --git a/CHANGES.md b/CHANGES.md index 5a16d56..36cdc8d 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -5,6 +5,10 @@ Change history for MOST since 1.2 --------- +#### 4/4/24 + - Tweak tests to avoid warnings and presolve bug with new HiGHS-based + `linprog` and `intlinprog` in Optimization Toolbox R2024a. + #### 3/21/24 - Add Sphinx-based Reference documentation. diff --git a/lib/mostver.m b/lib/mostver.m index 57f7bf6..225c70a 100644 --- a/lib/mostver.m +++ b/lib/mostver.m @@ -26,7 +26,7 @@ v = struct( 'Name', 'MOST', ... 'Version', '1.2+', ... 'Release', '', ... - 'Date', '15-Mar-2024' ); + 'Date', '04-Apr-2024' ); if nargout > 0 if nargin > 0 rv = v; diff --git a/lib/mpoption_info_most.m b/lib/mpoption_info_most.m index 528cddf..858eeaf 100644 --- a/lib/mpoption_info_most.m +++ b/lib/mpoption_info_most.m @@ -1,5 +1,5 @@ function opt = mpoption_info_most(selector) -% mpoption_info_most - Returns MATPOWER option info for MOST. +% mpoption_info_most - Returns |MATPOWER| option info for MOST. % :: % % DEFAULT_OPTS = MPOPTION_INFO_MOST('D') diff --git a/lib/t/t_most_spuc.m b/lib/t/t_most_spuc.m index 33af613..7f7c026 100644 --- a/lib/t/t_most_spuc.m +++ b/lib/t/t_most_spuc.m @@ -96,7 +96,7 @@ function t_most_spuc(quiet, create_plots, create_pdfs, savedir) mpopt = mpoption(mpopt, 'mosek.opts.MSK_DPAR_MIO_TOL_REL_GAP', 0); mpopt = mpoption(mpopt, 'mosek.opts.MSK_DPAR_MIO_TOL_ABS_GAP', 0); end -if have_feature('intlinprog') +if have_feature('intlinprog') && have_feature('intlinprog', 'vnum') < 24 %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'interior-point'); %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'active-set'); %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'simplex'); diff --git a/lib/t/t_most_suc.m b/lib/t/t_most_suc.m index 41994b6..82fb610 100644 --- a/lib/t/t_most_suc.m +++ b/lib/t/t_most_suc.m @@ -117,7 +117,7 @@ function t_most_suc(quiet, create_plots, create_pdfs, savedir) mpopt = mpoption(mpopt, 'mosek.opts.MSK_DPAR_MIO_TOL_REL_GAP', 0); mpopt = mpoption(mpopt, 'mosek.opts.MSK_DPAR_MIO_TOL_ABS_GAP', 0); end -if have_feature('intlinprog') +if have_feature('intlinprog') && have_feature('intlinprog', 'vnum') < 24 %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'interior-point'); %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'active-set'); %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'simplex'); diff --git a/lib/t/t_most_uc.m b/lib/t/t_most_uc.m index 0a3778d..7b62ec2 100644 --- a/lib/t/t_most_uc.m +++ b/lib/t/t_most_uc.m @@ -119,21 +119,26 @@ function t_most_uc(quiet, create_plots, create_pdfs, savedir) mpopt = mpoption(mpopt, 'mosek.opts.MSK_DPAR_MIO_TOL_ABS_GAP', 0); end if have_feature('intlinprog') - %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'interior-point'); - %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'active-set'); - %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'simplex'); - mpopt = mpoption(mpopt, 'linprog.Algorithm', 'dual-simplex'); - %mpopt = mpoption(mpopt, 'intlinprog.RootLPAlgorithm', 'primal-simplex'); - mpopt = mpoption(mpopt, 'intlinprog.RootLPAlgorithm', 'dual-simplex'); mpopt = mpoption(mpopt, 'intlinprog.TolCon', 1e-9); mpopt = mpoption(mpopt, 'intlinprog.TolGapAbs', 0); mpopt = mpoption(mpopt, 'intlinprog.TolGapRel', 0); - mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6); - %% next line is to work around a bug in intlinprog - % (Technical Support Case #01841662) - % (except actually in this case it triggers it rather than working - % around it, so we comment it out) - %mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none'); + if have_feature('intlinprog', 'vnum') < 24 + %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'interior-point'); + %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'active-set'); + %mpopt = mpoption(mpopt, 'linprog.Algorithm', 'simplex'); + mpopt = mpoption(mpopt, 'linprog.Algorithm', 'dual-simplex'); + %mpopt = mpoption(mpopt, 'intlinprog.RootLPAlgorithm', 'primal-simplex'); + mpopt = mpoption(mpopt, 'intlinprog.RootLPAlgorithm', 'dual-simplex'); + mpopt = mpoption(mpopt, 'intlinprog.TolInteger', 1e-6); + %% next line is to work around a bug in intlinprog + % (Technical Support Case #01841662) + % (except actually in this case it triggers it rather than working + % around it, so we comment it out) + %mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none'); + else mpopt = mpoption(mpopt, 'intlinprog.LPPreprocess', 'none'); + s2 = warning('query', 'optim:intlinprog:IgnoreOptions'); + warning('off', 'optim:intlinprog:IgnoreOptions'); + end end if ~verbose mpopt = mpoption(mpopt, 'out.all', 0); @@ -408,6 +413,8 @@ function t_most_uc(quiet, create_plots, create_pdfs, savedir) if have_feature('octave') warning(s1.state, file_in_path_warn_id); +elseif have_feature('intlinprog') && have_feature('intlinprog', 'vnum') >= 24 + warning(s2.state, 'optim:intlinprog:IgnoreOptions'); end t_end;