code: def _adjust_limits(self):
          
          if not self.is_load:
  #            self.p_min = min([point[0] for point in self.p_cost])
              self.p_max = max([point[0] for point in self.p_cost])
          else:
              p_min = min([point[0] for point in self.p_cost])
              self.p_max = 0.0
              self.q_min = self.q_min * p_min / self.p_min
              self.q_max = self.q_max * p_min / self.p_min
              self.p_min = p_min
docs: Sets the active power limits, 'p_max' and 'p_min', according to
          the pwl cost function points.