Skip to content

Commit 7db9d47

Browse files
authoredOct 19, 2024
Update to HiGHS_jll@1.8.0 (#235)
1 parent c736c02 commit 7db9d47

File tree

2 files changed

+112
-21
lines changed

2 files changed

+112
-21
lines changed
 

‎Project.toml

+1-1
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"
12+
HiGHS_jll = "=1.5.1, =1.5.3, =1.6.0, =1.7.0, =1.7.1, =1.7.2, =1.8.0"
1313
MathOptInterface = "1.21"
1414
PrecompileTools = "1"
1515
SparseArrays = "1.6"

‎src/gen/libhighs.jl

+111-20
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@
88

99
const HighsInt = Cint
1010

11+
"""
12+
HighsCallbackDataOut
13+
14+
Struct to handle callback output data
15+
"""
1116
struct HighsCallbackDataOut
1217
log_type::Cint
1318
running_time::Cdouble
@@ -16,6 +21,7 @@ struct HighsCallbackDataOut
1621
pdlp_iteration_count::HighsInt
1722
objective_function_value::Cdouble
1823
mip_node_count::Int64
24+
mip_total_lp_iterations::Int64
1925
mip_primal_bound::Cdouble
2026
mip_dual_bound::Cdouble
2127
mip_gap::Cdouble
@@ -97,8 +103,8 @@ The signature of this method is identical to [`Highs_lpCall`](@ref), except that
97103
### Parameters
98104
* `q_num_nz`: The number of nonzeros in the Hessian matrix.
99105
* `q_format`: The format of the Hessian matrix in the form of a `kHighsHessianStatus` constant. If q\\_num\\_nz > 0, this must be `kHighsHessianFormatTriangular`.
100-
* `q_start`: The Hessian matrix is provided in the same format as the constraint matrix, using `q_start`, `q_index`, and `q_value` in the place of `a_start`, `a_index`, and `a_value`.
101-
* `q_index`: An array of length [q\\_num\\_nz] with indices of matrix sentries.
106+
* `q_start`: The Hessian matrix is provided to HiGHS as the lower triangular component in compressed sparse column form (or, equivalently, as the upper triangular component in compressed sparse row form). The sparse matrix consists of three arrays, `q_start`, `q_index`, and `q_value`. `q_start` is an array of length [num\\_col].
107+
* `q_index`: An array of length [q\\_num\\_nz] with indices of matrix entries.
102108
* `q_value`: An array of length [q\\_num\\_nz] with values of matrix entries.
103109
### Returns
104110
A `kHighsStatus` constant indicating whether the call succeeded.
@@ -195,18 +201,6 @@ function Highs_githash()
195201
ccall((:Highs_githash, libhighs), Ptr{Cchar}, ())
196202
end
197203

198-
"""
199-
Highs_compilationDate()
200-
201-
Return the HiGHS compilation date.
202-
203-
### Returns
204-
Thse HiGHS compilation date.
205-
"""
206-
function Highs_compilationDate()
207-
ccall((:Highs_compilationDate, libhighs), Ptr{Cchar}, ())
208-
end
209-
210204
"""
211205
Highs_readModel(highs, filename)
212206
@@ -237,6 +231,21 @@ function Highs_writeModel(highs, filename)
237231
ccall((:Highs_writeModel, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{Cchar}), highs, filename)
238232
end
239233

234+
"""
235+
Highs_writePresolvedModel(highs, filename)
236+
237+
Write the presolved model in `highs` to `filename`.
238+
239+
### Parameters
240+
* `highs`: A pointer to the Highs instance.
241+
* `filename`: The filename to write.
242+
### Returns
243+
A `kHighsStatus` constant indicating whether the call succeeded.
244+
"""
245+
function Highs_writePresolvedModel(highs, filename)
246+
ccall((:Highs_writePresolvedModel, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{Cchar}), highs, filename)
247+
end
248+
240249
"""
241250
Highs_clear(highs)
242251
@@ -413,7 +422,7 @@ Pass a model to HiGHS in a single function call. This is faster than constructin
413422
* `a_start`: The constraint matrix is provided to HiGHS in compressed sparse column form (if `a_format` is `kHighsMatrixFormatColwise`, otherwise compressed sparse row form). The sparse matrix consists of three arrays, `a_start`, `a_index`, and `a_value`. `a_start` is an array of length [num\\_col] containing the starting index of each column in `a_index`. If `a_format` is `kHighsMatrixFormatRowwise` the array is of length [num\\_row] corresponding to each row.
414423
* `a_index`: An array of length [num\\_nz] with indices of matrix entries.
415424
* `a_value`: An array of length [num\\_nz] with values of matrix entries.
416-
* `q_start`: The Hessian matrix is provided in the same format as the constraint matrix, using `q_start`, `q_index`, and `q_value` in the place of `a_start`, `a_index`, and `a_value`. If the model is linear, pass NULL.
425+
* `q_start`: The Hessian matrix is provided to HiGHS as the lower triangular component in compressed sparse column form (or, equivalently, as the upper triangular component in compressed sparse row form). The sparse matrix consists of three arrays, `q_start`, `q_index`, and `q_value`. `q_start` is an array of length [num\\_col]. If the model is linear, pass NULL.
417426
* `q_index`: An array of length [q\\_num\\_nz] with indices of matrix entries. If the model is linear, pass NULL.
418427
* `q_value`: An array of length [q\\_num\\_nz] with values of matrix entries. If the model is linear, pass NULL.
419428
* `integrality`: An array of length [num\\_col] containing a `kHighsVarType` constant for each column.
@@ -434,7 +443,7 @@ Set the Hessian matrix for a quadratic objective.
434443
* `dim`: The dimension of the Hessian matrix. Should be [num\\_col].
435444
* `num_nz`: The number of non-zero elements in the Hessian matrix.
436445
* `format`: The format of the Hessian matrix as a `kHighsHessianFormat` constant. This must be `kHighsHessianFormatTriangular`.
437-
* `start`: The Hessian matrix is provided to HiGHS as the upper triangular component in compressed sparse column form. The sparse matrix consists of three arrays, `start`, `index`, and `value`. `start` is an array of length [num\\_col] containing the starting index of each column in `index`.
446+
* `start`: The Hessian matrix is provided to HiGHS as the lower triangular component in compressed sparse column form (or, equivalently, as the upper triangular component in compressed sparse row form), using `q_start`, `q_index`, and `q_value`.The Hessian matrix is provided to HiGHS as the lower triangular component in compressed sparse column form. The sparse matrix consists of three arrays, `start`, `index`, and `value`. `start` is an array of length [num\\_col] containing the starting index of each column in `index`.
438447
* `index`: An array of length [num\\_nz] with indices of matrix entries.
439448
* `value`: An array of length [num\\_nz] with values of matrix entries.
440449
### Returns
@@ -476,6 +485,21 @@ function Highs_passColName(highs, col, name)
476485
ccall((:Highs_passColName, libhighs), HighsInt, (Ptr{Cvoid}, HighsInt, Ptr{Cchar}), highs, col, name)
477486
end
478487

488+
"""
489+
Highs_passModelName(highs, name)
490+
491+
Pass the name of the model.
492+
493+
### Parameters
494+
* `highs`: A pointer to the Highs instance.
495+
* `name`: The name of the model.
496+
### Returns
497+
A `kHighsStatus` constant indicating whether the call succeeded.
498+
"""
499+
function Highs_passModelName(highs, name)
500+
ccall((:Highs_passModelName, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{Cchar}), highs, name)
501+
end
502+
479503
"""
480504
Highs_readOptions(highs, filename)
481505
@@ -1138,6 +1162,23 @@ function Highs_setSolution(highs, col_value, row_value, col_dual, row_dual)
11381162
ccall((:Highs_setSolution, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}), highs, col_value, row_value, col_dual, row_dual)
11391163
end
11401164

1165+
"""
1166+
Highs_setSparseSolution(highs, num_entries, index, value)
1167+
1168+
Set a partial primal solution by passing values for a set of variables
1169+
1170+
### Parameters
1171+
* `highs`: A pointer to the Highs instance.
1172+
* `num_entries`: Number of variables in the set
1173+
* `index`: Indices of variables in the set
1174+
* `value`: Values of variables in the set
1175+
### Returns
1176+
A `kHighsStatus` constant indicating whether the call succeeded.
1177+
"""
1178+
function Highs_setSparseSolution(highs, num_entries, index, value)
1179+
ccall((:Highs_setSparseSolution, libhighs), HighsInt, (Ptr{Cvoid}, HighsInt, Ptr{HighsInt}, Ptr{Cdouble}), highs, num_entries, index, value)
1180+
end
1181+
11411182
"""
11421183
Highs_setCallback(highs, user_callback, user_callback_data)
11431184
@@ -2241,6 +2282,28 @@ function Highs_getRanging(highs, col_cost_up_value, col_cost_up_objective, col_c
22412282
ccall((:Highs_getRanging, libhighs), HighsInt, (Ptr{Cvoid}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}), highs, col_cost_up_value, col_cost_up_objective, col_cost_up_in_var, col_cost_up_ou_var, col_cost_dn_value, col_cost_dn_objective, col_cost_dn_in_var, col_cost_dn_ou_var, col_bound_up_value, col_bound_up_objective, col_bound_up_in_var, col_bound_up_ou_var, col_bound_dn_value, col_bound_dn_objective, col_bound_dn_in_var, col_bound_dn_ou_var, row_bound_up_value, row_bound_up_objective, row_bound_up_in_var, row_bound_up_ou_var, row_bound_dn_value, row_bound_dn_objective, row_bound_dn_in_var, row_bound_dn_ou_var)
22422283
end
22432284

2285+
"""
2286+
Highs_feasibilityRelaxation(highs, global_lower_penalty, global_upper_penalty, global_rhs_penalty, local_lower_penalty, local_upper_penalty, local_rhs_penalty)
2287+
2288+
Compute the solution corresponding to a (possibly weighted) sum of (allowable) infeasibilities in an LP/MIP.
2289+
2290+
If local penalties are not defined, pass NULL, and the global penalty will be used. Negative penalty values imply that the bound or RHS value cannot be violated
2291+
2292+
### Parameters
2293+
* `highs`: A pointer to the Highs instance.
2294+
* `const`: double global\\_lower\\_penalty The penalty for violating lower bounds on variables
2295+
* `const`: double global\\_upper\\_penalty The penalty for violating upper bounds on variables
2296+
* `const`: double global\\_rhs\\_penalty The penalty for violating constraint RHS values
2297+
* `const`: double* local\\_lower\\_penalty The penalties for violating specific lower bounds on variables
2298+
* `const`: double* local\\_upper\\_penalty The penalties for violating specific upper bounds on variables
2299+
* `const`: double* local\\_rhs\\_penalty The penalties for violating specific constraint RHS values
2300+
### Returns
2301+
A `kHighsStatus` constant indicating whether the call succeeded.
2302+
"""
2303+
function Highs_feasibilityRelaxation(highs, global_lower_penalty, global_upper_penalty, global_rhs_penalty, local_lower_penalty, local_upper_penalty, local_rhs_penalty)
2304+
ccall((:Highs_feasibilityRelaxation, libhighs), HighsInt, (Ptr{Cvoid}, Cdouble, Cdouble, Cdouble, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}), highs, global_lower_penalty, global_upper_penalty, global_rhs_penalty, local_lower_penalty, local_upper_penalty, local_rhs_penalty)
2305+
end
2306+
22442307
"""
22452308
Highs_resetGlobalScheduler(blocking)
22462309
@@ -2261,6 +2324,33 @@ function Highs_resetGlobalScheduler(blocking)
22612324
ccall((:Highs_resetGlobalScheduler, libhighs), Cvoid, (HighsInt,), blocking)
22622325
end
22632326

2327+
"""
2328+
Highs_getCallbackDataOutItem(data_out, item_name)
2329+
2330+
Get a void* pointer to a callback data item
2331+
2332+
### Parameters
2333+
* `data_out`: A pointer to the [`HighsCallbackDataOut`](@ref) instance.
2334+
* `item_name`: The name of the item.
2335+
### Returns
2336+
A void* pointer to the callback data item, or NULL if item\\_name not valid
2337+
"""
2338+
function Highs_getCallbackDataOutItem(data_out, item_name)
2339+
ccall((:Highs_getCallbackDataOutItem, libhighs), Ptr{Cvoid}, (Ptr{HighsCallbackDataOut}, Ptr{Cchar}), data_out, item_name)
2340+
end
2341+
2342+
"""
2343+
Highs_compilationDate()
2344+
2345+
Return the HiGHS compilation date.
2346+
2347+
### Returns
2348+
Thse HiGHS compilation date.
2349+
"""
2350+
function Highs_compilationDate()
2351+
ccall((:Highs_compilationDate, libhighs), Ptr{Cchar}, ())
2352+
end
2353+
22642354
function Highs_call(num_col, num_row, num_nz, col_cost, col_lower, col_upper, row_lower, row_upper, a_start, a_index, a_value, col_value, col_dual, row_value, row_dual, col_basis_status, row_basis_status, model_status)
22652355
ccall((:Highs_call, libhighs), HighsInt, (HighsInt, HighsInt, HighsInt, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{Cdouble}, Ptr{HighsInt}, Ptr{HighsInt}, Ptr{HighsInt}), num_col, num_row, num_nz, col_cost, col_lower, col_upper, row_lower, row_upper, a_start, a_index, a_value, col_value, col_dual, row_value, row_dual, col_basis_status, row_basis_status, model_status)
22662356
end
@@ -2367,13 +2457,11 @@ const CMAKE_BUILD_TYPE = "Release"
23672457

23682458
const CMAKE_INSTALL_PREFIX = "/workspace/destdir"
23692459

2370-
const HIGHS_GITHASH = "50670fd4c"
2371-
2372-
const HIGHS_COMPILATION_DATE = "1970-01-01"
2460+
const HIGHS_GITHASH = "fcfb53414"
23732461

23742462
const HIGHS_VERSION_MAJOR = 1
23752463

2376-
const HIGHS_VERSION_MINOR = 7
2464+
const HIGHS_VERSION_MINOR = 8
23772465

23782466
const HIGHS_VERSION_PATCH = 0
23792467

@@ -2416,6 +2504,7 @@ const kHighsPresolveStatusReducedToEmpty = HighsInt(4)
24162504
const kHighsPresolveStatusTimeout = HighsInt(5)
24172505
const kHighsPresolveStatusNullError = HighsInt(6)
24182506
const kHighsPresolveStatusOptionsError = HighsInt(7)
2507+
const kHighsPresolveStatusOutOfMemory = HighsInt(8)
24192508
const kHighsModelStatusNotset = HighsInt(0)
24202509
const kHighsModelStatusLoadError = HighsInt(1)
24212510
const kHighsModelStatusModelError = HighsInt(2)
@@ -2446,3 +2535,5 @@ const kHighsCallbackMipSolution = HighsInt(3)
24462535
const kHighsCallbackMipImprovingSolution = HighsInt(4)
24472536
const kHighsCallbackMipLogging = HighsInt(5)
24482537
const kHighsCallbackMipInterrupt = HighsInt(6)
2538+
const kHighsCallbackMipGetCutPool = HighsInt(7)
2539+
const kHighsCallbackMipDefineLazyConstraints = HighsInt(8)

0 commit comments

Comments
 (0)