cv25 = CriterionValue(CriteriaSet(['c2', 'c5']), 0.1)
    cv34 = CriterionValue(CriteriaSet(['c3', 'c4']), 0.1)
    cv35 = CriterionValue(CriteriaSet(['c3', 'c5']), -0.1)
    cv45 = CriterionValue(CriteriaSet(['c4', 'c5']), -0.1)
    cvs = CriteriaValues([cv1, cv2, cv3, cv4, cv5, cv12, cv13, cv14, cv15,
                          cv23, cv24, cv25, cv34, cv35, cv45])

    lbda = 0.6

    model = MRSort(c, cvs, bpt, lbda, cps)

    print(model.lbda, model.cv)

    a = generate_alternatives(1000)
    pt = generate_random_performance_table(a, model.criteria)
    aa = model.get_assignments(pt)

    model.cv = None
    model.lbda = None
    mip = MipMRSortMobius(model, pt, aa)
    mip.solve()

    print(model.lbda, model.cv)

    aa2 = model.get_assignments(pt)

    for a in aa:
        a2 = aa2[a.id]
        if a.category_id != a2.category_id:
            print(a, a2)
    from pymcda.types import AlternativePerformances, PerformanceTable
    from pymcda.types import AlternativeAssignment, AlternativesAssignments

    # Generate a random ELECTRE TRI BM model
    random.seed(127890123456789)
    ncriteria = 5
    model = MRSort()
    model.criteria = generate_criteria(ncriteria)
    model.cv = CriteriaValues([CriterionValue('c%d' % (i + 1), 0.2)
                               for i in range(ncriteria)])
    b1 = AlternativePerformances('b1', {'c%d' % (i + 1): 0.5
                                        for i in range(ncriteria)})
    model.bpt = PerformanceTable([b1])
    cat = generate_categories(2)
    model.categories_profiles = generate_categories_profiles(cat)
    model.lbda = 0.6
    vb1 = AlternativePerformances('b1', {'c%d' % (i + 1): random.uniform(0,0.4)
                                         for i in range(ncriteria)})
    model.veto = PerformanceTable([vb1])
    model.veto_weights = model.cv.copy()
    model.veto_lbda = 0.4

    # Generate a set of alternatives
    a = generate_alternatives(1000)
    pt = generate_random_performance_table(a, model.criteria)
    aa = model.pessimist(pt)

    worst = pt.get_worst(model.criteria)
    best = b1

    print('Original model')