dimod.ConstrainedQuadraticModel.from_lp_file#

classmethod ConstrainedQuadraticModel.from_lp_file(fp: BinaryIO | bytes | bytearray, lower_bound_default: float | None = None, upper_bound_default: float | None = None) ConstrainedQuadraticModel[source]#

Create a constrained quadratic model from an LP file.

Parameters:
  • fp – A file-like or a binary string.

  • lower_bound_default – Deprecated. Does nothing.

  • upper_bound_default – Deprecated. Does nothing.

Returns:

The constrained quadratic model defined by the LP file.

Deprecated since version 0.11.0: This method will be removed in dimod 0.13.0. Use load() or loads() instead.

Deprecated since version 0.11.0: The lower_bound_default and upper_bound_default keyword arguments are deprecated and do nothing.