classmethod ConstrainedQuadraticModel.from_lp_file(fp: Union[BinaryIO, ByteString], lower_bound_default: Optional[int] = None, upper_bound_default: Optional[int] = None) ConstrainedQuadraticModel[source]

Create a constrained quadratic model from an LP file.

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

  • lower_bound_default – Deprecated. Does nothing.

  • upper_bound_default – Deprecated. Does nothing.


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.