Skip to content

Commit 47d280a

Browse files
committed
Add support for the new HiPO interior point LP solver in HiGHS.
1 parent ec3f5f6 commit 47d280a

10 files changed

Lines changed: 66 additions & 6 deletions

File tree

CHANGES.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ Change history for MP-Opt-Model
55
since version 5.0
66
-----------------
77

8+
#### 11/14/25
9+
- Add support for the new HiPO interior point LP solver in HiGHS, including
10+
`have_feature_highs_hipo()` to detect availability.
11+
812
#### 10/28/25
913
- Add `fix_integer` and `relax_integer` options to `miqps_master()` and move
1014
the implementations from `mp.opt_model.solve()` to `miqps_master()`.
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
.. currentmodule:: mp_opt_model
2+
3+
:raw-html:`<div style="float: right"><a href="https://github.com/MATPOWER/mp-opt-model/blob/master/lib/have_feature_highs_hipo.m" target=_blank><svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github v-align-middle color-fg-default"><path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg></a></div>`
4+
5+
have_feature_highs_hipo
6+
-----------------------
7+
8+
.. autofunction:: have_feature_highs_hipo
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../../../lib/have_feature_highs_hipo.m

docs/sphinx/source/reference.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ rather are used to extend the capabilities of :func:`have_feature`.
284284
functions/have_feature_glpk
285285
functions/have_feature_gurobi
286286
functions/have_feature_highs
287+
functions/have_feature_highs_hipo
287288
functions/have_feature_intlinprog
288289
functions/have_feature_ipopt_auxdata
289290
functions/have_feature_ipopt

docs/src/MP-Opt-Model-manual/MP-Opt-Model-manual.tex

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4077,7 +4077,12 @@ \subsubsection{\tt have\_feature\_gurobi}
40774077
\subsubsection{\tt have\_feature\_highs}
40784078
\label{sec:have_feature_highs}
40794079

4080-
This function implements the \codeq{highs} tag for \code{have\_feature} to detect availability/version of \code{callhighs}, \highs{} optimizer. See also Appendix~\ref{app:gurobi}.
4080+
This function implements the \codeq{highs} tag for \code{have\_feature} to detect availability/version of \code{callhighs}, \highs{} optimizer. See also Appendix~\ref{app:highs}.
4081+
4082+
\subsubsection{\tt have\_feature\_highs\_hipo}
4083+
\label{sec:have_feature_highs_hipo}
4084+
4085+
This function implements the \codeq{highs\_hipo} tag for \code{have\_feature} to detect availability/version of the HiPO interior point LP solver for the \highs{} optimizer. See also Appendix~\ref{app:highs}.
40814086

40824087
\subsubsection{\tt have\_feature\_intlinprog}
40834088
\label{sec:have_feature_intlinprog}
@@ -6718,9 +6723,10 @@ \subsubsection*{New Features}
67186723
\begin{itemize}
67196724
\item New \code{fix\_integer} option for \code{miqps\_master()} and \code{mp.opt\_model.solve()}. Set to true to fix any integer variables to their initial values, as specified in \code{x0} or \code{opt.x0}.
67206725
\item Add \code{relax\_integer} option to \code{miqps\_master()} and move the implementation from \code{mp.opt\_model.solve()}.
6726+
\item Support for the new HiPO interior point LP solver in the \highs{} optimizer.
67216727
\item New functions:
67226728
\begin{itemize}
6723-
\item \code{foobar()} does whizbang.
6729+
\item \code{have\_feature\_highs\_hipo()} feature detection function for HiPO solver in \highs{} optimizer.
67246730
\end{itemize}
67256731
\end{itemize}
67266732

lib/have_feature_highs.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
if TorF
2222
try
2323
vstr = char(callhighs(string('ver')));
24-
catch % gurobiError
24+
catch
2525
TorF = 0;
2626
fprintf('HiGHS Error!\n');
2727
end

lib/have_feature_highs_hipo.m

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
function [TorF, vstr, rdate] = have_feature_highs_hipo()
2+
% have_feature_highs_hipo - Detect availability/version info for HiPO solver for HiGHS.
3+
%
4+
% Private feature detection function implementing ``'highs_hipo'`` tag for
5+
% have_feature to detect availability/version of HiPO solver within HiGHS
6+
% optimizer (https://highs.dev).
7+
%
8+
% See also have_feature, qps_master, callhighs.
9+
10+
% MP-Opt-Model
11+
% Copyright (c) 2004-2025, Power Systems Engineering Research Center (PSERC)
12+
% by Ray Zimmerman, PSERC Cornell
13+
%
14+
% This file is part of MP-Opt-Model.
15+
% Covered by the 3-clause BSD License (see LICENSE file for details).
16+
% See https://github.com/MATPOWER/mp-opt-model for more info.
17+
18+
19+
v = have_feature('highs', 'all');
20+
TorF = v.av;
21+
vstr = v.vstr;
22+
rdate = v.date;
23+
if TorF
24+
try
25+
s = warning('query');
26+
warning('off');
27+
x = feval('qps_highs', [],[1; 1],[1 1],[2],[2],[1; 1],[1; 1],[1; 1],struct('verbose', 0,'highs_opt',struct('solver','hipo')));
28+
catch
29+
TorF = 0;
30+
warning(s);
31+
end
32+
end

lib/mpomver.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
v = struct( 'Name', 'MP-Opt-Model', ...
2727
'Version', '5.1-dev', ...
2828
'Release', '', ...
29-
'Date', '28-Oct-2025' );
29+
'Date', '14-Nov-2025' );
3030
if nargout > 0
3131
if nargin > 0
3232
rv = v;

lib/qps_highs.m

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,16 @@
214214
names = struct( ...
215215
'choose', 'default', ...
216216
'simplex', 'dual simplex', ...
217-
'ipm', 'interior point', ...
217+
'ipm', 'interior point (auto)', ...
218+
'ipx', 'interior point (IPX)', ...
219+
'hipo', 'interior point (HiPO)', ...
218220
'pdlp', 'primal-dual hybrid gradient' );
219-
fprintf('HiGHS Version %s -- %s %s solver\n', vn, names.(solver), lpqp);
221+
if ismember(solver, fieldnames(names))
222+
solver_name = names.(solver);
223+
else
224+
solver_name = 'unknown';
225+
end
226+
fprintf('HiGHS Version %s -- %s %s solver\n', vn, solver_name, lpqp);
220227
end
221228
[soln, info, opts, basis] = callhighs(c, A, l, u, xmin, xmax, H, [], highs_opt);
222229
if verbose

lib/t/generate_mpom_autodoc.m

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ function generate_mpom_autodoc(install_dir)
6666
'have_feature_glpk', ...
6767
'have_feature_gurobi', ...
6868
'have_feature_highs', ...
69+
'have_feature_highs_hipo', ...
6970
'have_feature_intlinprog', ...
7071
'have_feature_ipopt_auxdata', ...
7172
'have_feature_ipopt', ...

0 commit comments

Comments
 (0)