def _pwl_costs(self, ny, nxyz, ipwl):
        """ Returns the piece-wise linear components of the objective function.
        """
        any_pwl = int(ny > 0)
        if any_pwl:
            y = self.om.get_var("y")
            # Sum of y vars.
            Npwl = csr_matrix((ones(ny), (zeros(ny), array(ipwl) + y.i1)))
            Hpwl = csr_matrix((1, 1))
            Cpwl = array([1])
            fparm_pwl = array([[1., 0., 0., 1.]])
        else:
            Npwl = None#zeros((0, nxyz))
            Hpwl = None#array([])
            Cpwl = array([])
            fparm_pwl = zeros((0, 4))

        return Npwl, Hpwl, Cpwl, fparm_pwl, any_pwl
Returns the piece-wise linear components of the objective function.