RTND/py/read.py
def rd_get_fair_obj(cs):
    """
    cs: cases list
    bid: base case id
    """
    for c in cs:
        if c.id!=mc.CaseClass.base_case_id:
            improve = []
            for w in c.od:
                improve.append((cs[mc.CaseClass.base_case_id].od[w.id].mincost-w.mincost)/cs[mc.CaseClass.base_case_id].od[w.id].mincost)
                # c.fair=min(c.fair, w.mincost-cs[mc.CaseClass.base_case_id].od[w.id].mincost )
            c.fair = min(improve)
        else:
            c.fair=0
        pass

    cs: cases list
    bid: base case id
    
cases list
bid: base case id
cases list bid : base case id
def rd_get_fair_obj(cs):
    for c in cs:
        if c.id!=mc.CaseClass.base_case_id:
            improve = []
            for w in c.od:
                improve.append((cs[mc.CaseClass.base_case_id].od[w.id].mincost-w.mincost)/cs[mc.CaseClass.base_case_id].od[w.id].mincost)
            c.fair = min(improve)
        else:
            c.fair=0
        pass
def rd_get_fair_obj ( cs ) : for c in cs : if c . id != mc . CaseClass . base_case_id : improve = [ ] for w in c . od : improve . append ( ( cs [ mc . CaseClass . base_case_id ] . od [ w . id ] . mincost - w . mincost ) / cs [ mc . CaseClass . base_case_id ] . od [ w . id ] . mincost ) c . fair = min ( improve ) else : c . fair = 0 pass
cs: cases list
bid: base case id
cs : cases list bid : base case id
"""
    cs: cases list
    bid: base case id
    """ # c.fair=min(c.fair, w.mincost-cs[mc.CaseClass.base_case_id].od[w.id].mincost )
cs