Example #1
0
def doyoutransmit(edge, dest):
    rating = dest.rating
    part_critic = edge.part
    proba_transmission = start_my_code.proba_transmission(part_critic, rating)
    a = numpy.random.random()
    if a <= proba_transmission:
        return True
    else:
        return False
Example #2
0
def computeavproba():
    av_rating = 1*start_my_code.RATING_1 + 2*start_my_code.RATING_2 + 3*start_my_code.RATING_3
    av_part = 1*start_my_code.CRITIC_1 + 2*start_my_code.CRITIC_2 +3*start_my_code.CRITIC_3
    av_proba = start_my_code.proba_transmission(av_part, av_rating)
    print av_proba
    return av_proba