Skip to content

Commit fbf94b5

Browse files
authored
Add support for HiGHS@1.9.0 (#261)
1 parent 96f277e commit fbf94b5

File tree

3 files changed

+75
-7
lines changed

3 files changed

+75
-7
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ PrecompileTools = "aea7be01-6a6a-4083-8856-8a6e6704d82a"
99
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
1010

1111
[compat]
12-
HiGHS_jll = "=1.5.1, =1.5.3, =1.6.0, =1.7.0, =1.7.1, =1.7.2, =1.8.0, =1.8.1"
12+
HiGHS_jll = "=1.5.1, =1.5.3, =1.6.0, =1.7.0, =1.7.1, =1.7.2, =1.8.0, =1.8.1, =1.9.0"
1313
MathOptInterface = "1.34"
1414
PrecompileTools = "1"
1515
SparseArrays = "1.6"

gen/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ HiGHS_jll = "8fd58aa0-07eb-5a78-9b36-339c94fd15ea"
44

55
[compat]
66
Clang = "0.17"
7-
HiGHS_jll = "1.7.0"
7+
HiGHS_jll = "1.9.0"

src/gen/libhighs.jl

Lines changed: 73 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -453,6 +453,60 @@ function Highs_passHessian(highs, dim, num_nz, format, start, index, value)
453453
ccall((:Highs_passHessian, libhighs), HighsInt, (Ptr{Cvoid}, HighsInt, HighsInt, HighsInt, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}), highs, dim, num_nz, format, start, index, value)
454454
end
455455

456+
"""
457+
Highs_passLinearObjectives(highs, num_linear_objective, weight, offset, coefficients, abs_tolerance, rel_tolerance, priority)
458+
459+
Passes multiple linear objective data to HiGHS, clearing any such data already in HiGHS
460+
461+
### Parameters
462+
* `highs`: A pointer to the Highs instance.
463+
* `weight`: A pointer to the weights of the linear objective, with its positive/negative sign determining whether it is minimized or maximized during lexicographic optimization
464+
* `offset`: A pointer to the objective offsets
465+
* `coefficients`: A pointer to the objective coefficients
466+
* `abs_tolerance`: A pointer to the absolute tolerances used when constructing objective constraints during lexicographic optimization
467+
* `rel_tolerance`: A pointer to the relative tolerances used when constructing objective constraints during lexicographic optimization
468+
* `priority`: A pointer to the priorities of the objectives during lexicographic optimization
469+
### Returns
470+
A `kHighsStatus` constant indicating whether the call succeeded.
471+
"""
472+
function Highs_passLinearObjectives(highs, num_linear_objective, weight, offset, coefficients, abs_tolerance, rel_tolerance, priority)
473+
ccall((:Highs_passLinearObjectives, libhighs), HighsInt, (Ptr{Cvoid}, HighsInt, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}), highs, num_linear_objective, weight, offset, coefficients, abs_tolerance, rel_tolerance, priority)
474+
end
475+
476+
"""
477+
Highs_addLinearObjective(highs, weight, offset, coefficients, abs_tolerance, rel_tolerance, priority)
478+
479+
Adds linear objective data to HiGHS
480+
481+
### Parameters
482+
* `highs`: A pointer to the Highs instance.
483+
* `weight`: The weight of the linear objective, with its positive/negative sign determining whether it is minimized or maximized during lexicographic optimization
484+
* `offset`: The objective offset
485+
* `coefficients`: A pointer to the objective coefficients
486+
* `abs_tolerance`: The absolute tolerance used when constructing an objective constraint during lexicographic optimization
487+
* `rel_tolerance`: The relative tolerance used when constructing an objective constraint during lexicographic optimization
488+
* `priority`: The priority of this objective during lexicographic optimization
489+
### Returns
490+
A `kHighsStatus` constant indicating whether the call succeeded.
491+
"""
492+
function Highs_addLinearObjective(highs, weight, offset, coefficients, abs_tolerance, rel_tolerance, priority)
493+
ccall((:Highs_addLinearObjective, libhighs), HighsInt, (Ptr{Cvoid}, Cdouble, Cdouble, Ptr{Cdouble}, Cdouble, Cdouble, HighsInt), highs, weight, offset, coefficients, abs_tolerance, rel_tolerance, priority)
494+
end
495+
496+
"""
497+
Highs_clearLinearObjectives(highs)
498+
499+
Clears any multiple linear objective data in HiGHS
500+
501+
### Parameters
502+
* `highs`: A pointer to the Highs instance.
503+
### Returns
504+
A `kHighsStatus` constant indicating whether the call succeeded.
505+
"""
506+
function Highs_clearLinearObjectives(highs)
507+
ccall((:Highs_clearLinearObjectives, libhighs), HighsInt, (Ptr{Cvoid},), highs)
508+
end
509+
456510
"""
457511
Highs_passRowName(highs, row, name)
458512
@@ -916,11 +970,11 @@ end
916970
"""
917971
Highs_getDualRay(highs, has_dual_ray, dual_ray_value)
918972
919-
Get an unbounded dual ray that is a certificate of primal infeasibility.
973+
Indicates whether a dual ray that is a certificate of primal infeasibility currently exists, and (at the expense of solving an LP) gets it if it does not and dual\\_ray\\_value is not nullptr.
920974
921975
### Parameters
922976
* `highs`: A pointer to the Highs instance.
923-
* `has_dual_ray`: A pointer to an int to store 1 if the dual ray exists.
977+
* `has_dual_ray`: A pointer to an int to store 1 if a dual ray currently exists.
924978
* `dual_ray_value`: An array of length [num\\_row] filled with the unbounded ray.
925979
### Returns
926980
A `kHighsStatus` constant indicating whether the call succeeded.
@@ -929,10 +983,24 @@ function Highs_getDualRay(highs, has_dual_ray, dual_ray_value)
929983
ccall((:Highs_getDualRay, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{HighsInt}, Ptr{Cdouble}), highs, has_dual_ray, dual_ray_value)
930984
end
931985

986+
"""
987+
Highs_getDualUnboundednessDirection(highs, has_dual_unboundedness_direction, dual_unboundedness_direction_value)
988+
989+
Indicates whether a dual unboundedness direction (corresponding to a certificate of primal infeasibility) exists, and (at the expense of solving an LP) gets it if it does not and dual\\_unboundedness\\_direction is not nullptr
990+
991+
### Parameters
992+
* `highs`: A pointer to the Highs instance.
993+
* `has_dual_unboundedness_direction`: A pointer to an int to store 1 if the dual unboundedness direction exists.
994+
* `dual_unboundedness_direction_value`: An array of length [num\\_col] filled with the unboundedness direction.
995+
"""
996+
function Highs_getDualUnboundednessDirection(highs, has_dual_unboundedness_direction, dual_unboundedness_direction_value)
997+
ccall((:Highs_getDualUnboundednessDirection, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{HighsInt}, Ptr{Cdouble}), highs, has_dual_unboundedness_direction, dual_unboundedness_direction_value)
998+
end
999+
9321000
"""
9331001
Highs_getPrimalRay(highs, has_primal_ray, primal_ray_value)
9341002
935-
Get an unbounded primal ray that is a certificate of dual infeasibility.
1003+
Indicates whether a primal ray that is a certificate of primal unboundedness currently exists, and (at the expense of solving an LP) gets it if it does not and primal\\_ray\\_value is not nullptr.
9361004
9371005
### Parameters
9381006
* `highs`: A pointer to the Highs instance.
@@ -2457,11 +2525,11 @@ const CMAKE_BUILD_TYPE = "Release"
24572525

24582526
const CMAKE_INSTALL_PREFIX = "/workspace/destdir"
24592527

2460-
const HIGHS_GITHASH = "fcfb53414"
2528+
const HIGHS_GITHASH = "66f735e60"
24612529

24622530
const HIGHS_VERSION_MAJOR = 1
24632531

2464-
const HIGHS_VERSION_MINOR = 8
2532+
const HIGHS_VERSION_MINOR = 9
24652533

24662534
const HIGHS_VERSION_PATCH = 0
24672535

0 commit comments

Comments
 (0)