code: def init_limit(self, key, lower=None, upper=None, limit=False):
          
          above = agtb(self.__dict__[key], upper)
          for idx, item in enumerate(above):
              if item == 0.:
                  continue
              maxval = upper[idx]
              self.log(
                  '{0} <{1}.{2}> above its maximum of {3}.'.format(
                      self.name[idx], self._name, key, maxval), ERROR)
              if limit:
                  self.__dict__[key][idx] = maxval
  
          below = altb(self.__dict__[key], lower)
          for idx, item in enumerate(below):
              if item == 0.:
                  continue
              minval = lower[idx]
              self.log(
                  '{0} <{1}.{2}> below its minimum of {3}.'.format(
                      self.name[idx], self._name, key, minval), ERROR)
              if limit:
                  self.__dict__[key][idx] = minval
docs: check if data is within limits. reset if violates