Skip to main content

scirs2_optimize/decomposition/
mod.rs

1//! Decomposition methods for large-scale optimization
2//!
3//! This module provides classical decomposition approaches that exploit
4//! problem structure to break large optimization problems into manageable
5//! subproblems.
6//!
7//! # Methods
8//!
9//! - [`BendersDecomposition`]: Decomposes mixed problems into master + subproblems
10//! - [`DantzigWolfe`]: Column generation for structured LP/NLP
11//! - [`Admm`]: Alternating direction method of multipliers for consensus problems
12//! - [`ProximalBundle`]: Bundle method for nonsmooth convex optimization
13//!
14//! # Example
15//!
16//! ```no_run
17//! use scirs2_optimize::decomposition::{Admm, AdmmOptions};
18//!
19//! // Solve: min x^2 + ||z-1||^2 s.t. x = z
20//! let result = Admm::default().solve(
21//!     |x: &[f64]| x[0].powi(2),
22//!     |v: &[f64], rho: f64| {
23//!         vec![(1.0 + rho * 0.5 * v[0]) / (1.0 + rho * 0.5)]
24//!     },
25//!     &[1.0],
26//! ).expect("valid input");
27//! println!("x* = {:?}, f = {}", result.x, result.fun);
28//! ```
29
30pub mod benders;
31
32pub use benders::{
33    Admm, AdmmOptions, AdmmResult, BendersDecomposition, BendersOptions, BendersResult,
34    DantzigWolfe, DantzigWolfeOptions, DantzigWolfeResult, ProximalBundle, ProximalBundleOptions,
35    ProximalBundleResult,
36};