mirror of
https://github.com/andwati/telecom-platform.git
synced 2026-10-26 22:52:16 +00:00
refactor: Mark unused parameters with underscore and remove unused getHighestPriorityCarrier helper
- Mark unused model parameter with underscore in generateMaintenanceRecommendations - Mark unused context and period parameters with underscore in calculateCompetitiveIndex - Mark unused context parameter with underscore in calculateOptimizationROI - Mark unused data parameter with underscore in generateAnalysis - Mark unused ratePlan and data parameters with underscore in optimizeForCompetitive - Mark unused
This commit is contained in:
@@ -459,7 +459,7 @@ func (s *PredictiveMaintenanceService) predictFailureTime(asset *Asset, model *M
|
||||
}
|
||||
|
||||
// generateMaintenanceRecommendations generates maintenance recommendations
|
||||
func (s *PredictiveMaintenanceService) generateMaintenanceRecommendations(asset *Asset, model *MaintenanceModel) []string {
|
||||
func (s *PredictiveMaintenanceService) generateMaintenanceRecommendations(asset *Asset, _ *MaintenanceModel) []string {
|
||||
recommendations := make([]string, 0)
|
||||
|
||||
switch asset.Type {
|
||||
|
||||
@@ -39,7 +39,7 @@ func (s *PricingOptimizationService) calculateElasticity(_ context.Context, rate
|
||||
}
|
||||
|
||||
// calculateCompetitiveIndex calculates competitive positioning index using market analysis
|
||||
func (s *PricingOptimizationService) calculateCompetitiveIndex(ctx context.Context, period string) float64 {
|
||||
func (s *PricingOptimizationService) calculateCompetitiveIndex(_ context.Context, _ string) float64 {
|
||||
// Advanced competitive index calculation based on multiple factors
|
||||
// In production, this would analyze real competitor data
|
||||
|
||||
@@ -71,7 +71,7 @@ func (s *PricingOptimizationService) calculateCompetitiveIndex(ctx context.Conte
|
||||
}
|
||||
|
||||
// calculateOptimizationROI calculates ROI from optimizations using financial modeling
|
||||
func (s *PricingOptimizationService) calculateOptimizationROI(ctx context.Context, period string) float64 {
|
||||
func (s *PricingOptimizationService) calculateOptimizationROI(_ context.Context, period string) float64 {
|
||||
// Advanced ROI calculation based on optimization effectiveness
|
||||
// In production, this would track actual optimization results
|
||||
|
||||
@@ -115,7 +115,7 @@ func (s *PricingOptimizationService) calculateOptimizationROI(ctx context.Contex
|
||||
}
|
||||
|
||||
// generateAnalysis generates reasoning, risks, and recommendations
|
||||
func (s *PricingOptimizationService) generateAnalysis(ratePlan *RatePlan, optimalPrice float64, strategy OptimizationStrategy, data []HistoricalDataPoint) ([]string, []string, []string) {
|
||||
func (s *PricingOptimizationService) generateAnalysis(ratePlan *RatePlan, optimalPrice float64, strategy OptimizationStrategy, _ []HistoricalDataPoint) ([]string, []string, []string) {
|
||||
reasoning := make([]string, 0)
|
||||
risks := make([]string, 0)
|
||||
recommendations := make([]string, 0)
|
||||
|
||||
@@ -110,17 +110,17 @@ func (s *PricingOptimizationService) optimizeForProfitMargin(ratePlan *RatePlan,
|
||||
return math.Round(optimalPrice*100) / 100
|
||||
}
|
||||
|
||||
func (s *PricingOptimizationService) optimizeForCompetitive(ratePlan *RatePlan, data []HistoricalDataPoint) float64 {
|
||||
func (s *PricingOptimizationService) optimizeForCompetitive(_ *RatePlan, _ []HistoricalDataPoint) float64 {
|
||||
competitorPrices := []float64{9.99, 12.99, 14.99, 16.99}
|
||||
medianPrice := competitorPrices[len(competitorPrices)/2]
|
||||
return medianPrice * 0.95
|
||||
}
|
||||
|
||||
func (s *PricingOptimizationService) optimizeForChurnReduction(ratePlan *RatePlan, data []HistoricalDataPoint) float64 {
|
||||
func (s *PricingOptimizationService) optimizeForChurnReduction(ratePlan *RatePlan, _ []HistoricalDataPoint) float64 {
|
||||
return ratePlan.BasePrice * 0.9
|
||||
}
|
||||
|
||||
func (s *PricingOptimizationService) predictOutcomes(ratePlan *RatePlan, price float64, data []HistoricalDataPoint) (float64, int64) {
|
||||
func (s *PricingOptimizationService) predictOutcomes(_ *RatePlan, price float64, data []HistoricalDataPoint) (float64, int64) {
|
||||
demand := s.predictDemand(price, data)
|
||||
return price * float64(demand), demand
|
||||
}
|
||||
|
||||
@@ -22,6 +22,6 @@ func (s *PricingOptimizationService) getPeriodStart(period string) time.Time {
|
||||
}
|
||||
|
||||
// getPeriodEnd returns end date for period
|
||||
func (s *PricingOptimizationService) getPeriodEnd(period string) time.Time {
|
||||
func (s *PricingOptimizationService) getPeriodEnd(_ string) time.Time {
|
||||
return time.Now()
|
||||
}
|
||||
|
||||
@@ -181,19 +181,3 @@ func (sa *SelectionAlgorithm) PredictPerformance(carrierID string, criteria *Sel
|
||||
func (sa *SelectionAlgorithm) GetCarrierPerformance(carrierID string) *PerformanceMetrics {
|
||||
return sa.mlModel.GetCarrierPerformance(carrierID)
|
||||
}
|
||||
|
||||
// getHighestPriorityCarrier returns the carrier with the highest priority
|
||||
func (sa *SelectionAlgorithm) getHighestPriorityCarrier(carriers []*Carrier) *Carrier {
|
||||
if len(carriers) == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
highestPriority := carriers[0]
|
||||
for _, carrier := range carriers {
|
||||
if carrier.Priority > highestPriority.Priority {
|
||||
highestPriority = carrier
|
||||
}
|
||||
}
|
||||
|
||||
return highestPriority
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user