code: def pwl_to_poly(self):
          
          if self.pcost_model == PW_LINEAR:
              x0 = self.p_cost[0][0]
              y0 = self.p_cost[0][1]
              x1 = self.p_cost[1][0]
              y1 = self.p_cost[1][1]
              m = (y1 - y0) / (x1 - x0)
              c = y0 - m * x0
  
              self.pcost_model = POLYNOMIAL
              self.p_cost = (m, c)
          else:
              return
docs: Converts the first segment of the pwl cost to linear quadratic.
          FIXME: Curve-fit for all segments.