from_docplex_mp#

from_docplex_mp(model, indicator_big_m=None)[fuente]#

Translate a docplex.mp model into a quadratic program.

Note that this supports the following features of docplex:

  • linear / quadratic objective function

  • linear / quadratic / indicator constraints

  • binary / integer / continuous variables

  • logical expressions (logical_not, logical_and, and logical_or)

Parámetros:
  • model (Model) – The docplex.mp model to be loaded.

  • indicator_big_m (float | None) – The big-M value used for the big-M formulation to convert indicator constraints into linear constraints. If None, it is automatically derived from the model.

Devuelve:

The quadratic program corresponding to the model.

Muestra:

QiskitOptimizationError – if the model contains unsupported elements.

Tipo del valor devuelto:

QuadraticProgram