BlockSolverInterface module (dev)
The content of this section is not useful to the user of BlockDecomposition. It has implementation details about the connection of BlockDecomposition with the underlying solver. It is aimed mainly at developpers who would like to contribute to BlockDecomposition.
Decomposition data
set_constrs_decomposition!(s::AbstractMathProgSolver, data::Array)
sends to the solver s
in which subproblems are the constraints. Each element of the data
array is a Tuple
containing (constr_name::Symbol, constr_id::Tuple, sp_type::Symbol, sp_id::Tuple)
. constr_name
and constr_id
are the name and the index of the constraint in the JuMP model. sp_type
and sp_id
are the type and the index of the subproblem to which the constraint is assigned.
set_vars_decomposition!(s::AbstractMathProgSolver, data::Array)
sends to the solver s
in which subproblems are the variables. Each element of the data
array is a Tuple
containing (var_name::Symbol, var_id::Tuple, sp_type::Symbol, sp_id::Tuple)
. var_name
and var_id
are the name and the index of the variable in the JuMP model. sp_type
and sp_id
are the type and the index of the subproblem to which the variable is assigned.
BlockDecomposition creates the decomposition list for both constraints and variables regardless of the type of decomposition used. Types of subproblem are :
:DW_MASTER
Dantzig-Wolfe master problem:B_MASTER
Benders master problem:DW_SP
Dantzig-Wolfe subproblem:B_SP
Benders subproblem
Additional data to the decomposition
set_oracles!(s::AbstractMathProgSolver, oracles::Array)
sends to the solver s
the list
with subproblems and oracles functions. Each element of the oracles
array is a Tuple
containing (sp_id::Tuple, sp_type::Symbol, oracle::Function)
with oracle
, the function defined by the user.
set_sp_mult!(s::AbstractMathProgSolver, multiplicities::Array)
sends to the solver s
the multiplicity of each subproblem. Each element of the multiplicities
array is a Tuple
containing (sp_id::Tuple, sp_type::Symbol, mult_lb, mult_ub)
with mult_lb
the lower bound of the multiplicity and mult_ub
the upper bound of the multiplicity.
set_sp_prio!(s::AbstractMathProgSolver, priorities::Array)
sends to the solver s
the list of subproblem priorities. Each element of the data
array is a Tuple
containing (sp_id::Tuple, sp_type::Symbol, sp_prio)
.
set_var_branching_prio!(s::AbstractMathProgSolver, priorities::Array)
sends to the solver s
the list of variables branching priorities. The number stored at the row i
is the branching priority of the variable stored at the column i
in the JuMP model.
set_branching_rules!(s::AbstractMathProgSolver, rules::Dict{Symbol, Any})
sends to the solver s
a Dictionary rules
. The key is the name of the branching rule and the content is an array of branching instances. The array contains Tuple of variables name and parameters. Parameters are stored in an array of tuple (name_of_parameter, value_of_parameter).
For instance,
rules = (:branching_rule_name => [(:x, [(:priority, 1)]), (:y, [(:priority, 1)])])
Names of branching rules depend on solvers.
Additional data to the model
set_objective_bounds_and_magnitude!(s::AbstractMathProgSolver, magn, lb, ub)
sends to the solver s
the magnitude magn
, the lower bound lb
and the upper bound ub
of the objective function.
Send to the solver s
the magnitude magn
, the lower bound lb
and the upper bound ub
of the objective function.
Costs and solutions
getcurrentcost(m::AbstractMathProgModel, vcol::Integer)
returns the current cost of the vcol
${}^{th}$ variable.
getdisaggregatedvalueofvariable(m::AbstractMathProgModel, vcol::Integer)
returns the disaggregated value of the vcol
${}^{th}$ variable.
Oracle solver
set_oraclesolution_solution(o::OracleSolverData, x::JuMP.Variable, v::Real)
Set the value of the variable x
to v
in the oracle solver solution stored in the OracleSolverData
object o
.
set_oraclesolution_objval(o::OracleSolverData, v::Real)
Sets the objective value stored in the OracleSolverData
object o
to v
.
set_oraclesolution_newsolution(o::OracleSolverData)
creates a new solution in the oracle solver solution. It is usefull, if the user wants to return several solutions.
get_oracle_phaseofstageapproach(o::OracleSolverData)
Returns the phase of stage approach.