class_docstr: Basic rectangle representation using kiwi solver variables
class_docstr_tok: ["Basic","rectangle","representation","using","kiwi","solver","variables"]
code: def hard_constraints(self):
      hc = [
          self.width == self.right - self.left,
          self.height == self.top - self.bottom,
          self.h_center == (self.left + self.right) * 0.5,
          self.v_center == (self.top + self.bottom) * 0.5,
          self.width >= self.min_width,
          self.height >= self.min_height,
      ]
      for c in hc:
          self.solver.addConstraint(c | "required")
  
imports: from __future__ import absolute_import, division, print_function, unicode_literals
  import itertools
  import kiwisolver
  import logging
  import numpy
  import warnings
  import matplotlib
label_desc: Use image node_id 7 for calling the LayoutBox obj's underlying member method code with example usage: obj.hard_constraints() without return types