Skip to content

Commit d3fc2aa

Browse files
committed
Merge branch 'latest' into hipo-cpack-l
2 parents d1a875f + 2cbd2a0 commit d3fc2aa

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2037
-1255
lines changed

CITATION.cff

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ authors:
66
77
- given-names: Ivet
88
family-names: Galabova
9-
- given-names: Leona
10-
family-names: Gottwald
11-
- given-names: Michael
12-
family-names: Feldmeier
139
title: "HiGHS"
14-
version: 1.2.2
10+
version: 1.12.0
1511
date-released: 2022-04-18
16-
url: "https://github.com/ERGO-Code/HiGHS/releases/tag/v1.2.2"
12+
url: "https://github.com/ERGO-Code/HiGHS/releases/tag/v1.12.0"
1713
preferred-citation:
1814
type: article
1915
authors:

LicenseNote.txt

Lines changed: 0 additions & 12 deletions
This file was deleted.

THIRD_PARTY_NOTICES.md

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
# Third Party Licenses and Acknowledgements
2+
3+
The majority of the HiGHS source code is available under the [MIT license](https://opensource.org/license/MIT).
4+
5+
Code in the `/extern` directory was originally developed by third-parties and is
6+
licensed under additional licenses.
7+
8+
## amd
9+
10+
The source code in `/extern/amd` is distributed under the [BSD-3 license](https://opensource.org/license/bsd-3-clause)
11+
at `/extern/amd/License.txt`.
12+
13+
It was originally developed by Timothy Davis.
14+
15+
The upstream source code is available at:
16+
17+
* https://github.com/DrTimothyAldenDavis/SuiteSparse
18+
19+
To avoid compiling this code into HiGHS, use `-DHIPO=OFF`.
20+
21+
## filereaderlp
22+
23+
The source code in `/extern/filereaderlp` is distributed under the [MIT license](https://opensource.org/license/MIT)
24+
at `/extern/filereaderlp/LICENSE`.
25+
26+
It was originally developed by Michael Feldmeier.
27+
28+
The upstream source code is available at:
29+
30+
* https://github.com/feldmeier/FilereaderLP
31+
32+
## metis
33+
34+
The source code in `/extern/metis` is distributed under the [Apache 2.0 license](https://opensource.org/license/apache-2-0)
35+
at `/extern/metis/LICENSE.txt`.
36+
37+
It was originally developed by George Karypis.
38+
39+
The upstream source code is available at:
40+
41+
* https://github.com/KarypisLab/METIS
42+
* https://github.com/KarypisLab/GKlib
43+
44+
To avoid compiling this code into HiGHS, use `-DHIPO=OFF`.
45+
46+
## pdqsort
47+
48+
The source code in `/extern/pdqsort` is distributed under the [zlib license](https://opensource.org/license/zlib)
49+
at `/extern/pdqsort/license.txt`.
50+
51+
It was originally developed by Orson Peters.
52+
53+
The upstream source code is available at:
54+
55+
* https://github.com/orlp/pdqsort
56+
57+
## rcm
58+
59+
The source code in `/extern/rcm` is distributed under the [MIT license](https://opensource.org/license/MIT)
60+
at `/extern/rcm/LICENSE`.
61+
62+
It was originally developed by Alan George, Joseph Liu, and John Burkardt.
63+
64+
The upstream source code is available at:
65+
66+
* https://people.sc.fsu.edu/~jburkardt/cpp_src/rcm/rcm.html
67+
68+
## zstr
69+
70+
The source code in `/extern/zstr` is distributed under the [MIT license](https://opensource.org/license/MIT)
71+
at `/extern/zstr/LICENSE`.
72+
73+
It was originally developed by Matei David.
74+
75+
The upstream source code is available at:
76+
77+
* https://github.com/mateidavid/zstr

check/TestHipo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <iostream>
1717
#include <vector>
1818

19-
const bool dev_run = true;
19+
const bool dev_run = false;
2020

2121
TEST_CASE("test-hipo-afiro", "[highs_hipo]") {
2222
// Test that hipo runs and finds correct solution for afiro

check/TestMipSolver.cpp

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -519,7 +519,7 @@ TEST_CASE("MIP-infeasible-start", "[highs_test_mip_solver]") {
519519

520520
// Stefan's example
521521
std::string filename;
522-
filename = std::string(HIGHS_DIR) + "/check/instances/infeasible.mps";
522+
filename = std::string(HIGHS_DIR) + "/check/instances/infeasible-mip1.mps";
523523

524524
highs.readModel(filename);
525525
sol.col_value = {75, 0, 275, 300, 300, 0, 0, 0, 50, 0, 0,
@@ -1228,6 +1228,42 @@ TEST_CASE("get-fixed-lp", "[highs_test_mip_solver]") {
12281228
h.resetGlobalScheduler(true);
12291229
}
12301230

1231+
TEST_CASE("get-presolved-mip", "[highs_test_mip_solver]") {
1232+
HighsLp lp;
1233+
lp.num_col_ = 3;
1234+
lp.num_row_ = 3;
1235+
lp.col_cost_ = {1, 1, 1};
1236+
lp.col_lower_ = {0, -kHighsInf, -kHighsInf};
1237+
lp.col_upper_ = {kHighsInf, kHighsInf, kHighsInf};
1238+
lp.integrality_ = {HighsVarType::kContinuous, HighsVarType::kInteger,
1239+
HighsVarType::kInteger};
1240+
lp.row_lower_ = {2, 6, 8};
1241+
lp.row_upper_ = {2, kHighsInf, kHighsInf};
1242+
lp.a_matrix_.format_ = MatrixFormat::kRowwise;
1243+
lp.a_matrix_.start_ = {0, 3, 6, 9};
1244+
lp.a_matrix_.index_ = {0, 1, 2, 0, 1, 2, 0, 1, 2};
1245+
lp.a_matrix_.value_ = {1, 1, 1, 1, -1, 2, 1, 3, -1};
1246+
Highs h;
1247+
h.setOptionValue("output_flag", dev_run);
1248+
// Code coverage of highsVarTypeToString for all cases
1249+
HighsLogOptions log_options = h.getOptions().log_options;
1250+
for (HighsInt iVarType = -1;
1251+
iVarType < HighsInt(HighsVarType::kImplicitInteger) + 2; iVarType++)
1252+
highsLogUser(log_options, HighsLogType::kInfo, "Variable type %2d is %s\n",
1253+
int(iVarType), highsVarTypeToString(iVarType).c_str());
1254+
h.passModel(lp);
1255+
h.presolve();
1256+
// Presolved MIP has an implied integer, so this tests passing such
1257+
HighsLp presolved_lp = h.getPresolvedModel().lp_;
1258+
h.run();
1259+
const double lp_objective_value = h.getObjectiveValue();
1260+
h.passModel(presolved_lp);
1261+
h.run();
1262+
const double presolved_lp_objective_value = h.getObjectiveValue();
1263+
REQUIRE(presolved_lp_objective_value == lp_objective_value);
1264+
h.resetGlobalScheduler(true);
1265+
}
1266+
12311267
TEST_CASE("get-fixed-lp-semi", "[highs_test_mip_solver]") {
12321268
HighsLp lp;
12331269
lp.num_col_ = 4;
@@ -1245,6 +1281,11 @@ TEST_CASE("get-fixed-lp-semi", "[highs_test_mip_solver]") {
12451281
Highs h;
12461282
h.setOptionValue("output_flag", dev_run);
12471283
h.setOptionValue("presolve", kHighsOffString);
1284+
// Code coverage of highsVarTypeToString for four main types
1285+
for (HighsInt iCol = 0; iCol < lp.num_col_; iCol++)
1286+
highsLogUser(h.getOptions().log_options, HighsLogType::kInfo,
1287+
"Column %d is of type %s\n", int(iCol),
1288+
highsVarTypeToString(lp.integrality_[iCol]).c_str());
12481289
h.passModel(lp);
12491290
h.run();
12501291
double mip_optimal_objective = h.getInfo().objective_function_value;
@@ -1256,6 +1297,7 @@ TEST_CASE("get-fixed-lp-semi", "[highs_test_mip_solver]") {
12561297
REQUIRE(h.run() == HighsStatus::kOk);
12571298

12581299
REQUIRE(h.getInfo().objective_function_value == mip_optimal_objective);
1300+
h.resetGlobalScheduler(true);
12591301
}
12601302

12611303
TEST_CASE("row-fixed-lp", "[highs_test_mip_solver]") {
Lines changed: 140 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,140 @@
1+
NAME issue-2643 11-row 9-col 3-conts 6-integer infeasible MIP
2+
ROWS
3+
N OBJ
4+
L c1
5+
L c8
6+
G c11
7+
G c15
8+
G c16
9+
L c18
10+
L c19
11+
G c20
12+
L c21
13+
L c30
14+
L c_b
15+
COLUMNS
16+
MARK 'MARKER' 'INTORG'
17+
a c1 -3.285000000000e+01
18+
a c8 1.643000000000e+01
19+
a c11 -9.010000000000e+01
20+
a c15 1.044000000000e+01
21+
a c16 5.839000000000e+01
22+
a c18 4.890000000000e+00
23+
a c19 -8.793000000000e+01
24+
a c30 4.052000000000e+01
25+
a c_b 3.425000000000e+02
26+
MARK 'MARKER' 'INTEND'
27+
b c1 -7.836000000000e+01
28+
b c8 -5.884000000000e+01
29+
b c11 6.600000000000e+00
30+
b c15 3.756000000000e+01
31+
b c16 -7.458000000000e+01
32+
b c18 -2.943000000000e+01
33+
b c19 3.706000000000e+01
34+
b c21 3.627000000000e+01
35+
b c30 8.378000000000e+01
36+
b c_b -3.432200000000e+02
37+
b OBJ -2.388000000000e+01
38+
MARK 'MARKER' 'INTORG'
39+
c c1 8.447000000000e+01
40+
c c8 7.200000000000e-01
41+
c c11 -5.095000000000e+01
42+
c c15 2.361000000000e+01
43+
c c16 -4.415000000000e+01
44+
c c18 4.096000000000e+01
45+
c c19 6.282000000000e+01
46+
c c21 9.855000000000e+01
47+
c c30 -5.153000000000e+01
48+
c c_b -4.321800000000e+02
49+
c OBJ 3.222700000000e+02
50+
MARK 'MARKER' 'INTEND'
51+
MARK 'MARKER' 'INTORG'
52+
d c1 -6.273000000000e+01
53+
d c8 -3.610000000000e+00
54+
d c11 7.613000000000e+01
55+
d c15 4.711000000000e+01
56+
d c16 6.418000000000e+01
57+
d c18 8.969000000000e+01
58+
d c19 7.961000000000e+01
59+
d c30 -6.288000000000e+01
60+
d c_b 1.897600000000e+02
61+
d OBJ 1.437100000000e+02
62+
MARK 'MARKER' 'INTEND'
63+
e c1 3.142000000000e+01
64+
e c8 1.298000000000e+01
65+
e c11 -4.320000000000e+01
66+
e c15 -7.787000000000e+01
67+
e c16 -5.097000000000e+01
68+
e c18 5.004000000000e+01
69+
e c19 -2.433000000000e+01
70+
e c30 1.527000000000e+01
71+
e c_b -4.748400000000e+02
72+
e OBJ 1.394300000000e+02
73+
f c1 -1.334000000000e+01
74+
f c8 7.861000000000e+01
75+
f c11 5.318000000000e+01
76+
f c15 3.386000000000e+01
77+
f c16 -8.273000000000e+01
78+
f c18 7.153000000000e+01
79+
f c19 5.374000000000e+01
80+
f c30 -7.809000000000e+01
81+
f c_b 2.149000000000e+01
82+
MARK 'MARKER' 'INTORG'
83+
g c1 -9.900000000000e+00
84+
g c11 3.000000000000e-02
85+
g c15 -4.859000000000e+01
86+
g c16 4.934000000000e+01
87+
g c18 -6.935000000000e+01
88+
g c19 1.416000000000e+01
89+
g c30 7.693000000000e+01
90+
g c_b -4.488500000000e+02
91+
g OBJ 3.465700000000e+02
92+
MARK 'MARKER' 'INTEND'
93+
MARK 'MARKER' 'INTORG'
94+
h c1 -3.243000000000e+01
95+
h c8 -6.963000000000e+01
96+
h c11 8.690000000000e+01
97+
h c15 1.032000000000e+01
98+
h c16 -1.539000000000e+01
99+
h c18 2.638000000000e+01
100+
h c19 9.907000000000e+01
101+
h c20 -6.612000000000e+01
102+
h c21 9.098000000000e+01
103+
h c30 3.970000000000e+01
104+
h c_b 1.005500000000e+02
105+
MARK 'MARKER' 'INTEND'
106+
MARK 'MARKER' 'INTORG'
107+
i c1 -3.877000000000e+01
108+
i c8 5.683000000000e+01
109+
i c11 -7.974000000000e+01
110+
i c15 -1.480000000000e+01
111+
i c16 -6.928000000000e+01
112+
i c18 5.720000000000e+01
113+
i c19 4.524000000000e+01
114+
i c30 -6.992000000000e+01
115+
i c_b -6.559000000000e+01
116+
i OBJ -1.916800000000e+02
117+
MARK 'MARKER' 'INTEND'
118+
RHS
119+
RHS c1 -1.709860000000e+03
120+
RHS c8 -7.222500000000e+02
121+
RHS c11 1.751420000000e+03
122+
RHS c15 -1.926560000000e+03
123+
RHS c16 -1.379760000000e+03
124+
RHS c18 1.821870000000e+03
125+
RHS c19 -1.226870000000e+03
126+
RHS c30 2.301000000000e+01
127+
RHS c_b -6.806710000000e+04
128+
BOUNDS
129+
LO BND a -1.000000000000e+02
130+
UP BND b 1.000000000000e+02
131+
LO BND c -1.000000000000e+02
132+
LO BND d -1.000000000000e+02
133+
UP BND d 1.000000000000e+02
134+
LO BND f -1.000000000000e+02
135+
LO BND g -1.000000000000e+02
136+
UP BND g 1.000000000000e+02
137+
LO BND h -1.000000000000e+02
138+
LO BND i -1.000000000000e+02
139+
UP BND i 1.000000000000e+02
140+
ENDATA

extern/rcm/LICENSE

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (c) 2005 Alan George, Joseph Liu, John Burkardt.
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in all
11+
copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19+
SOFTWARE.

extern/zstr/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) 2015 Matei David, Ontario Institute for Cancer Research
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

extern/zstr/README

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)