add_increasing_constraints

(function from pyomo.contrib.cspline_external.cspline_parameters)

pyomo.contrib.cspline_external.cspline_parameters.add_increasing_constraints(m, tol=0)[source]

If the objective form of the parameter calculation is used, the data and the spline don’t need to match exactly, and we can add constraints on the derivatives that they are positive at the knots.

This doesn’t necessarily mean the cubic spline function is always increasing, since the segments are cubic, but you can either check the resulting curve or pair it with convex or concave constraints.