import pandas as pd import numpy as np def create_template(): # Create sample data similar to the internal generator data = [] # Add Substation data.append({ 'Type': 'Substation', 'ID': 'Sub1', 'X': 4000, 'Y': -800, 'Power': 0 }) # Add Turbines (Grid layout) n_turbines = 30 spacing = 800 n_cols = 6 for i in range(n_turbines): row = i // n_cols col = i % n_cols x = col * spacing y = row * spacing data.append({ 'Type': 'Turbine', 'ID': i, 'X': x, 'Y': y, 'Power': np.random.uniform(6.0, 10.0) }) df = pd.DataFrame(data) # Save to Excel output_file = 'coordinates.xlsx' df.to_excel(output_file, index=False) print(f"Created sample file: {output_file}") if __name__ == "__main__": create_template()