PowerModels includes support for cost functions provided as either univariate polynomials or piecewise linear functions. These functions are encoded in the generator and dcline components following the conventions of the Matpower data format. The implementation of the piecewise linear cost functions uses an auxiliary variable implementation often referred to as the $\lambda$ formulation. Additional information about this formulation and why it is used can be found in this technical report.

The objective functions that include the term fuel_and_flow capture cost functions on both generator and dcline components, while the names only including the term fuel work exclusively on generator components and ignore any cost data relating to dcline components.


cleans up raw pwl cost points in preparation for building a mathamatical model.

The key mathematical properties,

  • the first and last points are strictly outside of the pmin-to-pmax range
  • pmin and pmax occur in the first and last line segments.