⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content
Open
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: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
matrix:
moi_test_modules:
- 'General;Benchmarks;FileFormats;Nonlinear'
- 'Bridges'
- 'Bridges/General'
- 'Bridges/Constraint;Bridges/Objective;Bridges/Variable'
- 'Test'
- 'Utilities'
Expand Down
4 changes: 3 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ LinearAlgebra = "1"
MutableArithmetics = "1"
NaNMath = "0.3, 1"
OrderedCollections = "1"
ParallelTestRunner = "2.1.0"
PrecompileTools = "1"
Printf = "1"
SparseArrays = "1"
Expand All @@ -46,6 +47,7 @@ julia = "1.10"
[extras]
LDLFactorizations = "40e66cde-538c-5869-a4ad-c39174c6795b"
JSONSchema = "7d188eb4-7ad8-530c-ae41-71a32a6d4692"
ParallelTestRunner = "d3525ed8-44d0-4b2c-a655-542cee43accc"

[targets]
test = ["LDLFactorizations", "JSONSchema"]
test = ["LDLFactorizations", "JSONSchema", "ParallelTestRunner"]
File renamed without changes.
14 changes: 0 additions & 14 deletions test/Bridges/Constraint/runtests.jl

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function runtests()
return
end

include("utilities.jl")
include("../utilities.jl")

struct DummyModelAttribute <: MOI.AbstractModelAttribute end

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,117 @@ function runtests()
return
end

include("utilities.jl")
include("sdpa_models.jl")
include("../utilities.jl")

# This block implements models similar to the SDPA format. It gives a good
# example because it does not support a lot of functions, hence the need for
# a lot of bridges.

MOI.Utilities.@model(
StandardSDPAModel,
(),
(MOI.EqualTo,),
(MOI.Nonnegatives, MOI.PositiveSemidefiniteConeTriangle),
(),
(),
(MOI.ScalarAffineFunction,),
(MOI.VectorOfVariables,),
()
)

function MOI.supports_constraint(
::StandardSDPAModel{T},
::Type{MOI.VariableIndex},
::Type{
<:Union{
MOI.GreaterThan{T},
MOI.LessThan{T},
MOI.EqualTo{T},
MOI.Interval{T},
MOI.ZeroOne,
MOI.Integer,
},
},
) where {T}
return false
end

function MOI.supports_constraint(
::StandardSDPAModel{T},
::Type{MOI.VectorOfVariables},
::Type{MOI.Reals},
) where {T}
return false
end

function MOI.supports_add_constrained_variables(
::StandardSDPAModel,
::Type{<:Union{MOI.Nonnegatives,MOI.PositiveSemidefiniteConeTriangle}},
)
return true
end

function MOI.supports_add_constrained_variables(
::StandardSDPAModel,
::Type{MOI.Reals},
)
return false
end

function MOI.supports(
::StandardSDPAModel{T},
::MOI.ObjectiveFunction{
<:Union{
MOI.VariableIndex,
MOI.ScalarQuadraticFunction{T},
MOI.ScalarNonlinearFunction,
MOI.VectorOfVariables,
MOI.VectorAffineFunction{T},
MOI.VectorQuadraticFunction{T},
MOI.VectorNonlinearFunction,
},
},
) where {T}
return false
end

MOI.Utilities.@model(
GeometricSDPAModel,
(),
(),
(MOI.Zeros, MOI.Nonnegatives, MOI.PositiveSemidefiniteConeTriangle),
(),
(),
(),
(),
(MOI.VectorAffineFunction,)
)

function MOI.supports_constraint(
::GeometricSDPAModel{T},
::Type{MOI.VariableIndex},
::Type{
<:Union{
MOI.GreaterThan{T},
MOI.LessThan{T},
MOI.EqualTo{T},
MOI.Interval{T},
MOI.ZeroOne,
MOI.Integer,
},
},
) where {T}
return false
end

function MOI.supports(
::GeometricSDPAModel{T},
::MOI.ObjectiveFunction{
<:Union{MOI.VariableIndex,MOI.ScalarQuadraticFunction{T}},
},
) where {T}
return false
end

function test_add_remove_has_bridges()
T = Int
Expand Down
File renamed without changes.
14 changes: 0 additions & 14 deletions test/Bridges/Objective/runtests.jl

This file was deleted.

File renamed without changes.
14 changes: 0 additions & 14 deletions test/Bridges/Variable/runtests.jl

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
16 changes: 0 additions & 16 deletions test/Bridges/runtests.jl

This file was deleted.

115 changes: 0 additions & 115 deletions test/Bridges/sdpa_models.jl

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions test/FileFormats/NL/NL.jl → test/FileFormats/NL/test_NL.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1535,6 +1535,3 @@ end
end

TestNLModel.runtests()

include("read.jl")
include("sol.jl")
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -36,30 +36,6 @@ function test_default_fallbacks()
return
end

function test_CBF()
return include(joinpath(@__DIR__, "CBF", "CBF.jl"))
end

function test_LP()
return include(joinpath(@__DIR__, "LP", "LP.jl"))
end

function test_MOF()
return include(joinpath(@__DIR__, "MOF", "MOF.jl"))
end

function test_MPS()
return include(joinpath(@__DIR__, "MPS", "MPS.jl"))
end

function test_NL()
return include(joinpath(@__DIR__, "NL", "NL.jl"))
end

function test_SDPA()
return include(joinpath(@__DIR__, "SDPA", "SDPA.jl"))
end

function test_copying()
models = [
MOI.FileFormats.CBF.Model,
Expand Down
22 changes: 0 additions & 22 deletions test/General/runtests.jl

This file was deleted.

File renamed without changes.
File renamed without changes.
Loading
Loading