Skip to content

Implementation of column generation#618

Open
angelafq wants to merge 36 commits intoPyomo:mainfrom
angelafq:feature/column_generation
Open

Implementation of column generation#618
angelafq wants to merge 36 commits intoPyomo:mainfrom
angelafq:feature/column_generation

Conversation

@angelafq
Copy link
Copy Markdown

This PR adds support for Column Generation (CG) and Dual Stabilized Column Generation (DCG) as hub algorithms in mpi-sppy, and introduces the PHSpoke class, addressing issue #617

Features:

  • CG Hub: Implements Dantzig–Wolfe decomposition for scenario-based models. Iteratively builds a restricted master problem (RMP), solves for dual prices, broadcasts duals, and generates new columns by solving scenario subproblems.
  • DCG Hub: Adds a stabilized variant by solving the dual of the master problem (dRMP) with a quadratic regularization term around a reference dual value (“bundle center”). Bundle center updates when the lower bound improves, reducing dual variable oscillations and improving convergence.
  • PHSpoke: Implements a Progressive Hedging (PH) spoke, enabling communication of feasible solutions to CG based hubs.

New Classes:

  • CGBase (in cgbase.py): Base class for column generation algorithms.
  • CG (in cg.py): Implements the standard column generation algorithm.
  • DCG (in dualcg.py): Implements the dual stabilized column generation algorithm.
  • PHSpoke (in ph_spoke.py): Implements the Progressive Hedging spoke.

Integration with existing spokes is supported.

Tomas and others added 30 commits September 24, 2024 11:29
pulling recent updates from mpisppy repo

See merge request climate-ldrd/mpisppy-fork!3
merge cep_tomas into cep-main branch

See merge request climate-ldrd/mpisppy-fork!4
[WIP] working on dynamic sep rho; run generic_bash to see error; will have...

See merge request climate-ldrd/mpisppy-fork!5
Datahash extension & reading config options from file

See merge request climate-ldrd/mpisppy-fork!6
Merging updated main from github mpisppy

See merge request climate-ldrd/mpisppy-fork!7
Merging updates from mpisppy main

See merge request climate-ldrd/mpisppy-fork!8
Merging updated main branch from mpisppy repo

See merge request climate-ldrd/mpisppy-fork!10
merging updated main from mpisppy

See merge request climate-ldrd/mpisppy-fork!11
Merging mpisppy main to our mpisppy fork

See merge request climate-ldrd/mpisppy-fork!12
updating cep-main. Still the same as github main

See merge request climate-ldrd/mpisppy-fork!14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds Column Generation (CG) and Dual Stabilized Column Generation (DCG) as hub algorithms in mpi-sppy, plus a new PHSpoke and new spoke→hub data channel for feasible solutions.

Changes:

  • Introduces new optimizers: CG, DCG, and shared base CGBase, plus new hub types CGHub/DCGHub.
  • Adds a new spoke (PHSpoke) and a new SPWindow field (XFEAS) to transmit feasible solutions/costs from spokes to hubs.
  • Wires new CLI/config options and vanilla cylinder constructors for CG/DCG hubs and PH spoke integration.

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
mpisppy/utils/config.py Adds config sections/options for CG/DCG hubs and PH spoke.
mpisppy/utils/cfg_vanilla.py Adds vanilla constructors for CG/DCG hubs and PH spoke; tweaks timed_mipgap gating.
mpisppy/generic_cylinders.py Registers new args and plugs CG/DCG hubs + PH spoke into decomposition selection.
mpisppy/cgbase.py Implements the core column generation base algorithm and RMP plumbing.
mpisppy/opt/cg.py Adds the standard CG optimizer entrypoint.
mpisppy/opt/dualcg.py Adds dual-stabilized CG optimizer and dual master model.
mpisppy/cylinders/hub.py Adds CGHub/DCGHub and RECENT_XHATS circular buffer handling + XFEAS reception.
mpisppy/cylinders/spwindow.py Adds new Field.XFEAS and field-length mapping.
mpisppy/cylinders/spcommunicator.py Adds receivers for BEST_XHAT and XFEAS and a receiver for RECENT_XHATS lists.
mpisppy/cylinders/ph_spoke.py Adds new PH-based spoke that sends feasible solutions to hubs.
mpisppy/cylinders/subgradient_bounder.py Extends bound spoke to also send feasible solutions (XFEAS).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

cfg.default_rho = 1
else:
raise RuntimeError("No rho_setter so a default must be specified via --default-rho")
print("Warning: No rho_setter so a default must be specified via --default-rho")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using CG (or DualCG), a rho value is not necessarily required, so raising an error here would be too restrictive and could block valid configurations. That is why I changed this to a warning. A better long-term fix may be to make this check conditional on whether a PH-based hub or spoke is actually being used.

cfg.default_rho = 1
else:
raise RuntimeError("No rho_setter so a default must be specified via --default-rho")
print("Warning: No rho_setter so a default must be specified via --default-rho")
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When using CG (or DualCG), a rho value is not necessarily required, so raising an error here would be too restrictive and could block valid configurations. That is why I changed this to a warning. A better long-term fix may be to make this check conditional on whether a PH-based hub or spoke is actually being used.

@bknueven bknueven linked an issue Apr 3, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Column Generation

3 participants