Skip to content

Commit

Permalink
Implement getter for RawParameter
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Aug 12, 2020
1 parent 7789a12 commit d97bb5d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/solver.jl
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,7 @@ function get_option(m::Optimizer, s::Symbol)
getproperty(m.options, s)
end

function set_option(m::Optimizer, s::Symbol, val )
function set_option(m::Optimizer, s::Symbol, val)
setproperty!(m.options, s, val)
end

Expand Down Expand Up @@ -348,6 +348,9 @@ MOI.get(::Optimizer, ::MOI.SolverName) = "Alpine"
function MOI.set(model::Optimizer, param::MOI.RawParameter, value)
set_option(model, Symbol(param.name), value)
end
function MOI.set(model::Optimizer, param::MOI.RawParameter)
get_option(model, Symbol(param.name))
end

function MOI.add_variables(model::Optimizer, n::Int)
return [MOI.add_variable(model) for i in 1:n]
Expand Down

0 comments on commit d97bb5d

Please sign in to comment.