Skip to content

Commit

Permalink
Update to v1.5.1 (#152)
Browse files Browse the repository at this point in the history
  • Loading branch information
odow authored Mar 10, 2023
1 parent 9121d40 commit 1754060
Show file tree
Hide file tree
Showing 5 changed files with 309 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name = "HiGHS"
uuid = "87dc4568-4c63-4d18-b0c0-bb2238e4078b"
version = "1.4.3"
version = "1.5.0"

[deps]
HiGHS_jll = "8fd58aa0-07eb-5a78-9b36-339c94fd15ea"
Expand All @@ -9,7 +9,7 @@ SnoopPrecompile = "66db9d55-30c0-4569-8b51-7e840670fc0c"
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"

[compat]
HiGHS_jll = "=1.2.0, =1.2.1, =1.2.2, =1.3.0, =1.4.0, =1.4.1, =1.4.2"
HiGHS_jll = "=1.5.1"
MathOptInterface = "1"
SnoopPrecompile = "1"
julia = "1.6"
Expand Down
2 changes: 1 addition & 1 deletion gen/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ HiGHS_jll = "8fd58aa0-07eb-5a78-9b36-339c94fd15ea"

[compat]
Clang = "0.14"
HiGHS_jll = "1.2.1"
HiGHS_jll = "1.5.1"
2 changes: 1 addition & 1 deletion src/HiGHS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
module HiGHS

import HiGHS_jll
import MathOptInterface
import MathOptInterface as MOI
import SparseArrays

function __init__()
Expand Down
12 changes: 7 additions & 5 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Use of this source code is governed by an MIT-style license that can be found
# in the LICENSE.md file or at https://opensource.org/licenses/MIT.

const MOI = MathOptInterface
const CleverDicts = MOI.Utilities.CleverDicts

@enum(
Expand Down Expand Up @@ -316,7 +315,8 @@ Base.unsafe_convert(::Type{Ptr{Cvoid}}, model::Optimizer) = model.inner
MOI.get(::Optimizer, ::MOI.SolverName) = "HiGHS"

function MOI.get(::Optimizer, ::MOI.SolverVersion)
return "v$(HIGHS_VERSION_MAJOR).$(HIGHS_VERSION_MINOR).$(HIGHS_VERSION_PATCH)"
X, Y, Z = Highs_versionMajor(), Highs_versionMinor(), Highs_versionPatch()
return "v$X.$Y.$Z"
end

function _check_ret(ret::HighsInt)
Expand Down Expand Up @@ -552,7 +552,7 @@ function _get_double_option(model::Optimizer, option::String)
end

function _get_string_option(model::Optimizer, option::String)
buffer = Vector{Cchar}(undef, 1024)
buffer = Vector{Cchar}(undef, kHighsMaximumStringLength)
bufferP = pointer(buffer)
GC.@preserve buffer begin
ret = Highs_getStringOptionValue(model, option, bufferP)
Expand Down Expand Up @@ -1790,9 +1790,11 @@ function MOI.get(model::Optimizer, ::MOI.TerminationStatus)
return MOI.TIME_LIMIT
elseif model.solution.model_status == kHighsModelStatusIterationLimit
return MOI.ITERATION_LIMIT
else
@assert model.solution.model_status == kHighsModelStatusUnknown
elseif model.solution.model_status == kHighsModelStatusUnknown
return MOI.OTHER_ERROR
else
@assert model.solution.model_status == kHighsModelStatusSolutionLimit
return MOI.SOLUTION_LIMIT
end
end

Expand Down
Loading

2 comments on commit 1754060

@odow
Copy link
Member Author

@odow odow commented on 1754060 Mar 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/79299

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v1.5.0 -m "<description of version>" 1754060e4b7d756749686a9b05583136e418efdd
git push origin v1.5.0

Please sign in to comment.