Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docstring for restricted master heuristic #543

Merged
merged 2 commits into from
Jun 13, 2021
Merged
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
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