Interactive visualization tool for electrical network power flow data.
- Python 3.7+
- matplotlib
- numpy
- pandas
- openpyxl (for Excel file reading)
pip install matplotlib numpy pandas openpyxl- Place your Excel results file in the same directory (default:
results.xlsx) - Run the script:
python enelec.py
- Navigate timesteps using the buttons or arrow keys (Left/Right)
Edit the configuration section at the top of enelec.py:
RESULTS_FILE = 'results.xlsx' # Path to Excel file
SHEET_LINE_LOADING = 'LineP_Perc' # Line loading sheet name
SHEET_MARGINAL_COST = 'MC' # Marginal cost sheet name
NUM_NODES = 9 # Number of nodes
GRADIENT_COLORS = ['green', 'yellow', 'red'] # Color gradient
FIGURE_SIZE = (14, 11) # Figure dimensionsThe Excel file should contain:
- LineP_Perc sheet: Columns for Timestep, From_Node, To_Node, Category, Flow_Value
- MC sheet: Columns for Period, Timestep, followed by Node_1 through Node_N