dwave.optimization.model.Model.integer#

Model.integer(shape=None, lower_bound=None, upper_bound=None)#

Create an integer symbol as a decision variable.

Parameters:
  • shape – Shape of the integer array to create.

  • lower_bound – Lower bound for the symbol, which is the smallest allowed integer value. If None, the default value is used.

  • upper_bound – Upper bound for the symbol, which is the largest allowed integer value. If None, the default value is used.

Returns:

An integer symbol.

Examples

This example creates a \(20 \times 20\)-sized integer symbol.

>>> from dwave.optimization.model import Model
>>> model = Model()
>>> i = model.integer((20,20), lower_bound=-100, upper_bound=100)