Objectives

Helpers

PowerModelsDistribution.calc_pwl_pointsFunction
calc_pwl_points(ncost::Int, cost::Vector{<:Real}, pmin::Real, pmax::Real; tolerance=1e-2)

cleans up raw pwl cost points in preparation for building a mathamatical model. The key mathematical properties,

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