Conic solver (SOCP and beyond)

The ALGLIB numerical library includes an efficient, large-scale dense and sparse conic solver available in C++, C#, Java and other languages, capable of solving LP/QP/QCQP problems with additional conic constraints. The solver implements numerous algorithmic improvements, is actively developed and has been extensively tested on various industrial optimization problems. ALGLIB is dual-licensed, with free and commercial editions.

This section focuses on the conic programming capabilities of ALGLIB. While it is also applicable to purely quadratic problems (QP and QCQP), a separate section on QP/QCQP provides more focused discussion.

Contents

    1 Conic solver overview
           Features
           Programming languages supported
    2 Conic programming
           Problem formulation
           Cone types supported
           Differences from other conic solvers
           Dealing with nonconvexity
    3 Conic solver API
    4 Downloads section

Conic solver overview

Features

GENIPM, ALGLIB's conic solver, is:

Programming languages supported

ALGLIB supports many programming languages, including C++, C#, Java, Python, and others:

A distinctive feature of ALGLIB is that it provides the same API in all programming languages. This is achieved through our exclusive automatic code translation and wrapper generation technology.

Conic programming

Problem formulation

ALGLIB supports one of the most general and powerful formulations of a conic programming problem:

Let's break down this definition for clarity:

Cone types supported

As of ALGLIB 4.04, GENIPM supports the following cone types:

Strictly speaking, a generalized power cone with ∑αi<1 is not a cone, as it is not closed under positive scalar multiplication. For the definition to hold, ∑αi=1 is required. However, constraints with ∑αi<1 often appear in practice, with slack variables being used to make α sum to one. From the performance point of view, it is better to natively support such combinations in the GENIPM solver.

Differences from other conic solvers

The GENIPM quadratic/conic solver has several features that distinguish it from other conic solvers:

Dealing with nonconvexity

A convex optimization problem is one with convex objective and convex constraints. Convexity is an important property because it ensures that any local solution is also the global solution and that it can be efficiently found using interior point method. Conic programming is closely tied to convexity, as cones are convex by definition, and are designed to introduce structured nonlinearities into the convex optimization framework.

A problem becomes non-convex if its objective is non-convex (Q0 is indefinite) or if it includes non-convex constraints. A convex quadratic constraint is defined as one with Qi⪰0 and QL,i=-∞ (a positive semidefinite quadratic term without a lower bound). Any deviation from this rule introduces non-convexity. For instance, x2-y2≤1 is non-convex because the quadratic term is indefinite. What is interesting is that x2+y2≥1 is also non-convex as well as x2+y2=1.

Non-convexity is often associated with multiple extrema and NP-hardness. However, some non-convex problems may still have an unique local minimum that is also the global minimum. For example, the problem can be effectively convexified under constraints or minor non-convexities may exist without introducing multiple extrema. Thus, one can greatly benefit from being able to use conic constraints in a non-convex optimization framework.

An important caveat is that non-convex optimization also includes smooth problems that are effectively mixed-integer due to quadratic constraints enforcing integrality of variables. E.g., the constraint x2=1 restricts x to {-1,+1}, dividing the feasible set into disjoint regions. The GENIPM solver is not intended for such problems because it needs a smooth connected feasible set to explore. A specialized mixed integer solver should be used in such cases.

Some solvers address the challenge of mixed-integer tasks pretending to be smooth ones by prohibiting any non-convexity in the problem formulation. This approach allows them to focus on delivering reliable solutions to convex problems. At ALGLIB we take a different approach, prioritizing the provision of the most versatile and powerful solver, even if this occasionally results in its misuse.

Conic solver API

The QP/conic programming functionality is provided by the minqp subpackage of the Optimization package. The link above directs to the ALGLIB Reference Manual section, which includes a comprehensive description of the QP/conic solver API with detailed comments and examples.

Download ALGLIB for C++ / C# / Java / Python / ...

ALGLIB Project offers you two editions of ALGLIB:

ALGLIB Free Edition:
+delivered for free
+offers full set of numerical functionality
+extensive algorithmic optimizations
-no multithreading
-non-commercial license

ALGLIB Commercial Edition:
+flexible pricing
+offers full set of numerical functionality
+extensive algorithmic optimizations
+high performance (SMP, SIMD)
+commercial license with support plan

Links to download sections for Free and Commercial editions can be found below:

ALGLIB 4.04.0 for C++

C++ library.
Delivered with sources.
Monolithic design.
Extreme portability.
Editions:   FREE   COMMERCIAL

ALGLIB 4.04.0 for C#

C# library with native kernels.
Delivered with sources.
VB.NET and IronPython wrappers.
Extreme portability.
Editions:   FREE   COMMERCIAL

ALGLIB 4.04.0 for Java

Java wrapper around HPC core.
Delivered with sources.
Seamless integration with Java.
Editions:   FREE   COMMERCIAL

ALGLIB 4.04.0 for Delphi

Delphi wrapper around C core.
Delivered as precompiled binary.
Compatible with FreePascal.
Editions:   FREE   COMMERCIAL

ALGLIB 4.04.0 for CPython

CPython wrapper around C core.
Delivered as precompiled binary.
Editions:   FREE   COMMERCIAL