Update: 2026-07-08 23:37:26
This commit is contained in:
@@ -74,12 +74,14 @@ try {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bestTier = null;
|
||||||
if ($bestFormula) {
|
if ($bestFormula) {
|
||||||
$bestKmRate = (float)$bestFormula['price_per_km'];
|
$bestKmRate = (float)$bestFormula['price_per_km'];
|
||||||
$bestMinRate = (float)$bestFormula['price_per_min'];
|
$bestMinRate = (float)$bestFormula['price_per_min'];
|
||||||
$bestBaseFare = (float)$bestFormula['base_fare'];
|
$bestBaseFare = (float)$bestFormula['base_fare'];
|
||||||
$bestMinFare = (float)$bestFormula['min_fare'];
|
$bestMinFare = (float)$bestFormula['min_fare'];
|
||||||
$bestRSq = (float)($bestFormula['r_squared'] ?? 0);
|
$bestRSq = (float)($bestFormula['r_squared'] ?? 0);
|
||||||
|
$bestTier = $bestFormula['tier'] ?? 'standard';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($bestKmRate === null) {
|
if ($bestKmRate === null) {
|
||||||
@@ -93,7 +95,7 @@ try {
|
|||||||
$ourMinRate = round($bestMinRate * $discountFactor, 3);
|
$ourMinRate = round($bestMinRate * $discountFactor, 3);
|
||||||
$ourBase = round($bestBaseFare * $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 " Competitor: KM=$bestKmRate, MIN=$bestMinRate, Base=$bestBaseFare, MinFare=$bestMinFare\n";
|
||||||
echo " Siro (6.5% less): KM=$ourKmRate, MIN=$ourMinRate, Base=$ourBase\n";
|
echo " Siro (6.5% less): KM=$ourKmRate, MIN=$ourMinRate, Base=$ourBase\n";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user