Successive Linear Programming β
Constrained
Successive Linear Programming (SLP) optimization algorithm.
Algorithm Overview β
!!! warning
This module is still under development and is not yet ready for use.
This module implements the Successive Linear Programming optimization algorithm. The algorithm performs a search for the optimal solution by iteratively updating a population of individuals. At each iteration, it computes the gradient of the objective function for each individual and uses linear programming to find a new solution that improves the objective function value. The process continues until the maximum number of iterations is reached.
The SuccessiveLinearProgramming class is the main class that implements the algorithm. It inherits from the AbstractOptimizer class and overrides the search() and gradient() methods.
Usage β
from opt.constrained.successive_linear_programming import SuccessiveLinearProgramming
from opt.benchmark.functions import sphere
optimizer = SuccessiveLinearProgramming(
func=sphere,
lower_bound=-5.12,
upper_bound=5.12,
dim=10,
max_iter=500,
population_size=50,
)
best_solution, best_fitness = optimizer.search()
print(f"Best solution: {best_solution}")
print(f"Best fitness: {best_fitness:.6e}")Parameters β
| Parameter | Type | Default | Description |
|---|---|---|---|
func | Callable | Required | Objective function to minimize. |
lower_bound | float | Required | Lower bound of search space. |
upper_bound | float | Required | Upper bound of search space. |
dim | int | Required | Problem dimensionality. |
max_iter | int | 1000 | Maximum SLP iterations. |
seed | int | None | None | Random seed for reproducibility. |
population_size | int | 100 | Population size for gradient estimation via finite differences. |
track_history | bool | False | Track optimization history for visualization |
Algorithm Metadata β
| Property | Value |
|---|---|
| Algorithm Name | Successive Linear Programming |
| Acronym | SLP |
| Year Introduced | 1961 |
| Authors | Griffith, R. E.; Stewart, R. A. |
| Algorithm Class | Constrained |
| Complexity | O(nΒ³) per LP subproblem |
| Properties | Gradient-based, Deterministic |
| Implementation | Python 3.10+ |
| COCO Compatible | Yes |
Mathematical Formulation β
At each iteration
where:
is current iterate is the search direction is gradient of objective are inequality constraints
Update:
Constraint handling:
- Boundary conditions: Box constraints in LP
- Feasibility enforcement: Linearized constraints
- Trust region: Implicit via bounds on search space
Hyperparameters β
| Parameter | Default | BBOB Recommended | Description |
|---|---|---|---|
| max_iter | 1000 | 5000-10000 | Maximum SLP iterations |
| population_size | 100 | 50-200 | Population for gradient est. |
Sensitivity Analysis:
population_size: Medium impact - affects gradient quality- Recommended tuning ranges:
COCO/BBOB Benchmark Settings β
Search Space:
- Dimensions tested:
2, 3, 5, 10, 20, 40 - Bounds: Function-specific (typically
[-5, 5]or[-100, 100]) - Instances: 15 per function (BBOB standard)
Evaluation Budget:
- Budget:
function evaluations - Independent runs: 15 (for statistical significance)
- Seeds:
0-14(reproducibility requirement)
Performance Metrics:
- Target precision:
1e-8(BBOB default) - Success rate at precision thresholds:
[1e-8, 1e-6, 1e-4, 1e-2] - Expected Running Time (ERT) tracking
Raises β
ValueError: If search space is invalid or function evaluation fails.
Notes β
- Uses scipy linprog for LP subproblems
- Finite difference gradient estimation
- BBOB: Returns final best solution after max_iter
Computational Complexity:
- Time per iteration:
for LP solve + for gradient - Space complexity:
for LP constraint matrices - BBOB budget usage: Typically 30-60% of dim*10000 for convergence
BBOB Performance Characteristics:
- Best function classes: Piecewise linear, highly constrained
- Weak function classes: Strongly nonlinear, smooth unconstrained
- Typical success rate at 1e-8 precision: 40-55% (dim=5, general problems)
- Expected Running Time (ERT): Slower than SQP for smooth problems
Convergence Properties:
- Convergence rate: Linear for general problems, quadratic at vertex optima
- Local vs Global: Limited global search, strong at feasible vertices
- Premature convergence risk: Medium (may zigzag near optimum)
Reproducibility:
- Deterministic: Yes - Same seed guarantees same results
- BBOB compliance: seed parameter required for 15 independent runs
- Initialization: Uniform random sampling in
[lower_bound, upper_bound] - RNG usage:
numpy.random.default_rng(self.seed)for population init
Implementation Details:
- Parallelization: Not supported (sequential LP solves)
- Constraint handling: Linearized constraints in LP subproblems
- Numerical stability: Finite difference gradients may be imprecise
- Inner solver: scipy.optimize.linprog with HiGHS method
- Gradient: Finite differences with Ξ΅=1e-5 perturbation
Known Limitations:
- Superseded by SQP for most smooth nonlinear problems
- Finite difference gradients less accurate than analytical
- Linear approximation poor for strongly nonlinear objectives
- May require many iterations for high-precision convergence
- BBOB adaptation note: Standard BBOB is unconstrained; SLP designed for constrained optimization
Version History:
- v0.1.0: Initial implementation
- v0.1.2: Added COCO/BBOB compliant docstring
References β
[1] Griffith, R. E., & Stewart, R. A. (1961). "A nonlinear programming technique for the optimization of continuous processing systems." Management Science, 7(4), 379-392. https://doi.org/10.1287/mnsc.7.4.379
[2] Palacios-Gomez, F., Lasdon, L., & Engquist, M. (1982). "Nonlinear optimization by successive linear programming." Management Science, 28(10), 1106-1120. https://doi.org/10.1287/mnsc.28.10.1106
[3] Nocedal, J., & Wright, S. J. (2006). "Numerical Optimization" (2nd ed.). Springer. Chapter 19: Sequential Linear Programming.
[4] Hansen, N., Auger, A., Ros, R., Mersmann, O., TuΕ‘ar, T., Brockhoff, D. (2021). "COCO: A platform for comparing continuous optimizers in a black-box setting." Optimization Methods and Software, 36(1), 114-144. https://doi.org/10.1080/10556788.2020.1808977
COCO Data Archive:
- Benchmark results: https://coco-platform.org/testsuites/bbob/data-archive.html
- Code repository: https://github.com/Anselmoo/useful-optimizer
Implementation:
- This implementation: scipy.optimize.linprog for LP subproblems
See Also β
SequentialQuadraticProgramming: Quadratic subproblem variant BBOB Comparison: SQP generally superior for smooth nonlinear problems
PenaltyMethodOptimizer: Penalty-based alternative BBOB Comparison: SLP better for highly constrained linear-like problems
AugmentedLagrangian: Penalty + multiplier method BBOB Comparison: ALM more robust for general nonlinear constraints
AbstractOptimizer: Base class for all optimizers opt.benchmark.functions: BBOB-compatible test functions
Related BBOB Algorithm Classes:
- Classical: SimulatedAnnealing, NelderMead
- Gradient: AdamW, BFGS
Benchmark Performance β
Results of the benchmark suite for this optimizer, on the same evaluation budget as every other optimizer and compared with a random search baseline. See the methodology for the protocol and statistics.
Related Pages β
Source Code
View the implementation: successive_linear_programming.py