decogo.problem.inner_master_problem¶
This module implements inner master problem.
Classes
|
This class defines extended inner master problem which is solved over the convex hull of inner points regarding hyper-blocks (overlapping convex hull relaxation). |
|
This class defines inner master problem which is solved over the convex hull of inner points. |
|
mini inner master problem for fast minlp (hyper-block) sub-problem solving. |
- class decogo.problem.inner_master_problem.InnerMasterProblem(block_model, approx_data)[source]¶
This class defines inner master problem which is solved over the convex hull of inner points.
\[\begin{equation} \begin{split} \min \ & c^T x(z) + \sum\limits_{i \in [m]} \gamma_i s_i, \newline &Ax(z) \leq b + s, \newline &\sum_{j \in [S_k]} z_{kj}=1, \newline & x_k(z_k) = \sum_{j \in [S_k]} z_{kj} y_{kj}, \newline &z_{kj} \geq 0, j \in [S_k], k \in K, & s \geq 0, \gamma > 0 \end{split} \end{equation}\]where \(S_k \subset \mathbb{R}^{n_k}\) is a set of inner points.
The problem is constructed in the transformed space in the following way
\[\begin{equation} \begin{split} \min &\sum\limits_{k \in K} w_{k0}(z_k) + \sum\limits_{i \in [m]} \gamma_i s_i, \newline & \sum\limits_{k \in K} w_{k}(z_k) \leq b + s, \newline &\sum_{j \in [R_k]} z_{kj}=1, z_{kj} \geq 0, \newline &w_k(z_k)=\sum_{j \in [R_k]} z_{kj}r_{kj}, \newline &j \in [R_k], k \in K, s \geq 0,\gamma > 0 \end{split} \end{equation}\]where \(R_k \subset \mathbb{R}^{m + 1}\) is a set of columns.
- Parameters:
block_model (BlockModel) – Block model
approx_data (ApproxData) – Class that stores inner points and columns
- add_column(block_id)[source]¶
Adds a new column for block by the following procedure:
Add a new variable \(z\)
Update the objective with a new column (at zero index)
Update the global constraints with the new column
- Parameters:
block_id (int) – Block identifier
- set_slack_weights(slack_weights)[source]¶
Sets slack weights in the objective function
- Parameters:
slack_weights (ndarray) – Values for slack weights
- compute_and_set_default_slack_weights()[source]¶
Computes slack weights by defaults method, i.e. it is computed based on the zero resource of all columns in the following way \(\gamma_i = 1.1\max\limits_{w_j \in R_k, k \in K} w_{j0}, i \in [m]\)
- solve(solver_name)[source]¶
Solves the problem by calling an external solver
- Parameters:
solver_name (str) – External solver name
- Returns:
Index of active cells blockwise, weights of the columns \(z\), solution in original space, solution in image space, slack values, dual solution and objective value
- Return type:
tuple
Note
The comments where the dual values are extracted
- class decogo.problem.inner_master_problem.MiniInnerMasterProblem(block_model, approx_data)[source]¶
mini inner master problem for fast minlp (hyper-block) sub-problem solving. Multiple instances can be constructed for parallel computing of sub-problems.
- class decogo.problem.inner_master_problem.ExtendedInnerMasterProblem(block_model, approx_data)[source]¶
This class defines extended inner master problem which is solved over the convex hull of inner points regarding hyper-blocks (overlapping convex hull relaxation).
\[\begin{equation} \begin{split} \min \ & c^T x(z) + \sum\limits_{i \in [m]} \gamma_i s_i, \newline &Ax(z) \leq b + s, \newline &\sum_{j \in [S_t]} z_{tj}=1, \newline & x_t(z_t) = \sum_{j \in [S_t]} z_{tj} y_{tj}, \newline &z_{tj} \geq 0, j \in [S_t], t \in T, & s \geq 0, \gamma > 0 \end{split} \end{equation}\]where \(S_t \subset \mathbb{R}^{n_t}\) is a set of inner points; \(T\) is the set of hyper-blocks.
The problem is constructed in the transformed space in the following way
\[\begin{equation} \begin{split} \min &\sum\limits_{k \in K} w_{k0}(z_k) + \sum\limits_{i \in [m]} \gamma_i s_i, \newline & \sum\limits_{t \in T} w_{t}(z_t) \leq b + s, \newline &\sum_{j \in [R_t]} z_{tj}=1, z_{tj} \geq 0, \newline &w_t(t_k)=\sum_{j \in [R_t]} z_{tj}r_{tj}, \newline &j \in [R_t], t \in T, s \geq 0,\gamma > 0 \end{split} \end{equation}\]where \(R_t \subset \mathbb{R}^{m + 1}\) is a set of columns. \(T\) is the set of hyper-blocks, and \(K\) is a subset of hyper-blocks that is non-overlapping.
- Parameters:
block_model (BlockModel) – Block model
approx_data (ApproxData) – Class that stores inner points and columns
- add_column(block_id)[source]¶
Adds a new column for block by the following procedure:
Add a new variable \(z\)
Update the objective with a new column (at zero index)
Update the global constraints with the new column
- Parameters:
block_id (int) – Block identifier
- set_slack_weights(slack_weights)[source]¶
Sets slack weights in the objective function
- Parameters:
slack_weights (ndarray) – Values for slack weights
- compute_and_set_default_slack_weights()[source]¶
Computes slack weights by defaults method, i.e. it is computed based on the zero resource of all columns in the following way \(\gamma_i = 1.1\max\limits_{w_j \in R_k, k \in K} w_{j0}, i \in [m]\)
- solve(solver_name)[source]¶
Solves the problem by calling an external solver
- Parameters:
solver_name (str) – External solver name
- Returns:
Index of active cells blockwise, weights of the columns \(z\), solution in original space, solution in image space, slack values, dual solution and objective value
- Return type:
tuple
Note
The comments where the dual values are extracted