import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import math
from datetime import datetime, timedelta
# DON'T MODIFY THIS DATA
np.random.seed(2025)
# Bakery location (city center)
bakery_location = (3.0, 1.0)
# Generate 16 café locations randomly in a 10x10 km area
cafe_locations = []
for i in range(16):
x = np.random.uniform(0.5, 9.5)
y = np.random.uniform(0.5, 9.5)
cafe_locations.append((x, y))
# Café names and opening times
cafe_info = pd.DataFrame({
'cafe_id': range(1, 17),
'name': [
'Sunrise Bistro', 'The Daily Grind', 'Café Europa', 'Corner Coffee',
'South Side Café', 'West End Espresso', 'Riverside Roast', 'Morning Glory',
'Hilltop Haven', 'Central Perk', 'Midtown Munch', 'Old Town Oven',
'Eastside Express', 'Downtown Deli', 'Westpark Café', 'Plaza Perks',
],
'x': [loc[0] for loc in cafe_locations],
'y': [loc[1] for loc in cafe_locations],
'opening_time': [
'06:30', '08:00', '06:30', '08:00', # Cafés 1-4
'08:00', '08:00', '08:00', '06:30', # Cafés 5-8
'08:00', '08:00', '08:00', '08:00', # Cafés 9-12
'08:00', '08:00', '08:00', '08:00' # Cafés 13-16
],
'time_window': [
'EARLY', 'Regular', 'EARLY', 'Regular', # Cafés 1-4
'Regular', 'Regular', 'Regular', 'EARLY', # Cafés 5-8
'Regular', 'Regular', 'Regular', 'Regular', # Cafés 9-12
'Regular', 'Regular', 'Regular', 'Regular' # Cafés 13-16
]
})
# Display the café information
print("CAFÉ INFORMATION:")
print("=" * 60)
print(cafe_info.to_string(index=False))
print("\n" + "=" * 60)
print(f"Bakery location: {bakery_location}")
print(f"Departure time: 5:00 AM")
print(f"Average speed: 20 km/h")
print("\nEARLY cafés (must arrive before opening):")
for _, row in cafe_info[cafe_info['time_window'] == 'EARLY'].iterrows():
print(f" - {row['name']} (Café {row['cafe_id']}): Opens at {row['opening_time']}")
# DON'T MODIFY THIS DATA