|
5 | 5 | QG_H, |
6 | 6 | VM_H, |
7 | 7 | VA_H, |
| 8 | + MIN_VM_H, |
| 9 | + MAX_VM_H, |
8 | 10 | MIN_QG_H, |
9 | 11 | MAX_QG_H, |
10 | 12 | # Output feature indices |
@@ -574,30 +576,37 @@ def predict_step(self, batch, batch_idx, dataloader_idx=0): |
574 | 576 | "bus": { |
575 | 577 | "scenario": scenario_ids.cpu().numpy(), |
576 | 578 | "bus": local_bus_idx.cpu().numpy(), |
577 | | - "pd_mw": bus_x[:, PD_H].cpu().numpy(), |
578 | | - "qd_mvar": bus_x[:, QD_H].cpu().numpy(), |
579 | | - "vm_pu_target": bus_y[:, VM_H].cpu().numpy(), |
580 | | - "va_target": bus_y[:, VA_H].cpu().numpy(), |
581 | | - "pg_mw_target": agg_gen_on_bus.squeeze().cpu().numpy(), |
582 | | - "qg_mvar_target": bus_y[:, QG_H].cpu().numpy(), |
583 | | - "is_pq": mask_PQ.cpu().numpy().astype(int), |
584 | | - "is_pv": mask_PV.cpu().numpy().astype(int), |
585 | | - "is_ref": mask_REF.cpu().numpy().astype(int), |
586 | | - "vm_pu": output["bus"][:, VM_OUT].detach().cpu().numpy(), |
587 | | - "va": output["bus"][:, VA_OUT].detach().cpu().numpy(), |
588 | | - "pg_mw": output["bus"][:, PG_OUT].detach().cpu().numpy(), |
589 | | - "qg_mvar": output["bus"][:, QG_OUT].detach().cpu().numpy(), |
| 579 | + "Pd": bus_x[:, PD_H].cpu().numpy(), |
| 580 | + "Qd": bus_x[:, QD_H].cpu().numpy(), |
| 581 | + "Vm_min": bus_x[:, MIN_VM_H].cpu().numpy(), |
| 582 | + "Vm_max": bus_x[:, MAX_VM_H].cpu().numpy(), |
| 583 | + "Qg_min": bus_x[:, MIN_QG_H].cpu().numpy(), |
| 584 | + "Qg_max": bus_x[:, MAX_QG_H].cpu().numpy(), |
| 585 | + "Vm_target": bus_y[:, VM_H].cpu().numpy(), |
| 586 | + "Va_target": bus_y[:, VA_H].cpu().numpy(), |
| 587 | + "Pg_target": agg_gen_on_bus.squeeze().cpu().numpy(), |
| 588 | + "Qg_target": bus_y[:, QG_H].cpu().numpy(), |
| 589 | + "PQ": mask_PQ.cpu().numpy().astype(int), |
| 590 | + "PV": mask_PV.cpu().numpy().astype(int), |
| 591 | + "REF": mask_REF.cpu().numpy().astype(int), |
| 592 | + "Vm_pred": output["bus"][:, VM_OUT].detach().cpu().numpy(), |
| 593 | + "Va_pred": output["bus"][:, VA_OUT].detach().cpu().numpy(), |
| 594 | + "Pg_pred": output["bus"][:, PG_OUT].detach().cpu().numpy(), |
| 595 | + "Qg_pred": output["bus"][:, QG_OUT].detach().cpu().numpy(), |
590 | 596 | "active res. (MW)": residual_P.detach().cpu().numpy(), |
591 | 597 | "reactive res. (MVar)": residual_Q.detach().cpu().numpy(), |
592 | 598 | "PBE": residual_mva.detach().cpu().numpy(), |
593 | 599 | }, |
594 | 600 | "gen": { |
595 | 601 | "scenario": gen_scenario_ids.cpu().numpy(), |
596 | | - "gen": local_gen_idx.cpu().numpy(), |
597 | | - "connected_bus": local_bus_idx[gen_to_bus_index].cpu().numpy(), |
598 | | - "pg_mw_target": gen_target.cpu().numpy(), |
599 | | - "pg_mw": gen_pred.detach().cpu().numpy(), |
600 | | - "min_pg_mw": gen_x[:, MIN_PG].cpu().numpy(), |
601 | | - "max_pg_mw": gen_x[:, MAX_PG].cpu().numpy(), |
| 602 | + "idx": local_gen_idx.cpu().numpy(), |
| 603 | + "bus": local_bus_idx[gen_to_bus_index].cpu().numpy(), |
| 604 | + "p_mw_target": gen_target.cpu().numpy(), |
| 605 | + "p_mw_pred": gen_pred.detach().cpu().numpy(), |
| 606 | + "min_p_mw": gen_x[:, MIN_PG].cpu().numpy(), |
| 607 | + "max_p_mw": gen_x[:, MAX_PG].cpu().numpy(), |
| 608 | + "cp0_eur": gen_x[:, C0_H].cpu().numpy(), |
| 609 | + "cp1_eur_per_mw": gen_x[:, C1_H].cpu().numpy(), |
| 610 | + "cp2_eur_per_mw2": gen_x[:, C2_H].cpu().numpy(), |
602 | 611 | }, |
603 | 612 | } |
0 commit comments