diff --git a/backend/bot/cron_ai_engine.php b/backend/bot/cron_ai_engine.php index 87b6fd60..081005a3 100644 --- a/backend/bot/cron_ai_engine.php +++ b/backend/bot/cron_ai_engine.php @@ -74,12 +74,14 @@ try { } } + $bestTier = null; if ($bestFormula) { $bestKmRate = (float)$bestFormula['price_per_km']; $bestMinRate = (float)$bestFormula['price_per_min']; $bestBaseFare = (float)$bestFormula['base_fare']; $bestMinFare = (float)$bestFormula['min_fare']; $bestRSq = (float)($bestFormula['r_squared'] ?? 0); + $bestTier = $bestFormula['tier'] ?? 'standard'; } if ($bestKmRate === null) { @@ -93,7 +95,7 @@ try { $ourMinRate = round($bestMinRate * $discountFactor, 3); $ourBase = round($bestBaseFare * $discountFactor, 3); - echo " 📊 $countryName: Using formula (R²=$bestRSq)\n"; + echo " 📊 $countryName: Using formula [tier=$bestTier] (R²=$bestRSq)\n"; echo " Competitor: KM=$bestKmRate, MIN=$bestMinRate, Base=$bestBaseFare, MinFare=$bestMinFare\n"; echo " Siro (6.5% less): KM=$ourKmRate, MIN=$ourMinRate, Base=$ourBase\n";