Skip to content

Commit

Permalink
docstring for restricted master heuristic (#543)
Browse files Browse the repository at this point in the history
* docstring for restricted master heuristic

* Update src/Algorithm/conquer.jl
  • Loading branch information
guimarqu authored Jun 13, 2021
1 parent 0f405a6 commit fc9ba46
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
8 changes: 5 additions & 3 deletions src/Algorithm/Algorithm.jl
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,12 @@ export getterminationstatus, setterminationstatus!,

# Algorithm's types
export AbstractOptimizationAlgorithm, TreeSearchAlgorithm, ColCutGenConquer, ColumnGeneration,
BendersConquer, BendersCutGeneration, SolveIpForm, MoiOptimize, UserOptimizer,
BendersConquer, BendersCutGeneration, SolveIpForm, RestrictedMasterHeuristic,
SolveLpForm, ExactBranchingPhase, OnlyRestrictedMasterBranchingPhase, PreprocessAlgorithm,
RestrictedMasterIPHeuristic, OptimizationInput, OptimizationOutput, OptimizationState,
EmptyInput
OptimizationInput, OptimizationOutput, OptimizationState, EmptyInput

# Types of optimizers
export MoiOptimize, UserOptimizer

# Units
export PartialSolutionUnit, PreprocessingUnit
Expand Down
18 changes: 12 additions & 6 deletions src/Algorithm/conquer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,6 @@ end
# ParameterisedHeuristic
####################################################################

RestrictedMasterIPHeuristic() = SolveIpForm(moi_params = MoiOptimize(get_dual_bound = false))

struct ParameterisedHeuristic
algorithm::AbstractOptimizationAlgorithm
root_priority::Float64
Expand All @@ -80,8 +78,16 @@ struct ParameterisedHeuristic
name::String
end

DefaultRestrictedMasterHeuristic() =
ParameterisedHeuristic(RestrictedMasterIPHeuristic(), 1.0, 1.0, 1, 1000, "Restricted Master IP")
"""
Coluna.Algorithm.RestrictedMasterHeuristic()
This algorithm enforces integrality of column variables in the master formulation and then solves the master formulation with its optimizer.
"""
RestrictedMasterHeuristic() =
ParameterisedHeuristic(
SolveIpForm(moi_params = MoiOptimize(get_dual_bound = false)),
1.0, 1.0, 1, 1000, "Restricted Master IP"
)


####################################################################
Expand Down Expand Up @@ -118,7 +124,7 @@ end
"""
Coluna.Algorithm.ColCutGenConquer(
stages::Vector{ColumnGeneration} = [ColumnGeneration()]
primal_heuristics::Vector{ParameterisedHeuristic} = [DefaultRestrictedMasterHeuristic()]
primal_heuristics::Vector{ParameterisedHeuristic} = [RestrictedMasterHeuristic()]
preprocess = PreprocessAlgorithm()
cutgen = CutCallbacks()
run_preprocessing::Bool = false
Expand All @@ -133,7 +139,7 @@ several primal heuristics to more efficiently find feasible solutions.
"""
@with_kw struct ColCutGenConquer <: AbstractConquerAlgorithm
stages::Vector{ColumnGeneration} = [ColumnGeneration()]
primal_heuristics::Vector{ParameterisedHeuristic} = [DefaultRestrictedMasterHeuristic()]
primal_heuristics::Vector{ParameterisedHeuristic} = [RestrictedMasterHeuristic()]
preprocess = PreprocessAlgorithm()
cutgen = CutCallbacks()
max_nb_cut_rounds::Int = 3 # TODO : tailing-off ?
Expand Down
2 changes: 1 addition & 1 deletion test/user_algorithms_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ end
@with_kw struct ConsecutiveColGen <: AbstractOptimizationAlgorithm
colgen = ColumnGeneration(smoothing_stabilization = 1.0)
preprocess = PreprocessAlgorithm(preprocess_subproblems = true, printing = true)
rm_heur = RestrictedMasterIPHeuristic()
rm_heur = RestrictedMasterHeuristic()
num_calls_to_col_gen = 3
end

Expand Down

0 comments on commit fc9ba46

Please sign in to comment.