Files
Ai/irrigation/apps.py
T

51 lines
1.5 KiB
Python
Raw Normal View History

2026-04-24 18:34:17 +03:30
from functools import cached_property
2026-03-19 22:54:29 +03:30
from django.apps import AppConfig
class IrrigationConfig(AppConfig):
default_auto_field = "django.db.models.BigAutoField"
name = "irrigation"
verbose_name = "Irrigation"
2026-04-24 18:34:17 +03:30
tone_file = "config/tones/irrigation_tone.txt"
@cached_property
def optimizer_defaults(self):
return {
"validity_days": 3,
"minimum_event_mm": 4.0,
"significant_rain_threshold_mm": 4.0,
"stage_targets": {
"initial": 65,
"vegetative": 70,
"flowering": 75,
"fruiting": 68,
},
"strategy_profiles": [
{
"code": "conservative",
"label": "آبیاری محافظه کارانه",
"multiplier": 0.82,
"frequency_factor": 0.85,
"event_count": 2,
},
{
"code": "balanced",
"label": "آبیاری متعادل",
"multiplier": 1.0,
"frequency_factor": 1.0,
"event_count": 3,
},
{
"code": "protective",
"label": "آبیاری حمایتی",
"multiplier": 1.12,
"frequency_factor": 1.2,
"event_count": 4,
},
],
}
def get_optimizer_defaults(self):
return self.optimizer_defaults