def fastcc(model, epsilon, solver):
reaction_set = set(model.reactions)<EOL>subset = set(reaction_id for reaction_id in reaction_set<EOL>if model.limits[reaction_id].lower >= <NUM_LIT:0>)<EOL>logger.info('<STR_LIT>'.format(len(subset)))<EOL>logger.debug('<STR_LIT>'.format(len(subset), subset))<EOL>p = FastcoreProblem(model, solver, epsilon=epsilon)<EOL>p.lp7(subset)<EOL>consistent_subset = set(<EOL>reaction_id for reaction_id in model.reactions<EOL>if abs(p.get_flux(reaction_id)) >= <NUM_LIT> * epsilon)<EOL>logger.debug('<STR_LIT>'.format(<EOL>len(consistent_subset), consistent_subset))<EOL>for reaction in subset - consistent_subset:<EOL><INDENT>yield reaction<EOL><DEDENT>subset = (reaction_set - subset) - consistent_subset<EOL>logger.info('<STR_LIT>')<EOL>logger.debug('<STR_LIT>'.format(len(subset), subset))<EOL>flipped = False<EOL>singleton = False<EOL>while len(subset) > <NUM_LIT:0>:<EOL><INDENT>logger.info('<STR_LIT>'.format(<EOL>len(subset)))<EOL>if singleton:<EOL><INDENT>reaction = next(iter(subset))<EOL>subset_i = {reaction}<EOL>logger.debug('<STR_LIT>'.format(subset_i))<EOL>p.maximize({reaction: -<NUM_LIT:1> if p.is_flipped(reaction) else <NUM_LIT:1>})<EOL><DEDENT>else:<EOL><INDENT>subset_i = subset<EOL>logger.debug('<STR_LIT>'.format(subset_i))<EOL>p.lp7(subset_i)<EOL><DEDENT>consistent_subset.update(<EOL>reaction_id for reaction_id in subset<EOL>if abs(p.get_flux(reaction_id) >= <NUM_LIT> * epsilon))<EOL>logger.debug('<STR_LIT>'.format(<EOL>len(consistent_subset), consistent_subset))<EOL>if not subset.isdisjoint(consistent_subset):<EOL><INDENT>subset -= consistent_subset<EOL>logger.debug('<STR_LIT>'.format(len(subset), subset))<EOL>flipped = False<EOL><DEDENT>else:<EOL><INDENT>subset_rev_i = subset_i & model.reversible<EOL>if flipped or len(subset_rev_i) == <NUM_LIT:0>:<EOL><INDENT>flipped = False<EOL>if singleton:<EOL><INDENT>subset -= subset_rev_i<EOL>for reaction in subset_rev_i:<EOL><INDENT>logger.info('<STR_LIT>'.format(reaction))<EOL>yield reaction<EOL><DEDENT><DEDENT>else:<EOL><INDENT>singleton = True<EOL><DEDENT><DEDENT>else:<EOL><INDENT>p.flip(subset_rev_i)<EOL>flipped = True<EOL>logger.info('<STR_LIT>'.format(len(subset_rev_i)))<EOL><DEDENT><DEDENT><DEDENT>
Check consistency of model reactions.

    Yield all reactions in the model that are not part of the consistent
    subset.

    Args:
        model: :class:`MetabolicModel` to solve.
        epsilon: Flux threshold value.
        solver: LP solver instance to use.