picos.solvers.solver_cplex

Implementation of CPLEXSolver.

Outline

Classes

CPLEXSolver

Interface to the CPLEX solver via its official Python interface.

Classes

CPLEXSolver

class picos.solvers.solver_cplex.CPLEXSolver(problem)[source]

Bases: picos.solvers.solver.Solver

Interface to the CPLEX solver via its official Python interface.

Note

Names are used instead of indices for identifying both variables and constraints since indices can change if the CPLEX instance is modified.

class CplexRSOCC(LHSVars, RHSVars, LHSCons, RHSCons, quadCon)

Bases: tuple

static __new__(_cls, LHSVars, RHSVars, LHSCons, RHSCons, quadCon)

Create new instance of CplexRSOCC(LHSVars, RHSVars, LHSCons, RHSCons, quadCon)

LHSCons

Alias for field number 2

LHSVars

Alias for field number 0

RHSCons

Alias for field number 3

RHSVars

Alias for field number 1

quadCon

Alias for field number 4

class CplexSOCC(LHSVars, RHSVar, LHSCons, RHSCon, quadCon)

Bases: tuple

static __new__(_cls, LHSVars, RHSVar, LHSCons, RHSCon, quadCon)

Create new instance of CplexSOCC(LHSVars, RHSVar, LHSCons, RHSCon, quadCon)

LHSCons

Alias for field number 2

LHSVars

Alias for field number 0

RHSCon

Alias for field number 3

RHSVar

Alias for field number 1

quadCon

Alias for field number 4

__init__(problem)[source]

Initialize a CPLEX solver interface.

Parameters

problem (Problem) – The problem to be solved.

classmethod default_penalty()[source]

Implement default_penalty.

classmethod names()[source]

Implement names.

reset_problem()[source]

Implement reset_problem.

classmethod supports(footprint)[source]

Implement supports.

classmethod test_availability()[source]

Implement test_availability.

SUPPORTED = <Specification: Optimize AffineExpression, QuadraticExpression subject to AffineConstraint, SOCConstraint, RSOCConstraint, ConvexQuadraticConstraint using any variables and any options.>
nextConstraintID = None

Used to create unique names for constraints.

Data

picos.solvers.solver_cplex.CPLEX_STATUS_CODES

Maps CPLEX status code to PICOS status triples.