BCP (Branch-Cut-Price)

Parallel framework for branch-cut-price algorithms with column and cut generation

Layer 3

BCP: Branch-Cut-Price Framework

BCP is a parallel framework for implementing branch-cut-price algorithms. It handles the complexity of coordinating tree search across multiple processes while you focus on problem-specific logic.

Layer 3 | 125 annotated files | Column generation + cutting planes


Why BCP Matters

Branch-Cut-Price combines three powerful techniques:

BCP provides the parallel infrastructure so you can implement these techniques without writing distributed systems code.

When to use BCP: Problems with special structure where standard MIP solvers struggle. Classic examples: vehicle routing, crew scheduling, cutting stock, network design. If your problem has a natural decomposition or exponentially many variables, BCP may outperform Cbc.


Architecture Overview

BCP uses a master-worker architecture with specialized process types:

┌─────────────────────────────────────────────────────────────┐
│                    Tree Manager (TM)                        │
│  - Manages search tree and node selection                   │
│  - Tracks global upper/lower bounds                         │
│  - Schedules work to LP processes                           │
│  - Stores variables/cuts locally and distributed            │
└─────────────────────┬───────────────────────────────────────┘
                      │ assigns nodes
        ┌─────────────┼─────────────┐
        ▼             ▼             ▼
┌───────────┐   ┌───────────┐   ┌───────────┐
│  LP (0)   │   │  LP (1)   │   │  LP (n)   │
│           │   │           │   │           │
│ Solves LP │   │ Solves LP │   │ Solves LP │
│ relaxation│   │ relaxation│   │ relaxation│
└─────┬─────┘   └─────┬─────┘   └─────┬─────┘
      │               │               │
      ▼               ▼               ▼
┌───────────┐   ┌───────────┐   ┌───────────┐
│    CG     │   │    CG     │   │    VG     │
│ Cut Gen   │   │ Cut Gen   │   │ Var Gen   │
└───────────┘   └───────────┘   └───────────┘

Process Types

ProcessRoleKey Class
TM (Tree Manager)Coordinator: manages tree, bounds, schedulingBCP_tm_prob
LP (Linear Programming)Worker: solves relaxations, applies cuts/columnsBCP_lp_prob
CG (Cut Generator)Separation: finds violated inequalitiesBCP_cg_user
VG (Variable Generator)Pricing: generates improving columnsBCP_vg_user

User Customization

You implement problem-specific logic by subclassing user classes:

// Tree Manager customization
class MyTM : public BCP_tm_user {
    void create_root(BCP_vec<BCP_var*>& vars,
                     BCP_vec<BCP_cut*>& cuts);  // Initial formulation
    void display_feasible_solution(const BCP_solution* sol);
};

// LP process customization
class MyLP : public BCP_lp_user {
    OsiSolverInterface* initialize_solver_interface();
    BCP_solution* test_feasibility(const BCP_vec<BCP_var*>& vars);
    void generate_cuts_in_lp(BCP_vec<BCP_cut*>& cuts);
    void generate_vars_in_lp(BCP_vec<BCP_var*>& vars);
    BCP_branching_decision select_branching_candidates(...);
};

Included Applications

BCP ships with complete example applications demonstrating different algorithmic techniques:

Max-Cut

Graph partitioning to maximize cut weight. Demonstrates:

Cutting Stock (CSP)

1D bin packing via Dantzig-Wolfe decomposition. Demonstrates:

Multi-Commodity Flow (MCF)

Network flow with multiple commodities. Three variants demonstrate:

Branch-and-Cut Template (BAC)

Generic B&C skeleton showing indexed vs algorithmic cuts.


Key Concepts

Delta Encoding

BCP transmits node changes rather than full descriptions:

Indexed vs Algorithmic Objects

Two ways to represent variables and cuts:

TypeStorageUse Case
IndexedJust an index, coefficients computed from problem dataWhen structure allows reconstruction
AlgorithmicFull coefficient vector storedGeneral cuts/variables

Warm Starting

BCP_warmstart_basis stores simplex basis status for efficient re-optimization after branching. Supports both local storage and distributed checkpointing.


Source Files

Core Framework (Bcp/src/include/)

FileDescription
BCP_tm.hpp Tree Manager: parallel B&B coordinator
BCP_lp.hpp LP Worker: relaxation solving
BCP_cg.hpp Cut Generator process
BCP_vg.hpp Variable Generator process
BCP_branch.hpp Branching decision structures
BCP_cut.hpp Cut representation (core/indexed/algo)
BCP_var.hpp Variable representation

User Interface Classes

FileDescription
BCP_tm_user.hpp TM customization hooks
BCP_lp_user.hpp LP customization hooks
BCP_cg_user.hpp Cut generator hooks
BCP_vg_user.hpp Variable generator hooks

Getting Started

  1. Study an example: Start with Max-Cut (simplest) or CSP (column generation)
  2. Subclass user classes: Implement BCP_tm_user and BCP_lp_user at minimum
  3. Define your objects: Create BCP_var and BCP_cut subclasses for your problem
  4. Implement USER_initialize: Factory method to create your user objects
// Minimal entry point
class My_init : public USER_initialize {
    BCP_tm_user* tm_init(BCP_tm_prob& p, ...) { return new MyTM; }
    BCP_lp_user* lp_init(BCP_lp_prob& p) { return new MyLP; }
};

int main(int argc, char* argv[]) {
    My_init init;
    return bcp_main(argc, argv, &init);
}

References

Classes