def checkIrrev(solution, model):
    """ check the signs of the fluxes in 'solution' associated with irreversible
        reactions in the given model

    Returns negViolations, posViolations - {reaction : flux} dicts
    """
    negViolations, posViolations = {}, {}
    for rea in solution:
        if rea not in model.reactionDict:
            continue
        rea_index = model.reactionDict[rea]
        flux = solution[rea]
        if model.reactions[rea_index].lb >= 0.0 and flux < 0.0:
            negViolations[rea] = flux
        elif model.reactions[rea_index].ub <= 0.0 and flux > 0.0:
            posViolations[rea] = flux
    return negViolations, posViolations
