Package pypower :: Module poly2pwl
[hide private]
[frames] | no frames]

Module poly2pwl

source code

Converts polynomial cost variable to piecewise linear.

Functions [hide private]
 
poly2pwl(polycost, Pmin, Pmax, npts)
Converts polynomial cost variable to piecewise linear.
source code
Variables [hide private]
  __package__ = 'pypower'
Function Details [hide private]

poly2pwl(polycost, Pmin, Pmax, npts)

source code 

Converts polynomial cost variable to piecewise linear.

Converts the polynomial cost variable polycost into a piece-wise linear cost by evaluating at zero and then at npts evenly spaced points between Pmin and Pmax. If Pmin <= 0 (such as for reactive power, where P really means Q) it just uses npts evenly spaced points between Pmin and Pmax.