Cutting Strategies#

Cut-generation implementations for the Euphemia decomposition loop.

Combinatorial Benders#

API path: apem.order_book_based_model.euphemia.cutting_strategies.combinatorial_benders

add_combinatorial_benders_cut(self, callback_model, price_subproblem)[source]#

Post a combinatorial Benders cut derived from an infeasible price model.

The routine computes an irreducible infeasible subset (IIS) of the pricing subproblem, maps IIS constraints back to master-problem acceptance variables, and posts a lazy cut that forces at least one implicated binary decision to change in future incumbents. If no master variables can be recovered from the IIS, it falls back to a no-good cut.

Parameters:
  • self (MasterProblem) – Active Euphemia master-problem instance.

  • callback_model (gurobipy.Model) – Gurobi callback model used to post the lazy cut.

  • price_subproblem (PriceSubproblem) – Infeasible pricing model associated with the current incumbent allocation.

Returns:

None.

Return type:

None

No-Good#

API path: apem.order_book_based_model.euphemia.cutting_strategies.no_good

add_no_good_cut(self, callback_model)[source]#

Post a generic no-good cut for the current master-problem incumbent.

The cut inspects all binary master variables in the callback model and constructs an exclusion constraint requiring at least one of them to flip value in future incumbents.

Parameters:
  • self (MasterProblem) – Active Euphemia master-problem instance.

  • callback_model (gurobipy.Model) – Gurobi callback model used to post the lazy cut.

Returns:

None.

Return type:

None

Price-Based#

API path: apem.order_book_based_model.euphemia.cutting_strategies.price_based

add_price_based_cut_to_block(self, callback_model, block_order)[source]#

Post a lazy price-based cut for one paradoxically accepted block order.

The cut combines the target block with accepted or rejected overlapping block orders, depending on whether the target block is a buy or sell order, and forces at least one of those binary acceptance decisions to change.

Parameters:
  • self (MasterProblem) – Active Euphemia master-problem instance.

  • callback_model (gurobipy.Model) – Gurobi callback model used to post the lazy cut.

  • block_order (Series) – Row describing the paradoxically accepted block order.

Returns:

None.

Return type:

None

handle_price_based_cutting(self, callback_model)[source]#

Build and post a price-based cut from the current incumbent solution.

The routine solves an unconstrained pricing subproblem that only includes step-order and piecewise-linear-order constraints. If prices are found, it updates provisional prices, identifies paradoxically accepted or rejected orders, and posts lazy cuts that deactivate the current infeasible economic pattern. If no informative price-based cut can be generated, it falls back to a no-good cut.

Parameters:
  • self (MasterProblem) – Active Euphemia master-problem instance.

  • callback_model (gurobipy.Model) – Gurobi callback model used to post lazy cuts.

Returns:

None.

Return type:

None