Spaces:
Sleeping
Sleeping
Update scoring_calculation_system.py
Browse files
scoring_calculation_system.py
CHANGED
@@ -1769,7 +1769,7 @@ def calculate_breed_compatibility_score(scores: dict, user_prefs: UserPreference
|
|
1769 |
is_working_dog = any(trait in temperament
|
1770 |
for trait in ['herding', 'working', 'intelligent', 'tireless'])
|
1771 |
|
1772 |
-
# 空間權重調整
|
1773 |
if extremities['space'][0] == 'restricted':
|
1774 |
if extremities['exercise'][0] in ['high', 'extremely_high']:
|
1775 |
adjustments['space'] = 1.3
|
@@ -1778,15 +1778,15 @@ def calculate_breed_compatibility_score(scores: dict, user_prefs: UserPreference
|
|
1778 |
adjustments['space'] = 1.6
|
1779 |
adjustments['noise'] = 1.5
|
1780 |
|
1781 |
-
# 運動需求權重調整
|
1782 |
if extremities['exercise'][0] in ['extremely_high', 'extremely_low']:
|
1783 |
-
base_adjustment =
|
1784 |
if extremities['exercise'][0] == 'extremely_high':
|
1785 |
if is_working_dog:
|
1786 |
-
base_adjustment = 2.
|
1787 |
adjustments['exercise'] = base_adjustment
|
1788 |
|
1789 |
-
# 經驗需求權重調整
|
1790 |
if extremities['experience'][0] == 'low':
|
1791 |
adjustments['experience'] = 1.8
|
1792 |
if breed_info.get('Care Level') == 'HIGH':
|
|
|
1769 |
is_working_dog = any(trait in temperament
|
1770 |
for trait in ['herding', 'working', 'intelligent', 'tireless'])
|
1771 |
|
1772 |
+
# 空間權重調整
|
1773 |
if extremities['space'][0] == 'restricted':
|
1774 |
if extremities['exercise'][0] in ['high', 'extremely_high']:
|
1775 |
adjustments['space'] = 1.3
|
|
|
1778 |
adjustments['space'] = 1.6
|
1779 |
adjustments['noise'] = 1.5
|
1780 |
|
1781 |
+
# 運動需求權重調整
|
1782 |
if extremities['exercise'][0] in ['extremely_high', 'extremely_low']:
|
1783 |
+
base_adjustment = 2.0
|
1784 |
if extremities['exercise'][0] == 'extremely_high':
|
1785 |
if is_working_dog:
|
1786 |
+
base_adjustment = 2.3
|
1787 |
adjustments['exercise'] = base_adjustment
|
1788 |
|
1789 |
+
# 經驗需求權重調整
|
1790 |
if extremities['experience'][0] == 'low':
|
1791 |
adjustments['experience'] = 1.8
|
1792 |
if breed_info.get('Care Level') == 'HIGH':
|