Commit ·
a9ae8ce
1
Parent(s): efac84e
updated params for kochi system
Browse files
DataService/enhanced_generator.py
CHANGED
|
@@ -143,7 +143,7 @@ class EnhancedMetroDataGenerator:
|
|
| 143 |
"last_service_date": (datetime.now() - timedelta(days=days_since_service)).isoformat(),
|
| 144 |
"total_mileage_km": profile["total_mileage_km"],
|
| 145 |
"daily_mileage_km": random.randint(180, 420),
|
| 146 |
-
"operational_hours": int(profile["total_mileage_km"] / 35), #
|
| 147 |
"age_years": round(profile["age_years"], 1),
|
| 148 |
"base_reliability_score": round(profile["base_reliability"], 3),
|
| 149 |
"manufacturer": profile["manufacturer"],
|
|
|
|
| 143 |
"last_service_date": (datetime.now() - timedelta(days=days_since_service)).isoformat(),
|
| 144 |
"total_mileage_km": profile["total_mileage_km"],
|
| 145 |
"daily_mileage_km": random.randint(180, 420),
|
| 146 |
+
"operational_hours": int(profile["total_mileage_km"] / 35), # Kochi Metro avg operating speed: 35 km/h
|
| 147 |
"age_years": round(profile["age_years"], 1),
|
| 148 |
"base_reliability_score": round(profile["base_reliability"], 3),
|
| 149 |
"manufacturer": profile["manufacturer"],
|
DataService/metro_data_generator.py
CHANGED
|
@@ -71,7 +71,7 @@ class MetroDataGenerator:
|
|
| 71 |
name=route_name,
|
| 72 |
stations=stations,
|
| 73 |
total_distance_km=total_distance,
|
| 74 |
-
avg_speed_kmh=random.randint(32, 38),
|
| 75 |
turnaround_time_minutes=random.randint(8, 12)
|
| 76 |
)
|
| 77 |
|
|
|
|
| 71 |
name=route_name,
|
| 72 |
stations=stations,
|
| 73 |
total_distance_km=total_distance,
|
| 74 |
+
avg_speed_kmh=random.randint(32, 38), # Varies around 35 km/h average operating speed
|
| 75 |
turnaround_time_minutes=random.randint(8, 12)
|
| 76 |
)
|
| 77 |
|
DataService/metro_models.py
CHANGED
|
@@ -184,7 +184,7 @@ class Route(BaseModel):
|
|
| 184 |
name: str
|
| 185 |
stations: List[Station]
|
| 186 |
total_distance_km: float
|
| 187 |
-
avg_speed_kmh: float = 35
|
| 188 |
turnaround_time_minutes: int = 10 # Time needed at terminals
|
| 189 |
|
| 190 |
|
|
|
|
| 184 |
name: str
|
| 185 |
stations: List[Station]
|
| 186 |
total_distance_km: float
|
| 187 |
+
avg_speed_kmh: float = 35 # Kochi Metro average operating speed: 35 km/h
|
| 188 |
turnaround_time_minutes: int = 10 # Time needed at terminals
|
| 189 |
|
| 190 |
|
DataService/synthetic_base.py
CHANGED
|
@@ -146,7 +146,7 @@ class MetroSyntheticDataGenerator:
|
|
| 146 |
"gps": {
|
| 147 |
"latitude": round(random.uniform(9.9, 10.1), 6),
|
| 148 |
"longitude": round(random.uniform(76.2, 76.4), 6),
|
| 149 |
-
"speed_kmh": round(random.uniform(0, 80), 1)
|
| 150 |
}
|
| 151 |
}
|
| 152 |
sensor_data.append(sensors)
|
|
|
|
| 146 |
"gps": {
|
| 147 |
"latitude": round(random.uniform(9.9, 10.1), 6),
|
| 148 |
"longitude": round(random.uniform(76.2, 76.4), 6),
|
| 149 |
+
"speed_kmh": round(random.uniform(0, 80), 1) # Max tested speed: 80 km/h
|
| 150 |
}
|
| 151 |
}
|
| 152 |
sensor_data.append(sensors)
|