picos.solvers.solver_cplex

Implementation of CPLEXSolver.

Classes

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 is_free()[source]

Implement is_free.

classmethod names()[source]

Implement names.

reset_problem()[source]

Implement reset_problem.

classmethod supports(footprint, explain=False)[source]

Implement supports.

classmethod test_availability()[source]

Implement test_availability.

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

Used to create unique names for constraints.

Objects

picos.solvers.solver_cplex.CPLEX_STATUS_CODES

Maps CPLEX status code to PICOS status triples.

Default value
{1: ('optimal', 'optimal', 'feasible'),
 2: ('unknown', 'infeasible', 'unbounded'),
 3: ('infeasible', 'unknown', 'infeasible'),
 4: ('unknown', 'unknown', 'infeasible or unbounded'),
 5: ('infeasible', 'unknown', 'unstable'),
 6: ('unknown',...