diff --git a/bpeng/pna/score_calculation.py b/bpeng/pna/score_calculation.py index 8b58ca0b2ca7e7b35a97541974881156a2863d92..c4266d21b9a8cd58cb07a730635139f92fe707fa 100644 --- a/bpeng/pna/score_calculation.py +++ b/bpeng/pna/score_calculation.py @@ -9,29 +9,29 @@ def calculate_score_weight(weight_list, details_list): index = weight_list[i][0]-1 score_weight[index] += weight_list[i][1] - heating_violations_score = [0, 1, 3, 5] - num = [0, 1, 3, 11] - for i in range(len(num)): - initial_value = heating_violations_score[i] - if not i == len(num)-1 and details_list['num_of_heating_violations'] < num[i+1]: - break - score_weight[0] += initial_value - - dob_violations_score = [5, 4, 3, 4, 5] - num = [0, 1, 4, 20, 100] - for i in range(len(num)): - initial_value = dob_violations_score[i] - if not i == len(num)-1 and details_list['num_of_dob_violations'] < num[i+1]: - break - score_weight[3] += initial_value - - ownership_scores = { - 'Single': 3, - 'LLC': 5, - 'Corporate': 5, - 'Non-Profit': 3 - } - score_weight[3] += ownership_scores[details_list['legal_ownership']] + # heating_violations_score = [0, 1, 3, 5] + # num = [0, 1, 3, 11] + # for i in range(len(num)): + # initial_value = heating_violations_score[i] + # if not i == len(num)-1 and details_list['num_of_heating_violations'] < num[i+1]: + # break + # score_weight[0] += initial_value + + # dob_violations_score = [5, 4, 3, 4, 5] + # num = [0, 1, 4, 20, 100] + # for i in range(len(num)): + # initial_value = dob_violations_score[i] + # if not i == len(num)-1 and details_list['num_of_dob_violations'] < num[i+1]: + # break + # score_weight[3] += initial_value + + # ownership_scores = { + # 'Single': 3, + # 'LLC': 5, + # 'Corporate': 5, + # 'Non-Profit': 3 + # } + # score_weight[3] += ownership_scores[details_list['legal_ownership']] for index in range(len(score_weight)): final_criteria_scores.append((index+1, score_weight[index]))