dwave.optimization.model.Model.state_size#

Model.state_size()#

An estimate of the size, in bytes, of all states in the model.

Iterates over the model’s states and totals the sizes of all.

Examples

This example estimates the size of a model’s states.

>>> from dwave.optimization.model import Model
>>> model = Model()
>>> c = model.constant([1, 5, 8.4])
>>> i = model.integer(20, upper_bound=100)
>>> model.state_size()
184