Force reactions in K above epsilon while minimizing support of P.

        This program forces reactions in subset K to attain flux > epsilon
        while minimizing the sum of absolute flux values for reactions
        in subset P (L1-regularization).

def lp10(self, subset_k, subset_p, weights={}):
        """Force reactions in K above epsilon while minimizing support of P.

        This program forces reactions in subset K to attain flux > epsilon
        while minimizing the sum of absolute flux values for reactions
        in subset P (L1-regularization).
        """

        if self._z is None:
            self._add_minimization_vars()

        positive = set(subset_k) - self._flipped
        negative = set(subset_k) & self._flipped

        v = self._v.set(positive)
        cs = self._prob.add_linear_constraints(v >= self._epsilon)
        self._temp_constr.extend(cs)

        v = self._v.set(negative)
        cs = self._prob.add_linear_constraints(v <= -self._epsilon)
        self._temp_constr.extend(cs)

        self._prob.set_objective(self._z.expr(
            (rxnid, -weights.get(rxnid, 1)) for rxnid in subset_p))

        self._solve()