cols = ['Name', 'Bus', 'LB', 'Power (MW)', 'Set (MW)', 'Delta (MW)', 'UB'] return pd.DataFrame(data=data, columns=cols) # ---------------------------------------------------------------------------------------------------------------------- # Net transfer capacity optimization program 2021 # ---------------------------------------------------------------------------------------------------------------------- # fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/PGOC_6bus(from .raw).gridcal' # fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/Grid4Bus-OPF.gridcal' # fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/IEEE 118 Bus - ntc_areas.gridcal' # fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/IEEE14 - ntc areas.gridcal' # fname = r'C:\Users\penversa\Git\Github\GridCal\Grids_and_profiles\grids\IEEE 118 Bus - ntc_areas.gridcal' # fname = r'C:\Users\penversa\Git\Github\GridCal\Grids_and_profiles\grids\IEEE14 - ntc areas.gridcal' fname = r'D:\ReeGit\github\GridCal\Grids_and_profiles\grids\IEEE14 - ntc areas.gridcal' grid = gc.FileOpen(fname).open() nc = gc.compile_snapshot_opf_circuit(grid) print('Problem loaded:') print('\tNodes:', nc.nbus) print('\tBranches:', nc.nbr) # compute information about areas -------------------------------------------------------------------------------------- area_from_idx = 0 area_to_idx = 1 areas = grid.get_bus_area_indices() # get the area bus indices areas = areas[nc.original_bus_idx] a1 = np.where(areas == area_from_idx)[0] a2 = np.where(areas == area_to_idx)[0]
cols = ['Name', 'Bus', 'LB', 'Power (MW)', 'UB'] return pd.DataFrame(data=data, columns=cols) # ---------------------------------------------------------------------------------------------------------------------- # Net transfer capacity optimization program 2021 # ---------------------------------------------------------------------------------------------------------------------- # fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/PGOC_6bus(from .raw).gridcal' # fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/IEEE 118 Bus - ntc_areas.gridcal' fname = '/home/santi/Documentos/Git/GitHub/GridCal/Grids_and_profiles/grids/IEEE14 - ntc areas.gridcal' # fname = r'C:\Users\penversa\Git\Github\GridCal\Grids_and_profiles\grids\IEEE 118 Bus - ntc_areas.gridcal' # fname = r'D:\ReeGit\github\GridCal\Grids_and_profiles\grids\PGOC_6bus(from .raw).gridcal' grid = gc.FileOpen(fname).open() nc = gc.compile_snapshot_opf_circuit(grid) print('Problem loaded:') print('\tNodes:', nc.nbus) print('\tBranches:', nc.nbr) threshold = 0.02 # compute information about areas -------------------------------------------------------------------------------------- area_from_idx = 0 area_to_idx = 1 areas = grid.get_bus_area_indices() # get the area bus indices areas = areas[nc.original_bus_idx]