Disciplined Convex-Concave Programming

🚀 Join our CVXPY Discord Community

Discuss with fellow optimization enthusiasts.

DCCP extends CVXPY to solve nonconvex optimization problems using an organized heuristic for convex-concave programming.

Documentation contents

Quick Start

import cvxpy as cp
import dccp

# create a nonconvex problem
x = cp.Variable(2)
y = cp.Variable(2)
problem = cp.Problem(
    cp.Maximize(cp.norm(x - y, 2)),
    [0 <= x, x <= 1, 0 <= y, y <= 1]
)

# solve with DCCP
result = problem.solve(method='dccp')
print(f"Optimal value: {result}")

Key Features

  • Extends CVXPY: Seamlessly integrates with existing CVXPY code

  • Handles Nonconvex Problems: Solves problems where DCP rules are violated

  • Organized Heuristic: Systematic approach using convex-concave decomposition

  • Multiple Restarts: Built-in support for random initialization and restarts

When to Use DCCP

DCCP is designed for optimization problems where:

  • The objective or constraints are nonconvex

  • You need approximate solutions to NP-hard problems

  • All expressions have known curvature (not “UNKNOWN”)*

* some problems with unknown curvature can still be solved using DCCP. This requires CVXPY version 1.7.2 or later. To enable solving such problems we must also disable DCCP checks by setting verify_dccp parameter to False in the solve method. See Settings for details.


Paper: Disciplined Convex-Concave Programming