Skip to content

Commit

Permalink
Remove support for SingleVariable objecive
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Oct 18, 2019
1 parent 3e99417 commit 4c33ed1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SDPA"
uuid = "b9a10b5b-afa4-512f-a053-bb3d8080febc"
repo = "https://github.com/JuliaOpt/SDPA.jl.git"
version = "0.2.0"
version = "0.2.1"

[deps]
BinaryProvider = "b99e7846-7c00-51b0-8f62-c81ae34c0232"
Expand All @@ -14,7 +14,7 @@ SemidefiniteModels = "169818f4-1a3d-53bf-95b3-11177825b1e3"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
BinaryProvider = "0.5.3"
BinaryProvider = "0.5.3"
CxxWrap = "= 0.8.1"
MathOptInterface = "0.9.5"
MathProgBase = "0.7"
Expand Down
8 changes: 2 additions & 6 deletions src/MOI_wrapper.jl
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,7 @@ end
function MOI.supports(
optimizer::Optimizer,
::Union{MOI.ObjectiveSense,
MOI.ObjectiveFunction{<:Union{MOI.SingleVariable,
MOI.ScalarAffineFunction{Cdouble}}}})
MOI.ObjectiveFunction{MOI.ScalarAffineFunction{Cdouble}}})
return true
end

Expand Down Expand Up @@ -123,7 +122,7 @@ function MOIU.allocate(optimizer::Optimizer, ::MOI.ObjectiveSense, sense::MOI.Op
# To be sure that it is done before load(optimizer, ::ObjectiveFunction, ...), we do it in allocate
optimizer.objsign = sense == MOI.MIN_SENSE ? -1 : 1
end
function MOIU.allocate(::Optimizer, ::MOI.ObjectiveFunction, ::Union{MOI.SingleVariable, MOI.ScalarAffineFunction}) end
function MOIU.allocate(::Optimizer, ::MOI.ObjectiveFunction, ::MOI.ScalarAffineFunction) end

function MOIU.load(::Optimizer, ::MOI.ObjectiveSense, ::MOI.OptimizationSense) end
# Loads objective coefficient α * vi
Expand All @@ -145,9 +144,6 @@ function MOIU.load(optimizer::Optimizer, ::MOI.ObjectiveFunction, f::MOI.ScalarA
end
end
end
function MOIU.load(optimizer::Optimizer, ::MOI.ObjectiveFunction, f::MOI.SingleVariable)
load_objective_term!(optimizer, one(Cdouble), f.variable)
end

function new_block(optimizer::Optimizer, set::MOI.Nonnegatives)
push!(optimizer.blockdims, -MOI.dimension(set))
Expand Down

2 comments on commit 4c33ed1

@blegat
Copy link
Member Author

@blegat blegat commented on 4c33ed1 Oct 18, 2019

Choose a reason for hiding this comment

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

@JuliaRegistrator register()

@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/4524

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 Julia TagBot is installed, or can be done manually through the github interface, or via:

git tag -a v0.2.1 -m "<description of version>" 4c33ed1db6a91d17ef7220351ffe5cd6ed712051
git push origin v0.2.1

Please sign in to comment.