jijzepttools.modeling.algorithm.dantzig_wolfe_decomposition.generate#

Classes#

MasterProblemVariables

Masterproblem variables

SubProblemVariables

Masterproblem variables

Functions#

generate_master_problem(→ jijmodeling.Problem)

generate master problem of Dantzig-Wolfe decomposition

generate_sub_problem(→ List[jijmodeling.Problem])

Module Contents#

class MasterProblemVariables#

Masterproblem variables

u#

decision variables of master problem

Type:

DecisionVar

p#

placeholder of decision variables

Type:

jm.Element

ph#

placeholders of decision variables, key is the name of decision variable

Type:

tp.Dict[str, jm.Placeholder]

u: jijzepttools.modeling.utils.type.DecisionVar#
p: jijmodeling.Element#
ph: Dict[str, jijmodeling.Placeholder]#
generate_master_problem(problem_name: str, sum_one_constraint_name: str, objective: jijzepttools.modeling.utils.type.Expr, overlapped_constraints: List[jijmodeling.Constraint], vars: MasterProblemVariables, sparse_variables: List[str]) jijmodeling.Problem#

generate master problem of Dantzig-Wolfe decomposition The generate master problem will have the following form: egin{align}

& min_{u} sum_{s=1}^{p} sum_{l=1}^{m_{sep}} sum_{j_l} c_{j_l} x_{j_l}^{(s)}u_s mathrm{s.t. }& sum_{s=1}^{p} sum_{l=1}^{m_{sep}} sum_{j_l} a_{k j_l}x_{j_l}^{(s)}u_s = b_k& sum_{s=1}^{p}u_s = 1& u_s geq 0 (s=1ldots p)

end{align}

Parameters:
  • problem_name (str) – name of master problem

  • sum_one_constraint_name (str) – name of sum one constraint

  • objective (Expr) – objective function

  • overlapped_constraints (tp.List[jm.Constraint]) – overlapped constraints

  • vars (MasterProblemVariables) – variables of master problem

  • placeholder_prefix (str, optional) – prefix of placeholder. Defaults to “”.

  • sparse_variables (tp.List[str]) – list of sparse variables

Returns:

master problem

Return type:

jm.Problem

class SubProblemVariables#

Masterproblem variables

lambd#

placeholders of dual variables, key is the name of constraints (only overlapped constraints are used)

Type:

tp.Dict[str, jm.Placeholder]

lambd: Dict[str, jijmodeling.Placeholder]#
generate_sub_problem(problem_name: str, objective: jijzepttools.modeling.utils.type.Expr, separated_constraints: List[List[jijmodeling.Constraint]], overlapped_constraints: List[jijmodeling.Constraint], vars: SubProblemVariables, disjoint_forall_holder: jijzepttools.modeling.algorithm.dantzig_wolfe_decomposition.utils.DisjointForallHolder, var_ref: List[jijmodeling.Subscript], add_overlapped_term_to_objective: bool = True, obj_expr_filter: Callable[[jijzepttools.modeling.utils.type.Expr], bool] = lambda expr: ...) List[jijmodeling.Problem]#