Skip to content

Commit

Permalink
fix constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
matbesancon committed May 14, 2018
1 parent 7b3a813 commit f296e13
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/SimpleProblem/SimpleProblem.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,22 @@ end
SimpleMasterProblem
Concrete implementation of MasterProblem.
"""
mutable struct SimpleMasterProblem{ST<:AbstractSubProblem,N1<:Number,N2<:Number} <: AbstractMasterProblem{ST}
A::AbstractMatrix{N1} # constraint matrix in original formulation
b::AbstractVector{N2} # right-hand side of linkin constraints
mutable struct SimpleMasterProblem{ST<:AbstractSubProblem,N1<:Number,N2<:Number,M<:AbstractMatrix{N1},V<:AbstractVector{N2}} <: AbstractMasterProblem{ST}
A::M # constraint matrix in original formulation
b::V # right-hand side of linkin constraints

rmp::MathProgBase.AbstractLinearQuadraticModel # restricted Master Problem
sp::ST # sub-problem
end

# TODO build convenient constructor functions for SimpleMasterProblem
function SimpleMasterProblem(
A::AbstractMatrix{N1},
senses::AbstractVector{Char},
b::AbstractVector{N2},
A::M,
senses::V1,
b::V2,
solver::MathProgBase.AbstractMathProgSolver,
sp::ST
) where {N1<:Number, N2<:Number, ST<:AbstractSubProblem}
) where {N1<:Number, N2<:Number, M<:AbstractMatrix{N1},V1<:AbstractVector{Char},V2<:AbstractVector{N2},ST<:AbstractSubProblem}

# dimension check
nlinkingconstrs = size(A, 1) # number of linking constraints
Expand Down

0 comments on commit f296e13

Please sign in to comment.