picos.solvers.solver_cplex

Implementation of CPLEXSolver.

Classes

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

Bases: 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 MetaConstraint(con, dim)

Bases: tuple

static __new__(_cls, con, dim)

Create new instance of MetaConstraint(con, dim)

con

Alias for field number 0

dim

Alias for field number 1

__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.

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

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',...