Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use import MathOptInterface as MOI syntax #287

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/MOI_wrapper/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +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

include("scaled_psd_cone_bridge.jl")

MOI.Utilities.@product_of_sets(
Expand Down
2 changes: 1 addition & 1 deletion src/SCS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

module SCS

import MathOptInterface
import MathOptInterface as MOI
import Requires
import SCS_jll
import SparseArrays
Expand Down
6 changes: 3 additions & 3 deletions test/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@
module TestSCS

using Test
using MathOptInterface
import MathOptInterface as MOI
import SCS

const MOI = MathOptInterface

function runtests()
for name in names(@__MODULE__; all = true)
if startswith("$(name)", "test_")
Expand Down Expand Up @@ -96,6 +94,7 @@ function test_RawOptimizerAttribute()
MOI.set(model, MOI.RawOptimizerAttribute("eps_abs"), 2.0)
@test MOI.get(model, MOI.RawOptimizerAttribute("eps_abs")) == 2.0
@test MOI.get(model, MOI.RawOptimizerAttribute("eps_abs")) == 2.0
return
end

function test_constrained_variables()
Expand Down Expand Up @@ -142,6 +141,7 @@ function test_unsupported()
MOI.set(model, MOI.Test.UnknownConstraintAttribute(), c, 1.0)
err = MOI.UnsupportedAttribute{MOI.Test.UnknownConstraintAttribute}
@test_throws err MOI.optimize!(optimizer, model)
return
end

function test_empty_problem()
Expand Down
Loading