ConstrainedQuadraticModel.fix_variables(fixed: Mapping[Hashable, float] | Iterable[Tuple[Hashable, float]], *, inplace: bool = True, cascade: bool | None = None) ConstrainedQuadraticModel[source]#

Fix the value of the variables and remove them.

  • fixed – Dictionary or iterable of 2-tuples of variable assignments.

  • inplace – If False, a new model is returned with the variables fixed.

  • cascade – Deprecated. Does nothing.


A constrained quadratic model. Itself by default, or a copy if inplace is set to False.

Deprecated since version 0.12.0: The cascade keyword argument will be removed in 0.14.0. It currently does nothing.