diff --git a/Grids_and_profiles/grids/5Bus_FACTS_Fig4.6.gridcal b/Grids_and_profiles/grids/5Bus_FACTS_Fig4.6.gridcal new file mode 100644 index 000000000..f74c15139 Binary files /dev/null and b/Grids_and_profiles/grids/5Bus_FACTS_Fig4.6.gridcal differ diff --git a/Grids_and_profiles/grids/5Bus_LTC_FACTS_Fig4.7.gridcal b/Grids_and_profiles/grids/5Bus_LTC_FACTS_Fig4.7.gridcal new file mode 100644 index 000000000..207e6cd18 Binary files /dev/null and b/Grids_and_profiles/grids/5Bus_LTC_FACTS_Fig4.7.gridcal differ diff --git a/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10(Pt).gridcal b/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10(Pt).gridcal new file mode 100644 index 000000000..c5637f0f8 Binary files /dev/null and b/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10(Pt).gridcal differ diff --git a/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10(Qf).gridcal b/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10(Qf).gridcal new file mode 100644 index 000000000..a96ab10f4 Binary files /dev/null and b/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10(Qf).gridcal differ diff --git a/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10.gridcal b/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10.gridcal new file mode 100644 index 000000000..90e76d482 Binary files /dev/null and b/Grids_and_profiles/grids/5Bus_PST_FACTS_Fig4.10.gridcal differ diff --git a/Grids_and_profiles/grids/IEEE57_withcont_withprofiles.gridcal b/Grids_and_profiles/grids/IEEE57_withcont_withprofiles.gridcal new file mode 100644 index 000000000..f7afdbf03 Binary files /dev/null and b/Grids_and_profiles/grids/IEEE57_withcont_withprofiles.gridcal differ diff --git a/Grids_and_profiles/grids/Lynn 5 node remote v.gridcal b/Grids_and_profiles/grids/Lynn 5 node remote v.gridcal new file mode 100644 index 000000000..e065c3aad Binary files /dev/null and b/Grids_and_profiles/grids/Lynn 5 node remote v.gridcal differ diff --git a/Grids_and_profiles/grids/NL_microgrid.gridcal b/Grids_and_profiles/grids/NL_microgrid.gridcal new file mode 100644 index 000000000..2f8b6b590 Binary files /dev/null and b/Grids_and_profiles/grids/NL_microgrid.gridcal differ diff --git a/Grids_and_profiles/grids/Simple 4 bus ACDC grid.gridcal b/Grids_and_profiles/grids/Simple 4 bus ACDC grid.gridcal new file mode 100644 index 000000000..46bde59b1 Binary files /dev/null and b/Grids_and_profiles/grids/Simple 4 bus ACDC grid.gridcal differ diff --git a/Grids_and_profiles/grids/ejemplo_facts.raw b/Grids_and_profiles/grids/ejemplo_facts.raw new file mode 100644 index 000000000..fb2ce81a9 --- /dev/null +++ b/Grids_and_profiles/grids/ejemplo_facts.raw @@ -0,0 +1,350 @@ +@!IC, SBASE,REV,XFRRAT,NXFRAT,BASFRQ +0, 100.00, 34, 0, 1, 60.00 / PSS(R)E-34.6 MON, JUN 03 2019 10:34 +PSS(R)E SAMPLE CASE +ALL DATA CATEGORIES WITH SEQUENCE DATA +GENERAL, THRSHZ=0.0001, PQBRAK=0.7, BLOWUP=5.0 +GAUSS, ITMX=100, ACCP=1.6, ACCQ=1.6, ACCM=1.0, TOL=0.0001 +NEWTON, ITMXN=100, ACCN=1.0, TOLN=0.1, VCTOLQ=0.1, VCTOLV=0.00001, DVLIM=0.99, NDVFCT=0.99 +ADJUST, ADJTHR=0.005, ACCTAP=1.0, TAPLIM=0.05, SWVBND=100.0, MXTPSS=99, MXSWIM=10 +TYSL, ITMXTY=20, ACCTY=1.0, TOLTY=0.00001 +SOLVER, FDNS, ACTAPS=0, AREAIN=0, PHSHFT=0, DCTAPS=1, SWSHNT=1, FLATST=0, VARLIM=99, NONDIV=0 +RATING, 1, "CRCUS1", "Circus-Fibrous or threadlike " +RATING, 2, "CRSTR2", "Cirrostrarus-Milky, translucent " +RATING, 3, "CRCUM3", "Cirrocumulus-small, white flakes" +RATING, 4, "ALTCU4", "Altocumulus-bundles or rollers " +RATING, 5, "ALTST5", "Altostratus-dense, gray layer " +RATING, 6, "STRTO6", "Stratocumulus-plaices or rollers" +RATING, 7, "STRTS7", "Stratus-Evenly grey, low layer " +RATING, 8, "CMULS8", "Cumulus-Heap with flat basis " +RATING, 9, "CMULO9", "Cumulonimbus-thunder, up-rises " +RATING,10, "NIBS10", "Nimbostratus-rain,grey, dark " +RATING,11, "CPLL11", "capillatus-haired, frayed " +RATING,12, "NBUL12", "nebulosus-fog, veil-like " +0 / END OF SYSTEM-WIDE DATA, BEGIN BUS DATA +@! I,'NAME ', BASKV, IDE,AREA,ZONE,OWNER, VM, VA, NVHI, NVLO, EVHI, EVLO + 101,'NUC-A ', 21.6000,2, 1, 1, 1,1.01000, -19.0142,1.10000,0.90000,1.10000,0.90000 + 102,'NUC-B ', 21.6000,2, 1, 1, 1,1.01000, -19.3678,1.10000,0.90000,1.10000,0.90000 + 151,'NUCPLNT ', 500.0000,1, 1, 1, 1,0.99923, -22.1613,1.10000,0.90000,1.10000,0.90000 + 152,'MID500 ', 500.0000,1, 1, 2, 1,1.04393, -29.7672,1.10000,0.90000,1.10000,0.90000 + 153,'MID230 ', 230.0000,1, 1, 3, 1,1.05708, -31.4386,1.10000,0.90000,1.10000,0.90000 + 154,'DOWNTN ', 230.0000,1, 1, 3, 1,0.99311, -36.8635,1.10000,0.90000,1.10000,0.90000 + 155,'FACTS TE ', 230.0000,1, 1, 4, 1,1.01849, -28.0349,1.10000,0.90000,1.10000,0.90000 + 201,'HYDRO ', 500.0000,1, 1, 7, 2,0.99923, -22.1613,1.10000,0.90000,1.10000,0.90000 + 202,'EAST500 ', 500.0000,1, 1, 2, 2,1.02225, -30.9424,1.10000,0.90000,1.10000,0.90000 + 203,'EAST230 ', 230.0000,1, 1, 8, 2,1.00000, -34.1478,1.10000,0.90000,1.10000,0.90000 + 204,'SUB500 ', 500.0000,1, 1, 8, 2,1.03093, -34.9445,1.10000,0.90000,1.10000,0.90000 + 205,'SUB230 ', 230.0000,1, 1, 8, 2,1.00000, -37.3467,1.10000,0.90000,1.10000,0.90000 + 206,'URBGEN ', 18.0000,2, 1, 8, 2,1.00000, -34.8918,1.10000,0.90000,1.10000,0.90000 + 207,'DUPONT ', 500.0000,1, 1, 7, 2,1.01832, -28.7073,1.10000,0.90000,1.10000,0.90000 + 208,'URBANEAST208', 230.0000,4, 1, 8, 2,1.00000, -31.5246,1.10000,0.90000,1.10000,0.90000 + 209,'URBANEAST209', 230.0000,4, 1, 8, 2,1.00000, -31.5246,1.10000,0.90000,1.10000,0.90000 + 211,'HYDRO_G ', 20.0000,2, 1, 7, 2,1.00000, -17.5386,1.10000,0.90000,1.10000,0.90000 + 212,'INVERT1 ', 230.0000,1, 1, 7, 2,1.02695, -35.7231,1.10000,0.90000,1.10000,0.90000 + 213,'INVERT2 ', 230.0000,1, 1, 7, 2,1.10677, -38.9888,1.10000,0.90000,1.10000,0.90000 + 214,'LOADER ', 230.0000,1, 1, 7, 2,1.07726, -40.4187,1.10000,0.90000,1.10000,0.90000 + 215,'URBANEAST215', 18.0000,1, 1, 8, 2,0.91817, -37.2809,1.10000,0.90000,1.10000,0.90000 + 216,'URBANEAST216', 230.0000,1, 1, 8, 2,0.99637, -37.3236,1.10000,0.90000,1.10000,0.90000 + 217,'URBANEAST217', 230.0000,1, 1, 8, 2,0.99733, -37.3298,1.10000,0.90000,1.10000,0.90000 + 218,'URBANEAST218', 230.0000,1, 1, 8, 2,0.99769, -37.3320,1.10000,0.90000,1.10000,0.90000 + 301,'NORTH ', 765.0000,3, 1, 5, 3,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 401,'COGEN-1 ', 500.0000,3, 1, 9, 4,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 402,'COGEN-2 ', 500.0000,3, 1, 9, 4,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 3001,'MINE ', 230.0000,1, 1, 6, 5,0.98441, -11.9796,1.10000,0.90000,1.10000,0.90000 + 3002,'E. MINE ', 500.0000,1, 1, 6, 5,0.98662, -10.5569,1.10000,0.90000,1.10000,0.90000 + 3003,'S. MINE ', 230.0000,1, 1, 6, 5,0.98741, -15.2068,1.10000,0.90000,1.10000,0.90000 + 3004,'WEST ', 500.0000,1, 1, 6, 5,1.00898, -25.1440,1.10000,0.90000,1.10000,0.90000 + 3005,'WEST ', 230.0000,1, 1, 2, 5,0.99761, -26.0971,1.10000,0.90000,1.10000,0.90000 + 3006,'UPTOWN ', 230.0000,1, 1, 4, 5,1.05708, -31.4386,1.10000,0.90000,1.10000,0.90000 + 3007,'RURAL ', 230.0000,1, 1, 4, 5,0.98103, -29.4773,1.10000,0.90000,1.10000,0.90000 + 3008,'CATDOG ', 230.0000,1, 1, 4, 5,0.99000, -30.0543,1.10000,0.90000,1.10000,0.90000 + 3009,'URBNWEST3009', 230.0000,1, 1, 4, 5,0.99048, -30.0739,1.10000,0.90000,1.10000,0.90000 + 3010,'INDMOTOR1 ', 21.6000,1, 1, 4, 5,0.96390, -3.3103,1.10000,0.90000,1.10000,0.90000 + 3011,'MINE_G ', 19.4000,3, 1, 6, 5,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 3012,'URBNWEST3012', 230.0000,4, 1, 4, 5,0.99048, 0.0000,1.10000,0.90000,1.10000,0.90000 + 3018,'CATDOG_G ', 13.8000,2, 1, 4, 5,0.99000, -26.2844,1.10000,0.90000,1.10000,0.90000 + 3021,'WDUM ', 18.0000,1, 1, 5, 3,1.00000, -26.2760,1.10000,0.90000,1.10000,0.90000 + 3022,'EDUM ', 18.0000,1, 1, 5, 3,1.00000, -25.5871,1.10000,0.90000,1.10000,0.90000 + 9154,'INDGEN1 ', 4.1600,1, 1, 3, 1,0.98606, -36.1817,1.10000,0.90000,1.10000,0.90000 + 9204,'INDMOTOR2 ', 0.5750,1, 1, 8, 2,0.98149, -38.6306,1.10000,0.90000,1.10000,0.90000 + 93002,'INDGEN2 ', 0.6900,1, 1, 6, 5,0.94820, -4.3678,1.10000,0.90000,1.10000,0.90000 +0 / END OF BUS DATA, BEGIN LOAD DATA +@! I,'ID',STAT,AREA,ZONE, PL, QL, IP, IQ, YP, YQ, OWNER,SCALE,INTRPT, DGENP, DGENQ, DGENF + 152,'1 ', 1, 1, 1, 1200.000, 360.000, 868.340, 360.502, 837.794, -351.338, 1, 1, 0, 0.000, 0.000, 0 + 153,'1 ', 1, 1, 1, 300.000, 150.000, 0.000, 0.000, 0.000, 0.000, 1, 1, 0, 100.000, 50.000, 1 + 154,'1 ', 1, 1, 1, 400.000, 200.000, 0.000, 0.000, 0.000, 0.000, 1, 1, 0, 30.000, 15.000, 1 + 154,'2 ', 1, 1, 1, 250.000, 200.000, 0.000, 0.000, 0.000, 0.000, 1, 1, 0, 20.000, 8.000, 1 + 154,'3 ', 1, 1, 1, 250.000, 100.000, 0.000, 0.000, 0.000, 0.000, 1, 1, 0, 7.500, 2.750, 1 + 154,'MO', 1, 1, 1, 100.000, 80.000, 0.000, 0.000, 0.000, 0.000, 1, 1, 0, 0.000, 0.000, 0 + 201,'SC', 1, 2, 7, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 203,'1 ', 1, 2, 2, 500.000, 250.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 205,'1 ', 1, 2, 2, 1800.000, 600.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 75.860, 46.786, 0 + 205,'B ', 1, 2, 2, 90.000, 5.000, 110.000, 25.000, 20.000, 10.000, 2, 1, 0, 65.123, 20.456, 1 + 205,'C ', 1, 2, 2, 60.000, 15.000, 45.000, 5.000, 35.000, 30.000, 2, 1, 0, 37.000, 13.000, 1 + 214,'1 ', 1, 2, 2, 500.000, 75.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 215,'U1', 1, 2, 4, 0.000, 140.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 216,'U1', 1, 2, 4, 0.000, 12.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 217,'U1', 1, 2, 4, 0.000, 10.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 218,'U1', 1, 2, 4, 0.000, 9.000, 0.000, 0.000, 0.000, 0.000, 2, 1, 0, 0.000, 0.000, 0 + 3005,'1 ', 1, 5, 5, 100.000, 50.000, 0.000, 0.000, 0.000, 0.000, 5, 1, 0, 0.000, 0.000, 0 + 3007,'1 ', 1, 5, 5, 200.000, 75.000, 0.000, 0.000, 0.000, 0.000, 5, 1, 0, 0.000, 0.000, 0 + 3008,'1 ', 1, 5, 5, 200.000, 75.000, 0.000, 0.000, 0.000, 0.000, 5, 1, 0, 0.000, 0.000, 0 + 3009,'1 ', 1, 5, 4, 1.100, 0.900, 0.000, 0.000, 0.000, 0.000, 5, 1, 0, 0.000, 0.000, 0 + 3010,'1 ', 1, 5, 4, 12.000, 5.000, 0.000, 0.000, 0.000, 0.000, 5, 1, 0, 0.000, 0.000, 0 +0 / END OF LOAD DATA, BEGIN FIXED SHUNT DATA +@! I,'ID',STATUS, GL, BL + 151,'F1',1, 5.000, -400.000 + 151,'F2',1, 3.000, -400.000 + 151,'F3',1, 3.120, 200.000 + 152,'1 ',1, 1.630, 50.000 + 154,'1 ',1, 2.450, 200.000 + 201,'1 ',1, 3.670, -500.000 + 203,'1 ',1, -5.000, 30.000 + 203,'2 ',1, 5.000, 20.000 + 205,'1 ',1, 2.780, 300.000 + 212,'1 ',1, 5.130, 400.000 + 213,'1 ',1, 5.140, 400.000 + 3021,'1 ',1, 0.000, 1320.000 + 3022,'1 ',1, 0.000, 1080.000 +0 / END OF FIXED SHUNT DATA, BEGIN GENERATOR DATA +@! I,'ID', PG, QG, QT, QB, VS, IREG, MBASE, ZR, ZX, RT, XT, GTAP,STAT, RMPCT, PT, PB, O1, F1, O2, F2, O3, F3, O4, F4,WMOD, WPF,NREG + 101,'1 ', 750.000, 165.207, 400.000, -100.000,1.01000, 101, 900.000, 1.00000E-2, 3.00000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 800.000, 50.000, 1,0.1289, 2,0.2524, 3,0.1031, 4,0.5156 + 102,'1 ', 650.000, 151.880, 410.000, -110.000,1.01000, 102, 950.000, 1.05000E-2, 3.20000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 700.000, 33.000, 1,0.3647, 2,0.1838, 3,0.0751, 4,0.3764 + 206,'1 ', 800.000, 283.913, 500.000, -400.000,1.00000, 206, 1000.000, 1.06000E-2, 2.51000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 850.000, 50.000, 1,0.1034, 2,0.4006, 3,0.0825, 4,0.4135 + 211,'1 ', 600.000, 18.351, 510.000, -100.000,1.00000, 211, 725.000, 1.08000E-2, 2.62000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 616.000, 30.000, 1,0.1423, 2,0.2210, 3,0.1842, 4,0.4525 + 301,'1 ', 996.884, 299.543, 700.000, -650.000,1.00000, 301, 1067.000, 1.09000E-2, 2.30000E-1, 1.40000E-2, 1.26000E-1,1.02500,1, 98.0, 1010.000, 320.000, 1,0.1118, 2,0.2184, 3,0.0893, 4,0.5805 + 301,'2 ', 996.884, 299.543, 710.000, -600.000,1.00000, 301, 1070.000, 1.10000E-2, 2.40000E-1, 1.10000E-2, 1.27000E-1,1.02600,1, 98.0, 1011.000, 321.000, 1,0.1173, 2,0.3200, 3,0.0936, 4,0.4691 + 301,'3 ', 996.884, 299.543, 720.000, -600.000,1.00000, 301, 1075.000, 8.00000E-3, 2.50000E-1, 1.20000E-2, 1.28000E-1,1.02700,1, 98.0, 1012.000, 322.000, 1,0.1260, 2,0.2268, 3,0.1827, 4,0.4644 + 401,'1 ', 321.000, 142.325, 600.000, -100.000,1.00000, 401, 600.000, 1.23000E-2, 2.22300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 90.0, 350.000, 25.000, 1,0.1625, 2,0.2423, 3,0.0990, 4,0.4962 + 402,'1 ', 321.000, 142.325, 610.000, -110.000,1.00000, 402, 610.000, 4.50000E-3, 2.43200E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 91.0, 351.000, 26.000, 1,0.1588, 2,0.2117, 3,0.1959, 4,0.4335 + 3011,'1 ', 1143.183, 176.800, 620.000, -120.000,1.00000, 3011, 1050.000, 7.60000E-3, 3.54300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 92.0, 1400.000, 100.000, 1,0.1452, 2,0.1926, 3,0.2677, 4,0.3945 + 3018,'1 ', 400.000, -0.628, 300.000, -150.000,0.99000, 3018, 530.000, 8.70000E-2, 3.56300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 92.5, 500.000, 50.000, 1,0.1043, 2,0.2037, 3,0.2749, 4,0.4171 + 3018,'2 ', 100.000, -0.157, 75.000, -75.000,0.99000, 3018, 120.000, 2.40000E-2, 3.55300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 92.5, 110.000, 20.000, 1,0.3003, 2,0.1358, 3,0.2857, 4,0.2782 +0 / END OF GENERATOR DATA, BEGIN BRANCH DATA +@! I, J,'CKT', R, X, B, 'N A M E' , RATE1, RATE2, RATE3, RATE4, RATE5, RATE6, RATE7, RATE8, RATE9, RATE10, RATE11, RATE12, GI, BI, GJ, BJ,STAT,MET, LEN, O1, F1, O2, F2, O3, F3, O4, F4 + 151, 152,'1 ', 2.60000E-3, 4.60000E-2, 3.50000,'BRANCH_FROM__151_TO__152___CIRCUIT_ID__1', 1200.00, 1100.00, 1000.00, 1200.40, 1100.50, 1000.60, 1200.70, 1100.80, 1000.90, 1200.10, 1100.11, 1000.12, 0.01000, -0.25000, 0.01100, -0.15000,1,2, 150.00, 1,0.2000, 2,0.3000, 3,0.4000, 4,0.1000 + 151, 152,'2 ', 2.61000E-3, 4.61000E-2, 3.51000,'BRANCH_FROM__151_TO__152___CIRCUIT_ID__2', 1205.00, 1105.00, 1005.00, 1205.40, 1105.50, 1005.60, 1205.70, 1105.80, 1005.90, 1205.10, 1105.11, 1005.12, 0.01300, -0.25100, 0.01200, -0.02000,1,2, 149.00, 5,0.2315, 1,0.3056, 2,0.3704, 3,0.0926 + 152, 202,'1 ', 8.00000E-4, 1.00000E-2, 0.95000,'BRANCH_FROM__152_TO__202___CIRCUIT_ID__1', 1207.00, 1107.00, 1007.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 200.00, 1,0.3939, 2,0.2273, 3,0.3030, 4,0.0758 + 152, 3004,'1 ', 3.00000E-3, 3.00000E-2, 2.50000,'BRANCH_FROM__152_TO_3004___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 201.00, 5,0.2379, 1,0.3033, 2,0.3667, 3,0.0922 + 153, 154,'2 ', 6.00000E-3, 5.40000E-2, 0.15000,'BRANCH_FROM__153_TO__154___CIRCUIT_ID__2', 350.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 80.00, 2,0.2727, 3,0.2727, 4,0.3636, 5,0.0909 + 154, 155,'1 ', 5.00000E-3, 4.50000E-2, 0.10000,'BRANCH_FROM__154_TO__155___CIRCUIT_ID__1', 400.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 81.00, 5,0.1914, 1,0.2535, 2,0.3065, 3,0.2486 + 154, 203,'1 ', 4.00000E-3, 4.00000E-2, 0.10000,'BRANCH_FROM__154_TO__203___CIRCUIT_ID__1', 400.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 100.00, 2,0.2000, 3,0.3000, 4,0.4000, 5,0.1000 + 154, 205,'1 ', 3.30000E-4, 3.33000E-3, 0.09000,'BRANCH_FROM__154_TO__205___CIRCUIT_ID__1', 600.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 120.00, 1,0.1667, 2,0.2500, 3,0.3333, 4,0.2500 + 154, 3008,'1 ', 2.70000E-3, 2.20000E-2, 0.30000,'BRANCH_FROM__154_TO_3008___CIRCUIT_ID__1', 800.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 119.00, 5,0.1925, 1,0.2550, 2,0.3083, 3,0.2442 + 201, 202,'1 ', 2.00000E-3, 2.50000E-2, 2.00000,'BRANCH_FROM__201_TO__202___CIRCUIT_ID__1', 1200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 300.00, 2,0.1905, 3,0.2857, 4,0.3810, 5,0.1429 + 201, 207,'C1', 1.50000E-3, 1.50000E-2, 1.25000,'BRANCH_FROM__201_TO__207___CIRCUIT_ID_C1', 1200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 250.00, 1,0.2500, 2,0.3750, 3,0.2500, 4,0.1250 + 203, 205,'1 ', 5.00000E-3, 4.50000E-2, 0.08000,'BRANCH_FROM__203_TO__205___CIRCUIT_ID__1', 200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 70.00, 5,0.1925, 1,0.2550, 2,0.3083, 3,0.2442 + 204, 207,'C2', 1.50000E-3, 1.50000E-2, 1.25000,'BRANCH_FROM__204_TO__207___CIRCUIT_ID_C2', 1200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 300.00, 2,0.2000, 3,0.3000, 4,0.4000, 5,0.1000 + 205, 212,'1 ',-0.00000E+0, 1.00000E-2, 0.00000,'BRANCH_FROM__205_TO__212___CIRCUIT_ID__1', 1250.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 71.00, 1,0.2000, 2,0.3000, 3,0.4000, 4,0.1000 + 205, 214,'2 ', 2.00000E-3, 2.50000E-2, 2.00000,'BRANCH_FROM__205_TO__214___CIRCUIT_ID__2', 1200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 100.00, 5,0.2100, 1,0.2782, 2,0.3364, 3,0.1755 + 205, 216,'3 ', 5.00000E-3, 4.50000E-2, 0.08000,'BRANCH_FROM__205_TO__216___CIRCUIT_ID__3', 200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 81.00, 2,0.1818, 3,0.2727, 4,0.3636, 5,0.1818 + 205, 217,'4 ', 5.00000E-3, 4.50000E-2, 0.08000,'BRANCH_FROM__205_TO__217___CIRCUIT_ID__4', 200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 80.00, 1,0.1667, 2,0.2500, 3,0.3333, 4,0.2500 + 205, 218,'5 ', 5.00000E-3, 4.50000E-2, 0.08000,'BRANCH_FROM__205_TO__218___CIRCUIT_ID__5', 200.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 59.00, 5,0.1650, 1,0.2186, 2,0.2643, 3,0.3521 + 213, 214,'1 ',-0.00000E+0, 1.00000E-2, 0.00000,'BRANCH_FROM__213_TO__214___CIRCUIT_ID__1', 1250.00, 0.00, 0.00, 1250.40, 0.00, 0.00, 1250.70, 0.00, 0.00, 1250.10, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 0.50, 2,0.1429, 3,0.2143, 4,0.2857, 5,0.3571 + 3001, 3003,'1 ',-0.00000E+0, 8.00000E-3, 0.00000,'BRANCH_FROM_3001_TO_3003___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 70.00, 1,0.1639, 2,0.2459, 3,0.3279, 4,0.2623 + 3002, 3004,'1 ', 6.00000E-3, 5.40000E-2, 0.09000,'BRANCH_FROM_3002_TO_3004___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 200.00, 5,0.1925, 1,0.2550, 2,0.3083, 3,0.2442 + 3003, 3005,'1 ', 6.00000E-3, 5.40000E-2, 0.09000,'BRANCH_FROM_3003_TO_3005___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 90.00, 2,0.2000, 3,0.3000, 4,0.4000, 5,0.1000 + 3003, 3005,'2 ', 6.00000E-3, 5.40000E-2, 0.09000,'BRANCH_FROM_3003_TO_3005___CIRCUIT_ID__2', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 90.00, 1,0.1333, 2,0.2000, 3,0.2667, 4,0.4000 + 3005, 3006,'1 ', 3.50000E-3, 3.00000E-2, 0.07000,'BRANCH_FROM_3005_TO_3006___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 70.00, 5,0.1650, 1,0.2186, 2,0.2643, 3,0.3521 + 3005, 3007,'1 ', 3.00000E-3, 2.50000E-2, 0.06000,'BRANCH_FROM_3005_TO_3007___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 80.00, 2,0.1527, 3,0.2290, 4,0.3053, 5,0.3130 + 3005, 3008,'1 ', 6.00000E-3, 5.00000E-2, 0.12000,'BRANCH_FROM_3005_TO_3008___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,0,2, 60.00, 1,0.1802, 2,0.2703, 3,0.3604, 4,0.1892 + 3007, 3008,'1 ', 3.00000E-3, 2.50000E-2, 0.06000,'BRANCH_FROM_3007_TO_3008___CIRCUIT_ID__1', 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 60.00, 5,0.1858, 1,0.2462, 2,0.4023, 3,0.1657 + 3008, 3009,'1 ', 3.00000E-3, 2.50000E-2, 0.06000,'BRANCH_FROM_3008_TO_3009___CIRCUIT_ID__1', 25.00, 22.00, 18.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 60.00, 1,0.1797, 2,0.2695, 3,0.3594, 4,0.1914 +0 / END OF BRANCH DATA, BEGIN SYSTEM SWITCHING DEVICE DATA +@! I, J,'CKT', X, RATE1, RATE2, RATE3, RATE4, RATE5, RATE6, RATE7, RATE8, RATE9, RATE10, RATE11, RATE12, STAT,NSTAT, MET,STYPE,'NAME' + 151, 201,'*1', 1.00000E-4, 1206.00, 1106.00, 1006.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 1, 2, 3,' ' + 153, 3006,'@1', 1.00000E-4, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 1, 2, 2,' ' +0 / END OF SYSTEM SWITCHING DEVICE DATA, BEGIN TRANSFORMER DATA +@! I, J, K,'CKT',CW,CZ,CM, MAG1, MAG2,NMETR, 'N A M E', STAT,O1, F1, O2, F2, O3, F3, O4, F4, 'VECGRP', ZCOD +@! R1-2, X1-2, SBASE1-2, R2-3, X2-3, SBASE2-3, R3-1, X3-1, SBASE3-1, VMSTAR, ANSTAR +@!WINDV1, NOMV1, ANG1, RATE1-1, RATE1-2, RATE1-3, RATE1-4, RATE1-5, RATE1-6, RATE1-7, RATE1-8, RATE1-9, RATE1-10, RATE1-11, RATE1-12,COD1,CONT1, RMA1, RMI1, VMA1, VMI1, NTP1,TAB1, CR1, CX1, CNXA1,NOD1 +@!WINDV2, NOMV2, ANG2, RATE2-1, RATE2-2, RATE2-3, RATE2-4, RATE2-5, RATE2-6, RATE2-7, RATE2-8, RATE2-9, RATE2-10, RATE2-11, RATE2-12,COD2,CONT2, RMA2, RMI2, VMA2, VMI2, NTP2,TAB2, CR2, CX2, CNXA2,NOD2 +@!WINDV3, NOMV3, ANG3, RATE3-1, RATE3-2, RATE3-3, RATE3-4, RATE3-5, RATE3-6, RATE3-7, RATE3-8, RATE3-9, RATE3-10, RATE3-11, RATE3-12,COD3,CONT3, RMA3, RMI3, VMA3, VMI3, NTP3,TAB3, CR3, CX3, CNXA3,NOD3 + 101, 151, 0,'T1', 2, 2, 1, 1.71470E-01,-1.02880E-01,2,'EL DORADO NUCLEAR UNIT A GSU TRANSFORMER',1, 1,0.3200, 2,0.3900, 3,0.1400, 4,0.1500,'Dyn1 ' + 1.10000E-3, 9.10000E-2, 1200.00 +21.6000, 21.600, 0.000, 1200.00, 1100.00, 1000.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 101,22.68000,20.52000, 1.05000, 0.95000, 25, 0, 0.00021, 0.00051, 0.000, 0 +500.000, 500.000 + 102, 151, 0,'T2', 2, 1, 2, 4.53750E+05, 2.60000E-03,2,'EL DORADO NUCLEAR UNIT B GSU TRANSFORMER',1, 1,0.2100, 2,0.2500, 3,0.2200, 4,0.3200,'Dyn1 ' + 1.20000E-4, 7.60000E-3, 1210.00 +21.6000, 21.600, 0.000, 1210.00, 1125.00, 1025.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 102,22.57200,20.62800, 1.04500, 0.95500, 27, 0, 0.00022, 0.00052, 0.000, 0 +500.000, 500.000 + 152, 153, 0,'T3', 2, 1, 1, 2.10000E-04,-1.20000E-04,2,'MID LTC ',1, 1,0.3500, 2,0.2200, 3,0.2500, 4,0.1800,'YNyn0 ' + 1.70000E-4, 7.75000E-3, 800.00 +475.000, 500.000, 0.000, 800.00, 750.00, 700.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 154,525.0000,475.0000, 1.00000, 0.98000, 10, 0, 0.00023, 0.00053, 0.000, 0 +230.000, 230.000 + 152, 3021, 0,'T4', 1, 2, 2, 5.62500E+05, 2.80000E-03,2,'WDUM DC ',1, 1,0.3900, 2,0.3200, 3,0.1500, 4,0.1400,'YNyn0 ' + 1.30000E-3, 6.30000E-2, 1500.00 +1.10000, 500.000, 0.000, 1500.00, 1400.00, 1350.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 4, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 2, 0.00000, 0.00000, 0.000, 0 +1.00000, 18.000 + 152, 3022, 0,'T5', 1, 2, 1, 4.00000E-04,-2.10000E-04,2,'EDUM DC ',1, 1,0.2200, 2,0.2500, 3,0.2100, 4,0.3200,'YNyn0 ' + 1.70000E-3, 7.40000E-2, 1510.00 +1.10000, 500.000, 0.000, 1510.00, 1410.00, 1393.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 4, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +1.00000, 18.000 + 154, 9154, 0,'W1', 1, 1, 1, 0.00000E+00, 0.00000E+00,2,'WTG1XMER ',1, 1,1.0000, 0,1.0000, 0,1.0000, 0,1.0000,'YNd1 ' +-0.00000E+0, 5.83330E-1, 12.00 +1.00000, 0.000, 0.000, 12.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +1.00000, 0.000 + 201, 211, 0,'T6', 2, 1, 2, 2.62500E+05, 3.00000E-03,2,'HYDRO_G XMER ',1, 1,0.1400, 2,0.1500, 3,0.3200, 4,0.3900,'YNd1 ' + 2.60000E-4, 1.34300E-2, 700.00 +500.000, 500.000, 0.000, 700.00, 650.00, 611.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 5, 0, 0.00000, 0.00000, 0.000, 0 +20.0000, 20.000 + 203, 202, 0,'T7', 1, 2, 1, 9.50000E-04,-4.60000E-04,1,'EAST PS ',1, 1,0.2754, 2,0.3261, 3,0.2899, 4,0.1087,'YNyn0 ' + 2.10000E-3, 5.40000E-2, 750.00 +0.99000, 230.000, 0.143, 750.00, 700.00, 657.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 3, 0,12.00000,-11.0000,-900.000,-950.000, 33, 1, 0.00000, 0.00000, 0.000, 0 +1.00000, 500.000 + 204, 205, 0,'T8', 1, 2, 1, 1.13000E-03,-5.20000E-04,2,'SUB LTC ',1, 1,0.3019, 2,0.4245, 3,0.1321, 4,0.1415,'YNyn0 ' + 3.70000E-3, 4.50000E-2, 800.00 +1.03667, 500.000, 0.000, 800.00, 775.00, 717.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 205, 1.05000, 0.95000, 1.00000, 0.98000, 16, 0, 0.00024, 0.00054, 0.000, 0 +1.00000, 230.000 + 204, 9204, 0,'W2', 1, 1, 1, 0.00000E+00, 0.00000E+00,2,'WTG2XMER ',1, 2,1.0000, 0,1.0000, 0,1.0000, 0,1.0000,'YNd1 ' + 8.80000E-2, 6.61710E-1, 8.75 +1.00000, 0.000, 0.000, 8.75, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +1.00000, 0.000 + 205, 206, 0,'T9', 1, 2, 1, 1.13000E-03,-5.20000E-04,2,'URB TX ',1, 1,0.1905, 2,0.4643, 3,0.1667, 4,0.1786,'YNd1 ' + 1.60000E-3, 4.80000E-2, 900.00 +1.01591, 230.000, 0.000, 900.00, 850.00, 799.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 2, 0, 1.05000, 0.97500,-175.000,-250.000, 12, 0, 0.00000, 0.00000, 0.000, 0 +1.00000, 18.000 + 205, 215, 208,'3 ', 1, 1, 2, 3.42000E+04, 2.28000E-03,2,'THREE WDG WITH COMPLEX IMP COR FACTORS 1',3, 2,0.2540, 2,0.1746, 3,0.3333, 4,0.2381,'YN0yn0y0 ', 1 + 7.52998E-4, 5.36670E-2, 150.00, 1.24790E-2, 8.73500E-1, 20.00, 2.00690E-2, 1.34000E+0, 15.00,0.60345, -36.7860 +1.00000, 230.000, 0.000, 150.00, 130.00, 120.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,-1, 215, 1.10000, 0.90000, 1.10000, 0.90000, 33, 5, 0.00025, 0.00064, 0.000, 0 +1.00000, 18.000, 0.000, 20.00, 18.00, 15.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.20000, 0.90120, 1.10000, 0.90000, 33, 0, 0.00012, 0.00046, 0.000, 0 +1.00000, 230.000, 0.000, 15.00, 13.00, 10.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 6, 0.00000, 0.00000, 0.000, 0 + 209, 217, 218,'4 ', 2, 3, 2, 4.18934E+01, 9.98336E-06,2,'3WNDSTAT4 ',4, 2,0.4671, 2,0.1250, 3,0.2379, 4,0.1700,'YN0yn0yn0 ', 0 + 2.28000E+5, 1.00010E-1, 30.00, 1.90000E+5, 9.00000E-2, 25.00, 2.66000E+5, 7.50000E-2, 35.00,0.99757, -37.3310 +230.000, 230.000, 0.000, 30.00, 20.00, 10.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,-1, 0,253.0000,207.0000, 1.10000, 0.90000, 33, 2, 0.00031, 0.00784, 0.000, 0 +230.000, 230.000, 0.000, 25.00, 18.00, 12.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,-1, 217,253.0000,207.0000, 1.10000, 0.90000, 33, 2, 0.00021, 0.00862, 0.000, 0 +230.000, 230.000, 0.000, 35.00, 26.00, 14.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00,-1, 0,253.0000,207.0000, 1.10000, 0.90000, 33, 2, 0.00024, 0.00394, 0.000, 0 + 3001, 3002, 3011,'1 ', 1, 1, 1, 1.20000E-03,-4.20000E-03,2,'THREE WDG WITH COMPLEX IMP COR FACTORS 2',1, 1,0.1238, 2,0.2477, 3,0.1548, 5,0.4737,'YN0yn0d1 ', 1 + 1.13000E-4, 8.05000E-3, 1000.00, 2.50000E-4, 1.74700E-2, 1000.00, 3.01000E-4, 2.01000E-2, 1000.00,0.98588, -9.8267 +0.99884, 230.000, 0.000, 1200.00, 1150.00, 1090.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 1, 3002, 1.10020, 0.92000, 1.16000, 0.93000, 33, 3, 0.00013, 0.00016, 0.000, 0 +1.00000, 500.000, 0.000, 1250.00, 1175.00, 1112.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10010, 0.90000, 1.14000, 0.91000, 22, 0, 0.00012, 0.00015, 0.000, 0 +1.00000, 19.400, 0.000, 1280.00, 1200.00, 1157.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.91000, 1.10000, 0.92000, 11, 4, 0.00011, 0.00014, 0.000, 0 + 3002, 93002, 0,'W3', 1, 1, 1, 0.00000E+00, 0.00000E+00,2,'WTG3XMER ',1, 5,1.0000, 0,1.0000, 0,1.0000, 0,1.0000,'YNd1 ' +-0.00000E+0, 2.02703E+0, 3.70 +1.00000, 0.000, 0.000, 3.70, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +1.00000, 0.000 + 3005, 3004, 0,'10', 1, 1, 2, 2.06250E+05, 3.40000E-03,1,'WEST TX ',1, 1,0.2645, 2,0.4959, 3,0.1157, 4,0.1240,'YNa0 ' + 3.50000E-4, 9.64000E-3, 550.00 +1.00000, 230.000, 0.000, 550.00, 500.00, 455.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 3, 0, 0.00000, 0.00000, 0.000, 0 +1.00000, 500.000 + 3008, 3018, 0,'11', 2, 1, 2, 1.96875E+05, 3.50000E-03,2,'CATDOG_XMER ',1, 1,0.2051, 2,0.2500, 3,0.4487, 4,0.0962,'YNa0 ' + 4.40000E-4, 1.27600E-2, 525.00 +230.000, 230.000, 0.000, 525.00, 475.00, 423.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 22, 2, 0.00000, 0.00000, 0.000, 0 +13.8000, 13.800 + 3008, 3012, 3010,'2 ', 2, 1, 1, 2.10000E-04,-1.20000E-04,1,'3WNDSTAT2 ',2, 5,0.8000, 3,0.0500, 2,0.1000, 1,0.0500,'D1y0y0 ', 0 + 5.15000E-3, 5.00000E-1, 20.00, 9.20000E-3, 8.00000E-1, 15.00, 3.75000E-3, 4.16670E-1, 25.00,0.98625, -30.5021 +230.000, 230.000, 0.000, 20.00, 18.00, 14.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +230.000, 230.000, 0.000, 15.00, 13.00, 9.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +21.6000, 21.600, 30.000, 25.00, 19.00, 16.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000, 0 +0 / END OF TRANSFORMER DATA, BEGIN AREA DATA +@! I, ISW, PDES, PTOL, 'ARNAME' + 1, 101, -2800.000, 10.000,'CENTRAL ' + 2, 206, -1600.000, 10.000,'EAST ' + 3, 301, 2900.000, 55.000,'CENTRAL_DC ' + 4, 401, 300.000, 15.000,'EAST_COGEN1 ' + 5, 3011, 900.000, 10.000,'WEST ' + 6, 402, 300.000, 20.000,'EAST_COGEN2 ' +0 / END OF AREA DATA, BEGIN TWO-TERMINAL DC DATA +@! 'NAME', MDC, RDC, SETVL, VSCHD, VCMOD, RCOMP, DELTI,METER DCVMIN,CCCITMX, CCCACC +@! IPR,NBR,ANMXR,ANMNR, RCR, XCR, EBASR, TRR, TAPR, TMXR, TMNR, STPR, ICR, IFR, ITR,'IDR', XCAPR,NDR +@! IPI,NBI,ANMXI,ANMNI, RCI, XCI, EBASI, TRI, TAPI, TMXI, TMNI, STPI, ICI, IFI, ITI,'IDI', XCAPI,NDI +"TWO_TERM_DC1",1, 7.8543, 1490.65, 525.00, 400.00, 3.9420, 0.15560,'I', 0.00, 20, 1.00000 + 301, 2,13.00, 7.50, 0.0111, 3.8800, 500.0,0.44000,1.06275,1.10000,0.90000,0.00525, 0, 0, 0,'1 ', 2.0034, 0 + 3021, 2,21.00,18.50, 0.0000, 3.0470, 230.0,0.95652,1.07500,1.10000,0.80000,0.00625, 0, 152, 3021,'T4', 2.0000, 0 +"TWO_TERM_DC2",1, 8.2000, 1500.00, 525.00, 400.00, 4.1000, 0.15000,'I', 0.00, 20, 1.00000 + 301, 2,12.00, 8.00, 0.0110, 3.8800, 500.0,0.44000,1.05450,1.11200,0.90000,0.00515, 0, 0, 0,'1 ', 0.0098, 0 + 3022, 2,20.00,18.00, 0.0120, 3.0470, 230.0,0.95652,1.06250,1.10000,0.80000,0.00625, 0, 152, 3022,'T5', 0.0074, 0 +0 / END OF TWO-TERMINAL DC DATA, BEGIN VSC DC LINE DATA +@! 'NAME', MDC, RDC, O1, F1, O2, F2, O3, F3, O4, F4 +@!IBUS,TYPE,MODE, DCSET, ACSET, ALOSS, BLOSS, MINLOSS, SMAX, IMAX, PWF, MAXQ, MINQ, VSREG, RMPCT,NREG +"VDCLINE1 ",1, 0.7100, 1,0.3204, 2,0.3883, 3,0.1942, 4,0.0971 + 3005, 2, 2, -209.00, 0.95000, 100.000, 0.100, 50.000, 400.00, 1200.00,0.10000, 100.00, -110.00, 3005, 100.0, 0 + 3008, 1, 1, 100.00, 0.99000, 90.000, 0.150, 40.000, 350.00, 1200.00,0.15000, 150.00, -140.00, 3008, 100.0, 0 +"VDCLINE2 ",1, 0.3500, 1,0.3705, 2,0.3597, 3,0.1799, 4,0.0899 + 203, 2, 1, -100.00, 1.00000, 100.000, 0.150, 123.000, 200.00, 1200.00,1.00000, 200.00, -150.00, 203, 100.0, 0 + 205, 1, 1, 100.00, 1.00000, 93.000, 0.120, 98.000, 250.00, 1250.00,1.00000, 225.00, -250.00, 205, 99.0, 0 +0 / END OF VSC DC LINE DATA, BEGIN IMPEDANCE CORRECTION DATA +@!I, T1, Re(F1), Im(F1), T2, Re(F2), Im(F2), T3, Re(F3), Im(F3), T4, Re(F4), Im(F4), T5, Re(F5), Im(F5), T6, Re(F6), Im(F6) +@! T7, Re(F7), Im(F7), T8, Re(F8), Im(F8), T9, Re(F9), Im(F9), T10, Re(F10), Im(F10), T11, Re(F11), Im(F11), T12, Re(F12), Im(F12) +@! ... + 1, -30.00, 1.10000, 0.00000, -24.00, 1.09100, 0.00000, -18.00, 1.08400, 0.00000, -12.00, 1.06300, 0.00000, -6.00, 1.03200, 0.00000, 0.00, 1.00000, 0.00000 + 6.00, 1.03000, 0.00000, 12.00, 1.06000, 0.00000, 18.00, 1.08000, 0.00000, 24.00, 1.09000, 0.00000, 30.00, 1.11000, 0.00000, 0.00, 0.00000, 0.00000 + 2, 0.60000, 1.06000, 0.00000, 0.70000, 1.05000, 0.00000, 0.80000, 1.04000, 0.00000, 0.90000, 1.03000, 0.00000, 0.95000, 1.02000, 0.00000, 1.00000, 1.01000, 0.00000 + 1.05000, 0.99000, 0.00000, 1.10000, 0.98000, 0.00000, 1.20000, 0.97000, 0.00000, 1.30000, 0.96000, 0.00000, 1.40000, 0.95000, 0.00000, 0.00000, 0.00000, 0.00000 + 3, 0.95000, 1.00620, 0.00058, 1.00000, 1.00000, 0.00000, 1.05000, 0.99006, 0.00011, 0.00000, 0.00000, 0.00000 + 4, 0.95000, 0.96964, 0.00054, 1.00000, 1.00000, 0.00000, 1.05000, 1.02486, 0.00077, 0.00000, 0.00000, 0.00000 + 5, 0.94000, 1.00620, 0.00058, 1.00000, 1.00000, 0.00000, 1.06000, 0.99006, 0.00011, 0.00000, 0.00000, 0.00000 + 6, 0.94000, 0.96964, 0.00054, 1.00000, 1.00000, 0.00000, 1.06000, 1.02486, 0.00077, 0.00000, 0.00000, 0.00000 +0 / END OF IMPEDANCE CORRECTION DATA, BEGIN MULTI-TERMINAL DC DATA +@! 'NAME', NCONV,NDCBS,NDCLN, MDC, VCONV, VCMOD, VCONVN +@! IB, N,ANGMX,ANGMN, RC, XC, EBAS, TR, TAP, TPMX, TPMN, TSTP, SETVL, DCPF, MARG,CNVCOD +@!IDC, IB,AREA,ZONE, 'DCNAME', IDC2, RGRND,OWNER +@!IDC,JDC,'DCCKT',MET, RDC, LDC +"MULTERM_DC_1", 4, 5, 4, 1, 212, 400.00, 0 + 402, 4,10.00, 8.00, 0.0000, 19.0000, 500.0,0.22000,1.01000,1.10000,0.97000,0.01000, 321.00, 1.0000, 0.15000, 3 + 401, 4,10.00, 8.00, 0.0000, 19.0000, 500.0,0.22000,1.01000,1.10000,0.97000,0.01000, 321.00, 1.0000, 0.15000, 3 + 212, 4,20.00,18.00, 0.0000, 10.0000, 230.0,0.45200,1.04000,1.10000,0.90000,0.01000, 500.00, 1.0000, 0.00000, 1 + 213, 4,20.00,18.00, 0.0000, 10.0000, 230.0,0.45200,1.10000,1.10000,0.90000,0.01000, -303.80, 1.0000, 0.00000, 4 + 1, 401, 4, 4,'DC1 ', 0, 0.0000, 4 + 2, 212, 2, 2,'DC2 ', 0, 0.0000, 2 + 3, 402, 4, 4,'DC3 ', 0, 0.0000, 4 + 4, 213, 2, 2,'DC4 ', 0, 0.0000, 2 + 5, 0, 4, 4,'DC5 ', 0, 0.0000, 4 + 1, 5, '1', 1, 29.0000, 0.00 + 2, 5, '1', 1, 29.0000, 0.00 + 3, 5, '1', 1, 29.0000, 0.00 + 4, 5, '1', 1, 29.0000, 0.00 +0 / END OF MULTI-TERMINAL DC DATA, BEGIN MULTI-SECTION LINE DATA +@! I, J,'ID',MET,DUM1, DUM2, DUM3, DUM4, DUM5, DUM6, DUM7, DUM8, DUM9 + 201, 204,'&1',2, 207 +0 / END OF MULTI-SECTION LINE DATA, BEGIN ZONE DATA +@! I, 'ZONAME' + 1,'NORTH_A1 ' + 2,'MID_A1_A2_A5' + 3,'DISCNT_IN_A1' + 4,'SOUTH_A1_A5 ' + 5,'ALL_A3 ' + 6,'NORTH_A5 ' + 7,'NORTH_A2 ' + 8,'SOUTH_A2 ' + 9,'ALL_A4_A6 ' +0 / END OF ZONE DATA, BEGIN INTER-AREA TRANSFER DATA +@!ARFROM,ARTO,'TRID', PTRAN + 1, 2,'A', 1000.00 + 1, 5,'B', -3800.00 + 2, 4,'C', -300.00 + 2, 6,'E', -300.00 + 3, 5,'D', 2900.00 +0 / END OF INTER-AREA TRANSFER DATA, BEGIN OWNER DATA +@! I, 'OWNAME' + 1,'OWNER 1 ' + 2,'OWNER 2 ' + 3,'OWNER 3 ' + 4,'OWNER 4 ' + 5,'OWNER 5 ' +0 / END OF OWNER DATA, BEGIN FACTS DEVICE DATA +@! 'NAME', I, J,MODE, PDES, QDES, VSET, SHMX, TRMX, VTMN, VTMX, VSMX, IMX, LINX, RMPCT,OWNER, SET1, SET2,VSREF, FCREG, 'MNAME' ,NREG +"FACTS_DVCE_1", 153, 0,1, 0.000, 0.000,1.01500, 50.000, 100.000,0.92630,1.13400,1.00000, 0.000, 0.05652, 100.0, 1, 0.00000, 0.00000, 0, 153," ", 0 +"FACTS_DVCE_2", 153, 155,1, 350.000, 40.000,1.01500, 25.000, 9999.000,0.90000,1.10000,1.00000, 0.000, 0.05000, 100.0, 1, 0.00000, 0.00000, 0, 153," ", 0 +0 / END OF FACTS DEVICE DATA, BEGIN SWITCHED SHUNT DATA +@! I,MODSW,ADJM,ST, VSWHI, VSWLO, SWREG, RMPCT, 'RMIDNT', BINIT,N1, B1, N2, B2, N3, B3, N4, B4, N5, B5, N6, B6, N7, B7, N8, B8, NREG + 152, 1, 0, 1,1.04500,0.95500, 152, 100.0,' ', -233.00, 1, -15.00, 2, -5.00, 3, -10.00, 4, -8.00, 5, -7.00, 6, -5.00, 7, -7.00, 8, -4.00 + 154, 1, 0, 1,1.04480,0.96500, 154, 100.0,' ', 124.00, 1, 25.00, 2, 10.00, 2, 15.00, 1, 15.00, 2, 5.00, 3, 3.00, 2, 4.00, 1, 7.00 + 3005, 4, 0, 1,0.98000,0.64000, 3005, 100.0,'VDCLINE1 ', 0.00, 1, 33.35 + 3021, 2, 0, 1,1.00000,1.00000, 3021, 100.0,' ', 493.37, 2, 200.00, 1, 100.00, 2, 50.00, 4, 25.00 + 3022, 2, 0, 1,1.00000,1.00000, 3022, 100.0,' ', 594.29, 4, 100.00, 2, 50.00, 4, 25.00, 3, 20.00, 2, 20.00 + 93002, 1, 0, 1,0.99628,0.99628, 93002, 100.0,' ', 1.44, 1, 1.44 +0 / END OF SWITCHED SHUNT DATA, BEGIN GNE DATA +@! 'NAME', 'MODEL', NTERM,BUS1...BUSNTERM,NREAL,NINTG,NCHAR +@!ST,OWNER,NMETR +@! REAL1...REAL(MIN(10,NREAL)) +@! INTG1...INTG(MIN(10,NINTG)) +@! CHAR1...CHAR(MIN(10,NCHAR)) +0 / END OF GNE DATA, BEGIN INDUCTION MACHINE DATA +@! I,'ID',ST,SC,DC,AREA,ZONE,OWNER,TC,BC, MBASE, RATEKV,PC, PSET, H, A, B, D, E, RA, XA, XM, R1, X1, R2, X2, X3, E1, SE1, E2, SE2, IA1, IA2, XAMULT + 3010,"1 ", 1, 1, 2, 5, 4, 5, 1, 1, 1.000, 21.600,1, 1.0000, 1.000, 1.000, 1.000, 1.000, 1.000 + 9154,"1 ", 1, 1, 2, 1, 3, 1, 1, 2, 2.270, 4.160,2,-2.0000, 1.000, 1.000, 1.000, -1.000, 1.000 + 9204,"1 ", 1, 1, 2, 2, 8, 2, 1, 1, 10.000, 0.575,1,10.0000, 1.000, 1.000, 1.000, 1.000, 1.000 + 93002,"1 ", 1, 1, 2, 5, 6, 5, 1, 2, 5.620, 0.690,2,-5.0000, 1.000, 1.000, 1.000, -1.000, 1.000 +0 / END OF INDUCTION MACHINE DATA, BEGIN SUBSTATION DATA +0 / END OF SUBSTATION DATA +Q diff --git a/Grids_and_profiles/grids/ejemplo_facts_v33.raw b/Grids_and_profiles/grids/ejemplo_facts_v33.raw new file mode 100644 index 000000000..d6c505191 --- /dev/null +++ b/Grids_and_profiles/grids/ejemplo_facts_v33.raw @@ -0,0 +1,290 @@ +0, 100.00, 33, 0, 1, 60.00 / PSS(R)E 33 RAW created by rawd33 FRI, JAN 12 2024 7:49 +PSS(R)E SAMPLE CASE +ALL DATA CATEGORIES WITH SEQUENCE DATA + 101,'NUC-A ', 21.6000,2, 1, 1, 1,1.01000, -19.0142,1.10000,0.90000,1.10000,0.90000 + 102,'NUC-B ', 21.6000,2, 1, 1, 1,1.01000, -19.3678,1.10000,0.90000,1.10000,0.90000 + 151,'NUCPLNT ', 500.0000,1, 1, 1, 1,0.99923, -22.1613,1.10000,0.90000,1.10000,0.90000 + 152,'MID500 ', 500.0000,1, 1, 2, 1,1.04393, -29.7672,1.10000,0.90000,1.10000,0.90000 + 153,'MID230 ', 230.0000,1, 1, 3, 1,1.05708, -31.4386,1.10000,0.90000,1.10000,0.90000 + 154,'DOWNTN ', 230.0000,1, 1, 3, 1,0.99311, -36.8635,1.10000,0.90000,1.10000,0.90000 + 155,'FACTS TE ', 230.0000,1, 1, 4, 1,1.01849, -28.0349,1.10000,0.90000,1.10000,0.90000 + 201,'HYDRO ', 500.0000,1, 1, 7, 2,0.99923, -22.1613,1.10000,0.90000,1.10000,0.90000 + 202,'EAST500 ', 500.0000,1, 1, 2, 2,1.02225, -30.9424,1.10000,0.90000,1.10000,0.90000 + 203,'EAST230 ', 230.0000,1, 1, 8, 2,1.00000, -34.1478,1.10000,0.90000,1.10000,0.90000 + 204,'SUB500 ', 500.0000,1, 1, 8, 2,1.03093, -34.9445,1.10000,0.90000,1.10000,0.90000 + 205,'SUB230 ', 230.0000,1, 1, 8, 2,1.00000, -37.3467,1.10000,0.90000,1.10000,0.90000 + 206,'URBGEN ', 18.0000,2, 1, 8, 2,1.00000, -34.8918,1.10000,0.90000,1.10000,0.90000 + 207,'DUPONT ', 500.0000,1, 1, 7, 2,1.01832, -28.7073,1.10000,0.90000,1.10000,0.90000 + 208,'URBANEAST208', 230.0000,4, 1, 8, 2,1.00000, -31.5246,1.10000,0.90000,1.10000,0.90000 + 209,'URBANEAST209', 230.0000,4, 1, 8, 2,1.00000, -31.5246,1.10000,0.90000,1.10000,0.90000 + 211,'HYDRO_G ', 20.0000,2, 1, 7, 2,1.00000, -17.5386,1.10000,0.90000,1.10000,0.90000 + 212,'INVERT1 ', 230.0000,1, 1, 7, 2,1.02695, -35.7231,1.10000,0.90000,1.10000,0.90000 + 213,'INVERT2 ', 230.0000,1, 1, 7, 2,1.10677, -38.9888,1.10000,0.90000,1.10000,0.90000 + 214,'LOADER ', 230.0000,1, 1, 7, 2,1.07726, -40.4187,1.10000,0.90000,1.10000,0.90000 + 215,'URBANEAST215', 18.0000,1, 1, 8, 2,0.91817, -37.2809,1.10000,0.90000,1.10000,0.90000 + 216,'URBANEAST216', 230.0000,1, 1, 8, 2,0.99637, -37.3236,1.10000,0.90000,1.10000,0.90000 + 217,'URBANEAST217', 230.0000,1, 1, 8, 2,0.99733, -37.3298,1.10000,0.90000,1.10000,0.90000 + 218,'URBANEAST218', 230.0000,1, 1, 8, 2,0.99769, -37.3320,1.10000,0.90000,1.10000,0.90000 + 301,'NORTH ', 765.0000,3, 1, 5, 3,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 401,'COGEN-1 ', 500.0000,3, 1, 9, 4,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 402,'COGEN-2 ', 500.0000,3, 1, 9, 4,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 3001,'MINE ', 230.0000,1, 1, 6, 5,0.98441, -11.9796,1.10000,0.90000,1.10000,0.90000 + 3002,'E. MINE ', 500.0000,1, 1, 6, 5,0.98662, -10.5569,1.10000,0.90000,1.10000,0.90000 + 3003,'S. MINE ', 230.0000,1, 1, 6, 5,0.98741, -15.2068,1.10000,0.90000,1.10000,0.90000 + 3004,'WEST ', 500.0000,1, 1, 6, 5,1.00898, -25.1440,1.10000,0.90000,1.10000,0.90000 + 3005,'WEST ', 230.0000,1, 1, 2, 5,0.99761, -26.0971,1.10000,0.90000,1.10000,0.90000 + 3006,'UPTOWN ', 230.0000,1, 1, 4, 5,1.05708, -31.4386,1.10000,0.90000,1.10000,0.90000 + 3007,'RURAL ', 230.0000,1, 1, 4, 5,0.98103, -29.4773,1.10000,0.90000,1.10000,0.90000 + 3008,'CATDOG ', 230.0000,1, 1, 4, 5,0.99000, -30.0543,1.10000,0.90000,1.10000,0.90000 + 3009,'URBNWEST3009', 230.0000,1, 1, 4, 5,0.99048, -30.0739,1.10000,0.90000,1.10000,0.90000 + 3010,'INDMOTOR1 ', 21.6000,1, 1, 4, 5,0.96390, -3.3103,1.10000,0.90000,1.10000,0.90000 + 3011,'MINE_G ', 19.4000,3, 1, 6, 5,1.00000, 0.0000,1.10000,0.90000,1.10000,0.90000 + 3012,'URBNWEST3012', 230.0000,4, 1, 4, 5,0.99048, 0.0000,1.10000,0.90000,1.10000,0.90000 + 3018,'CATDOG_G ', 13.8000,2, 1, 4, 5,0.99000, -26.2844,1.10000,0.90000,1.10000,0.90000 + 3021,'WDUM ', 18.0000,1, 1, 5, 3,1.00000, -26.2760,1.10000,0.90000,1.10000,0.90000 + 3022,'EDUM ', 18.0000,1, 1, 5, 3,1.00000, -25.5871,1.10000,0.90000,1.10000,0.90000 + 9154,'INDGEN1 ', 4.1600,1, 1, 3, 1,0.98606, -36.1817,1.10000,0.90000,1.10000,0.90000 + 9204,'INDMOTOR2 ', 0.5750,1, 1, 8, 2,0.98149, -38.6306,1.10000,0.90000,1.10000,0.90000 + 93002,'INDGEN2 ', 0.6900,1, 1, 6, 5,0.94820, -4.3678,1.10000,0.90000,1.10000,0.90000 + 0 /End of Bus data, Begin Load data + 152,'1 ',1, 1, 1, 1200.000, 360.000, 868.340, 360.502, 837.794, -351.338, 1,1,0 + 153,'1 ',1, 1, 1, 200.000, 100.000, 0.000, 0.000, 0.000, 0.000, 1,1,0 + 154,'1 ',1, 1, 1, 370.000, 185.000, 0.000, 0.000, 0.000, 0.000, 1,1,0 + 154,'2 ',1, 1, 1, 230.000, 192.000, 0.000, 0.000, 0.000, 0.000, 1,1,0 + 154,'3 ',1, 1, 1, 242.500, 97.250, 0.000, 0.000, 0.000, 0.000, 1,1,0 + 154,'MO',1, 1, 1, 100.000, 80.000, 0.000, 0.000, 0.000, 0.000, 1,1,0 + 201,'SC',1, 2, 7, 0.000, 0.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 203,'1 ',1, 2, 2, 500.000, 250.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 205,'1 ',1, 2, 2, 1800.000, 600.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 205,'B ',1, 2, 2, 24.877, -15.456, 110.000, 25.000, 20.000, 10.000, 2,1,0 + 205,'C ',1, 2, 2, 23.000, 2.000, 45.000, 5.000, 35.000, 30.000, 2,1,0 + 214,'1 ',1, 2, 2, 500.000, 75.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 215,'U1',1, 2, 4, 0.000, 140.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 216,'U1',1, 2, 4, 0.000, 12.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 217,'U1',1, 2, 4, 0.000, 10.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 218,'U1',1, 2, 4, 0.000, 9.000, 0.000, 0.000, 0.000, 0.000, 2,1,0 + 3005,'1 ',1, 5, 5, 100.000, 50.000, 0.000, 0.000, 0.000, 0.000, 5,1,0 + 3007,'1 ',1, 5, 5, 200.000, 75.000, 0.000, 0.000, 0.000, 0.000, 5,1,0 + 3008,'1 ',1, 5, 5, 200.000, 75.000, 0.000, 0.000, 0.000, 0.000, 5,1,0 + 3009,'1 ',1, 5, 4, 1.100, 0.900, 0.000, 0.000, 0.000, 0.000, 5,1,0 + 3010,'1 ',1, 5, 4, 12.000, 5.000, 0.000, 0.000, 0.000, 0.000, 5,1,0 + 0 /End of Load data, Begin Fixed shunt data + 151,'F1',1, 5.000, -400.000 + 151,'F2',1, 3.000, -400.000 + 151,'F3',1, 3.120, 200.000 + 152,'1 ',1, 1.630, 50.000 + 154,'1 ',1, 2.450, 200.000 + 201,'1 ',1, 3.670, -500.000 + 203,'1 ',1, -5.000, 30.000 + 203,'2 ',1, 5.000, 20.000 + 205,'1 ',1, 2.780, 300.000 + 212,'1 ',1, 5.130, 400.000 + 213,'1 ',1, 5.140, 400.000 + 3021,'1 ',1, 0.000, 1320.000 + 3022,'1 ',1, 0.000, 1080.000 + 0 /End of Fixed shunt data, Begin Generator data + 101,'1 ', 750.000, 165.207, 400.000, -100.000,1.01000, 0, 900.000, 1.00000E-2, 3.00000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 800.000, 50.000, 1,0.1289, 2,0.2524, 3,0.1031, 4,0.5156 + 102,'1 ', 650.000, 151.880, 410.000, -110.000,1.01000, 0, 950.000, 1.05000E-2, 3.20000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 700.000, 33.000, 1,0.3647, 2,0.1838, 3,0.0751, 4,0.3764 + 206,'1 ', 800.000, 283.913, 500.000, -400.000,1.00000, 0, 1000.000, 1.06000E-2, 2.51000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 850.000, 50.000, 1,0.1034, 2,0.4006, 3,0.0825, 4,0.4135 + 211,'1 ', 600.000, 18.351, 510.000, -100.000,1.00000, 0, 725.000, 1.08000E-2, 2.62000E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 100.0, 616.000, 30.000, 1,0.1423, 2,0.2210, 3,0.1842, 4,0.4525 + 301,'1 ', 996.884, 299.543, 700.000, -650.000,1.00000, 0, 1067.000, 1.09000E-2, 2.30000E-1, 1.40000E-2, 1.26000E-1,1.02500,1, 98.0, 1010.000, 320.000, 1,0.1118, 2,0.2184, 3,0.0893, 4,0.5805 + 301,'2 ', 996.884, 299.543, 710.000, -600.000,1.00000, 0, 1070.000, 1.10000E-2, 2.40000E-1, 1.10000E-2, 1.27000E-1,1.02600,1, 98.0, 1011.000, 321.000, 1,0.1173, 2,0.3200, 3,0.0936, 4,0.4691 + 301,'3 ', 996.884, 299.543, 720.000, -600.000,1.00000, 0, 1075.000, 8.00000E-3, 2.50000E-1, 1.20000E-2, 1.28000E-1,1.02700,1, 98.0, 1012.000, 322.000, 1,0.1260, 2,0.2268, 3,0.1827, 4,0.4644 + 401,'1 ', 321.000, 142.325, 600.000, -100.000,1.00000, 0, 600.000, 1.23000E-2, 2.22300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 90.0, 350.000, 25.000, 1,0.1625, 2,0.2423, 3,0.0990, 4,0.4962 + 402,'1 ', 321.000, 142.325, 610.000, -110.000,1.00000, 0, 610.000, 4.50000E-3, 2.43200E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 91.0, 351.000, 26.000, 1,0.1588, 2,0.2117, 3,0.1959, 4,0.4335 + 3011,'1 ', 1143.183, 176.800, 620.000, -120.000,1.00000, 0, 1050.000, 7.60000E-3, 3.54300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 92.0, 1400.000, 100.000, 1,0.1452, 2,0.1926, 3,0.2677, 4,0.3945 + 3018,'1 ', 400.000, -0.628, 300.000, -150.000,0.99000, 0, 530.000, 8.70000E-2, 3.56300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 92.5, 500.000, 50.000, 1,0.1043, 2,0.2037, 3,0.2749, 4,0.4171 + 3018,'2 ', 100.000, -0.157, 75.000, -75.000,0.99000, 0, 120.000, 2.40000E-2, 3.55300E-1, 0.00000E+0, 0.00000E+0,1.00000,1, 92.5, 110.000, 20.000, 1,0.3003, 2,0.1358, 3,0.2857, 4,0.2782 + 0 /End of Generator data, Begin Branch data + 151, 152,'1 ', 2.60000E-3, 4.60000E-2, 3.50000, 1200.00, 1100.00, 1000.00, 0.01000, -0.25000, 0.01100, -0.15000,1,2, 150.00, 1,0.2000, 2,0.3000, 3,0.4000, 4,0.1000 + 151, 152,'2 ', 2.61000E-3, 4.61000E-2, 3.51000, 1205.00, 1105.00, 1005.00, 0.01300, -0.25100, 0.01200, -0.02000,1,2, 149.00, 5,0.2315, 1,0.3056, 2,0.3704, 3,0.0926 + 151, 201,'*1',-0.00000E+0, 1.00000E-4, 0.00000, 1206.00, 1106.00, 1006.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 0.00, 1,1.0000 + 152, 202,'1 ', 8.00000E-4, 1.00000E-2, 0.95000, 1207.00, 1107.00, 1007.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 200.00, 1,0.3939, 2,0.2273, 3,0.3030, 4,0.0758 + 152, 3004,'1 ', 3.00000E-3, 3.00000E-2, 2.50000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 201.00, 5,0.2379, 1,0.3033, 2,0.3667, 3,0.0922 + 153, 154,'2 ', 6.00000E-3, 5.40000E-2, 0.15000, 350.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 80.00, 2,0.2727, 3,0.2727, 4,0.3636, 5,0.0909 + 153, 3006,'@1',-0.00000E+0, 1.00000E-4, 0.00000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 0.00, 1,1.0000 + 154, 155,'1 ', 5.00000E-3, 4.50000E-2, 0.10000, 400.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 81.00, 5,0.1914, 1,0.2535, 2,0.3065, 3,0.2486 + 154, 203,'1 ', 4.00000E-3, 4.00000E-2, 0.10000, 400.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 100.00, 2,0.2000, 3,0.3000, 4,0.4000, 5,0.1000 + 154, 205,'1 ', 3.30000E-4, 3.33000E-3, 0.09000, 600.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 120.00, 1,0.1667, 2,0.2500, 3,0.3333, 4,0.2500 + 154, 3008,'1 ', 2.70000E-3, 2.20000E-2, 0.30000, 800.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 119.00, 5,0.1925, 1,0.2550, 2,0.3083, 3,0.2442 + 201, 202,'1 ', 2.00000E-3, 2.50000E-2, 2.00000, 1200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 300.00, 2,0.1905, 3,0.2857, 4,0.3810, 5,0.1429 + 201, 207,'C1', 1.50000E-3, 1.50000E-2, 1.25000, 1200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 250.00, 1,0.2500, 2,0.3750, 3,0.2500, 4,0.1250 + 203, 205,'1 ', 5.00000E-3, 4.50000E-2, 0.08000, 200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 70.00, 5,0.1925, 1,0.2550, 2,0.3083, 3,0.2442 + 204, 207,'C2', 1.50000E-3, 1.50000E-2, 1.25000, 1200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 300.00, 2,0.2000, 3,0.3000, 4,0.4000, 5,0.1000 + 205, 212,'1 ',-0.00000E+0, 1.00000E-2, 0.00000, 1250.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,1, 71.00, 1,0.2000, 2,0.3000, 3,0.4000, 4,0.1000 + 205, 214,'2 ', 2.00000E-3, 2.50000E-2, 2.00000, 1200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 100.00, 5,0.2100, 1,0.2782, 2,0.3364, 3,0.1755 + 205, 216,'3 ', 5.00000E-3, 4.50000E-2, 0.08000, 200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 81.00, 2,0.1818, 3,0.2727, 4,0.3636, 5,0.1818 + 205, 217,'4 ', 5.00000E-3, 4.50000E-2, 0.08000, 200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 80.00, 1,0.1667, 2,0.2500, 3,0.3333, 4,0.2500 + 205, 218,'5 ', 5.00000E-3, 4.50000E-2, 0.08000, 200.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 59.00, 5,0.1650, 1,0.2186, 2,0.2643, 3,0.3521 + 213, 214,'1 ',-0.00000E+0, 1.00000E-2, 0.00000, 1250.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 0.50, 2,0.1429, 3,0.2143, 4,0.2857, 5,0.3571 + 3001, 3003,'1 ',-0.00000E+0, 8.00000E-3, 0.00000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 70.00, 1,0.1639, 2,0.2459, 3,0.3279, 4,0.2623 + 3002, 3004,'1 ', 6.00000E-3, 5.40000E-2, 0.09000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 200.00, 5,0.1925, 1,0.2550, 2,0.3083, 3,0.2442 + 3003, 3005,'1 ', 6.00000E-3, 5.40000E-2, 0.09000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 90.00, 2,0.2000, 3,0.3000, 4,0.4000, 5,0.1000 + 3003, 3005,'2 ', 6.00000E-3, 5.40000E-2, 0.09000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 90.00, 1,0.1333, 2,0.2000, 3,0.2667, 4,0.4000 + 3005, 3006,'1 ', 3.50000E-3, 3.00000E-2, 0.07000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 70.00, 5,0.1650, 1,0.2186, 2,0.2643, 3,0.3521 + 3005, 3007,'1 ', 3.00000E-3, 2.50000E-2, 0.06000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 80.00, 2,0.1527, 3,0.2290, 4,0.3053, 5,0.3130 + 3005, 3008,'1 ', 6.00000E-3, 5.00000E-2, 0.12000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,0,2, 60.00, 1,0.1802, 2,0.2703, 3,0.3604, 4,0.1892 + 3007, 3008,'1 ', 3.00000E-3, 2.50000E-2, 0.06000, 0.00, 0.00, 0.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 60.00, 5,0.1858, 1,0.2462, 2,0.4023, 3,0.1657 + 3008, 3009,'1 ', 3.00000E-3, 2.50000E-2, 0.06000, 25.00, 22.00, 18.00, 0.00000, 0.00000, 0.00000, 0.00000,1,2, 60.00, 1,0.1797, 2,0.2695, 3,0.3594, 4,0.1914 + 0 /End of Branch data, Begin Transformer data + 101, 151, 0,'T1',2,2,1, 1.71470E-1,-1.02880E-1,2,'EL DORADO NU',1, 1,0.3200, 2,0.3900, 3,0.1400, 4,0.1500,'Dyn1 ' + 1.10000E-3, 9.10000E-2, 1200.00 +21.6000, 21.600, 0.000, 1200.00, 1100.00, 1000.00, 1, 101,22.68000,20.52000, 1.05000, 0.95000, 25, 0, 0.00021, 0.00051, 0.000 +500.000, 500.000 + 102, 151, 0,'T2',2,1,2, 4.53750E+5, 2.60000E-3,2,'EL DORADO NU',1, 1,0.2100, 2,0.2500, 3,0.2200, 4,0.3200,'Dyn1 ' + 1.20000E-4, 7.60000E-3, 1210.00 +21.6000, 21.600, 0.000, 1210.00, 1125.00, 1025.00, 1, 102,22.57200,20.62800, 1.04500, 0.95500, 27, 0, 0.00022, 0.00052, 0.000 +500.000, 500.000 + 152, 153, 0,'T3',2,1,1, 2.10000E-4,-1.20000E-4,2,'MID LTC ',1, 1,0.3500, 2,0.2200, 3,0.2500, 4,0.1800,'YNyn0 ' + 1.70000E-4, 7.75000E-3, 800.00 +475.000, 500.000, 0.000, 800.00, 750.00, 700.00, 1, 154,525.0000,475.0000, 1.00000, 0.98000, 10, 0, 0.00023, 0.00053, 0.000 +230.000, 230.000 + 152, 3021, 0,'T4',1,2,2, 5.62500E+5, 2.80000E-3,2,'WDUM DC ',1, 1,0.3900, 2,0.3200, 3,0.1500, 4,0.1400,'YNyn0 ' + 1.30000E-3, 6.30000E-2, 1500.00 +1.10000, 500.000, 0.000, 1500.00, 1400.00, 1350.00, 4, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 2, 0.00000, 0.00000, 0.000 +1.00000, 18.000 + 152, 3022, 0,'T5',1,2,1, 4.00000E-4,-2.10000E-4,2,'EDUM DC ',1, 1,0.2200, 2,0.2500, 3,0.2100, 4,0.3200,'YNyn0 ' + 1.70000E-3, 7.40000E-2, 1510.00 +1.10000, 500.000, 0.000, 1510.00, 1410.00, 1393.00, 4, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 +1.00000, 18.000 + 154, 9154, 0,'W1',1,1,1, 0.00000E+0, 0.00000E+0,2,'WTG1XMER ',1, 1,1.0000, 0,1.0000, 0,1.0000, 0,1.0000,'YNd1 ' + 0.00000E+0, 5.83330E-1, 12.00 +1.00000, 0.000, 0.000, 12.00, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 +1.00000, 0.000 + 201, 211, 0,'T6',2,1,2, 2.62500E+5, 3.00000E-3,2,'HYDRO_G XMER',1, 1,0.1400, 2,0.1500, 3,0.3200, 4,0.3900,'YNd1 ' + 2.60000E-4, 1.34300E-2, 700.00 +500.000, 500.000, 0.000, 700.00, 650.00, 611.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 5, 0, 0.00000, 0.00000, 0.000 +20.0000, 20.000 + 203, 202, 0,'T7',1,2,1, 9.50000E-4,-4.60000E-4,1,'EAST PS ',1, 1,0.2754, 2,0.3261, 3,0.2899, 4,0.1087,'YNyn0 ' + 2.10000E-3, 5.40000E-2, 750.00 +0.99000, 230.000, 0.143, 750.00, 700.00, 657.00, 3, 0,12.00000,-11.0000,-900.000,-950.000, 33, 1, 0.00000, 0.00000, 0.000 +1.00000, 500.000 + 204, 205, 0,'T8',1,2,1, 1.13000E-3,-5.20000E-4,2,'SUB LTC ',1, 1,0.3019, 2,0.4245, 3,0.1321, 4,0.1415,'YNyn0 ' + 3.70000E-3, 4.50000E-2, 800.00 +1.03667, 500.000, 0.000, 800.00, 775.00, 717.00, 1, 205, 1.05000, 0.95000, 1.00000, 0.98000, 16, 0, 0.00024, 0.00054, 0.000 +1.00000, 230.000 + 204, 9204, 0,'W2',1,1,1, 0.00000E+0, 0.00000E+0,2,'WTG2XMER ',1, 2,1.0000, 0,1.0000, 0,1.0000, 0,1.0000,'YNd1 ' + 8.80000E-2, 6.61710E-1, 8.75 +1.00000, 0.000, 0.000, 8.75, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 +1.00000, 0.000 + 205, 206, 0,'T9',1,2,1, 1.13000E-3,-5.20000E-4,2,'URB TX ',1, 1,0.1905, 2,0.4643, 3,0.1667, 4,0.1786,'YNd1 ' + 1.60000E-3, 4.80000E-2, 900.00 +1.01591, 230.000, 0.000, 900.00, 850.00, 799.00, 2, 0, 1.05000, 0.97500,-175.000,-250.000, 12, 0, 0.00000, 0.00000, 0.000 +1.00000, 18.000 + 205, 215, 208,'3 ',1,1,2, 3.42000E+4, 2.28000E-3,2,'THREE WDG WI',3, 2,0.2540, 2,0.1746, 3,0.3333, 4,0.2381,'YN0yn0y0 ' + 7.52998E-4, 5.36670E-2, 150.00, 1.24790E-2, 8.73500E-1, 20.00, 2.00690E-2, 1.34000E+0, 15.00,0.60345, -36.7860 +1.00000, 230.000, 0.000, 150.00, 130.00, 120.00,-1, 215, 1.10000, 0.90000, 1.10000, 0.90000, 33, 5, 0.00025, 0.00064, 0.000 +1.00000, 18.000, 0.000, 20.00, 18.00, 15.00, 0, 0, 1.20000, 0.90120, 1.10000, 0.90000, 33, 0, 0.00012, 0.00046, 0.000 +1.00000, 230.000, 0.000, 15.00, 13.00, 10.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 6, 0.00000, 0.00000, 0.000 + 209, 217, 218,'4 ',2,3,2, 4.18934E+1, 9.98336E-6,2,'3WNDSTAT4 ',4, 2,0.4671, 2,0.1250, 3,0.2379, 4,0.1700,'YN0yn0yn0 ' + 2.28000E+5, 1.00010E-1, 30.00, 1.90000E+5, 9.00000E-2, 25.00, 2.66000E+5, 7.50000E-2, 35.00,0.99757, -37.3310 +230.000, 230.000, 0.000, 30.00, 20.00, 10.00,-1, 0,253.0000,207.0000, 1.10000, 0.90000, 33, 2, 0.00031, 0.00784, 0.000 +230.000, 230.000, 0.000, 25.00, 18.00, 12.00,-1, 217,253.0000,207.0000, 1.10000, 0.90000, 33, 2, 0.00021, 0.00862, 0.000 +230.000, 230.000, 0.000, 35.00, 26.00, 14.00,-1, 0,253.0000,207.0000, 1.10000, 0.90000, 33, 2, 0.00024, 0.00394, 0.000 + 3001, 3002, 3011,'1 ',1,1,1, 1.20000E-3,-4.20000E-3,2,'THREE WDG WI',1, 1,0.1238, 2,0.2477, 3,0.1548, 5,0.4737,'YN0yn0d1 ' + 1.13000E-4, 8.05000E-3, 1000.00, 2.50000E-4, 1.74700E-2, 1000.00, 3.01000E-4, 2.01000E-2, 1000.00,0.98588, -9.8267 +0.99884, 230.000, 0.000, 1200.00, 1150.00, 1090.00, 1, 3002, 1.10020, 0.92000, 1.16000, 0.93000, 33, 3, 0.00013, 0.00016, 0.000 +1.00000, 500.000, 0.000, 1250.00, 1175.00, 1112.00, 0, 0, 1.10010, 0.90000, 1.14000, 0.91000, 22, 0, 0.00012, 0.00015, 0.000 +1.00000, 19.400, 0.000, 1280.00, 1200.00, 1157.00, 0, 0, 1.10000, 0.91000, 1.10000, 0.92000, 11, 4, 0.00011, 0.00014, 0.000 + 3002, 93002, 0,'W3',1,1,1, 0.00000E+0, 0.00000E+0,2,'WTG3XMER ',1, 5,1.0000, 0,1.0000, 0,1.0000, 0,1.0000,'YNd1 ' + 0.00000E+0, 2.02703E+0, 3.70 +1.00000, 0.000, 0.000, 3.70, 0.00, 0.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 +1.00000, 0.000 + 3005, 3004, 0,'10',1,1,2, 2.06250E+5, 3.40000E-3,1,'WEST TX ',1, 1,0.2645, 2,0.4959, 3,0.1157, 4,0.1240,'YNa0 ' + 3.50000E-4, 9.64000E-3, 550.00 +1.00000, 230.000, 0.000, 550.00, 500.00, 455.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 3, 0, 0.00000, 0.00000, 0.000 +1.00000, 500.000 + 3008, 3018, 0,'11',2,1,2, 1.96875E+5, 3.50000E-3,2,'CATDOG_XMER ',1, 1,0.2051, 2,0.2500, 3,0.4487, 4,0.0962,'YNa0 ' + 4.40000E-4, 1.27600E-2, 525.00 +230.000, 230.000, 0.000, 525.00, 475.00, 423.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 22, 2, 0.00000, 0.00000, 0.000 +13.8000, 13.800 + 3008, 3012, 3010,'2 ',2,1,1, 2.10000E-4,-1.20000E-4,1,'3WNDSTAT2 ',2, 5,0.8000, 3,0.0500, 2,0.1000, 1,0.0500,'D1y0y0 ' + 5.15000E-3, 5.00000E-1, 20.00, 9.20000E-3, 8.00000E-1, 15.00, 3.75000E-3, 4.16670E-1, 25.00,0.98625, -30.5021 +230.000, 230.000, 0.000, 20.00, 18.00, 14.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 +230.000, 230.000, 0.000, 15.00, 13.00, 9.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 +21.6000, 21.600, 30.000, 25.00, 19.00, 16.00, 0, 0, 1.10000, 0.90000, 1.10000, 0.90000, 33, 0, 0.00000, 0.00000, 0.000 + 0 /End of Transformer data, Begin Area interchange data + 1, 101, -2800.000, 10.000,'CENTRAL ' + 2, 0, -1600.000, 10.000,'EAST ' + 3, 0, 2900.000, 55.000,'CENTRAL_DC ' + 4, 0, 300.000, 15.000,'EAST_COGEN1 ' + 5, 0, 900.000, 10.000,'WEST ' + 6, 0, 300.000, 20.000,'EAST_COGEN2 ' + 0 /End of Area interchange data, Begin Two-terminal dc line data +"TWO_TERM_DC1",1, 7.8543, 1490.65, 525.00, 400.00, 3.9420, 0.15560,'I', 0.00, 20, 1.00000 + 301, 2,13.00, 7.50, 0.0111, 3.8800, 500.0,0.44000,1.06275,1.10000,0.90000,0.00525, 0, 0, 0,'1 ', 2.0034 + 3021, 2,21.00,18.50, 0.0000, 3.0470, 230.0,0.95652,1.07500,1.10000,0.80000,0.00625, 0, 152, 3021,'T4', 2.0000 +"TWO_TERM_DC2",1, 8.2000, 1500.00, 525.00, 400.00, 4.1000, 0.15000,'I', 0.00, 20, 1.00000 + 301, 2,12.00, 8.00, 0.0110, 3.8800, 500.0,0.44000,1.05450,1.11200,0.90000,0.00515, 0, 0, 0,'1 ', 0.0098 + 3022, 2,20.00,18.00, 0.0120, 3.0470, 230.0,0.95652,1.06250,1.10000,0.80000,0.00625, 0, 152, 3022,'T5', 0.0074 + 0 /End of Two-terminal dc line data, Begin VSC dc line data +"VDCLINE1 ",1, 0.7100, 1,0.3204, 2,0.3883, 3,0.1942, 4,0.0971 + 3005,2,2, -209.00, 0.95000, 100.000, 0.100, 50.000, 400.00, 1200.00,0.10000, 100.00, -110.00, 0, 100.0 + 3008,1,1, 100.00, 0.99000, 90.000, 0.150, 40.000, 350.00, 1200.00,0.15000, 150.00, -140.00, 0, 100.0 +"VDCLINE2 ",1, 0.3500, 1,0.3705, 2,0.3597, 3,0.1799, 4,0.0899 + 203,2,1, -100.00, 1.00000, 100.000, 0.150, 123.000, 200.00, 1200.00,1.00000, 200.00, -150.00, 0, 100.0 + 205,1,1, 100.00, 1.00000, 93.000, 0.120, 98.000, 250.00, 1250.00,1.00000, 225.00, -250.00, 0, 99.0 + 0 /End of VSC dc line data, Begin Impedance correction table data + 1, -30.00, 1.10000, -24.00, 1.09100, -18.00, 1.08400, -12.00, 1.06300, -6.00, 1.03200, 0.00, 1.00000, 6.00, 1.03000, 12.00, 1.06000, 18.00, 1.08000, 24.00, 1.09000, 30.00, 1.11000 + 2,0.60000, 1.06000,0.70000, 1.05000,0.80000, 1.04000,0.90000, 1.03000,0.95000, 1.02000,1.00000, 1.01000,1.05000, 0.99000,1.10000, 0.98000,1.20000, 0.97000,1.30000, 0.96000,1.40000, 0.95000 + 3,0.95000, 1.00620,1.00000, 1.00000,1.05000, 0.99006 + 4,0.95000, 0.96964,1.00000, 1.00000,1.05000, 1.02486 + 5,0.94000, 1.00620,1.00000, 1.00000,1.06000, 0.99006 + 6,0.94000, 0.96964,1.00000, 1.00000,1.06000, 1.02486 + 0 /End of Impedance correction table data, Begin Multi-terminal dc line data +"MULTERM_DC_1" 4, 5, 4, 1, 212, 400.00, 0 + 402, 4,10.00, 8.00, 0.0000, 19.0000, 500.0,0.22000,1.01000,1.10000,0.97000,0.01000, 321.00, 1.0000, 0.15000, 3 + 401, 4,10.00, 8.00, 0.0000, 19.0000, 500.0,0.22000,1.01000,1.10000,0.97000,0.01000, 321.00, 1.0000, 0.15000, 3 + 212, 4,20.00,18.00, 0.0000, 10.0000, 230.0,0.45200,1.04000,1.10000,0.90000,0.01000, 500.00, 1.0000, 0.00000, 1 + 213, 4,20.00,18.00, 0.0000, 10.0000, 230.0,0.45200,1.10000,1.10000,0.90000,0.01000, -303.80, 1.0000, 0.00000, 4 + 1, 401, 4, 4,'DC1 ', 0, 0.0000, 4 + 2, 212, 2, 2,'DC2 ', 0, 0.0000, 2 + 3, 402, 4, 4,'DC3 ', 0, 0.0000, 4 + 4, 213, 2, 2,'DC4 ', 0, 0.0000, 2 + 5, 0, 4, 4,'DC5 ', 0, 0.0000, 4 + 1, 5,'1',1, 29.0000, 0.00 + 2, 5,'1',1, 29.0000, 0.00 + 3, 5,'1',1, 29.0000, 0.00 + 4, 5,'1',1, 29.0000, 0.00 + 0 /End of Multi-terminal dc line data, Begin Multi-section line data + 201, 204,'&1',2, 207 + 0 /End of Multi-section line data, Begin Zone data + 1,'NORTH_A1 ' + 2,'MID_A1_A2_A5' + 3,'DISCNT_IN_A1' + 4,'SOUTH_A1_A5 ' + 5,'ALL_A3 ' + 6,'NORTH_A5 ' + 7,'NORTH_A2 ' + 8,'SOUTH_A2 ' + 9,'ALL_A4_A6 ' + 0 /End of Zone data, Begin Inter-area transfer data + 1, 2,'A', 1000.00 + 1, 5,'B', -3800.00 + 2, 4,'C', -300.00 + 2, 6,'E', -300.00 + 3, 5,'D', 2900.00 + 0 /End of Inter-area transfer data, Begin Owner data + 1,'OWNER 1 ' + 2,'OWNER 2 ' + 3,'OWNER 3 ' + 4,'OWNER 4 ' + 5,'OWNER 5 ' + 0 /End of Owner data, Begin FACTS device data +"FACTS_DVCE_1", 153, 0,1, 0.000, 0.000,1.01500, 50.000, 100.000,0.92630,1.13400,1.00000, 0.000, 0.05652, 100.0, 1, 0.00000, 0.00000,0, 0," " +"FACTS_DVCE_2", 153, 155,1, 350.000, 40.000,1.01500, 25.000, 9999.000,0.90000,1.10000,1.00000, 0.000, 0.05000, 100.0, 1, 0.00000, 0.00000,0, 0," " + 0 /End of FACTS device data, Begin Switched shunt data + 152,1,0,1,1.04500,0.95500, 0, 100.0,' ', -233.00, 1, -15.00, 2, -5.00, 3, -10.00, 4, -8.00, 5, -7.00, 6, -5.00, 7, -7.00, 8, -4.00 + 154,1,0,1,1.04480,0.96500, 0, 100.0,' ', 124.00, 1, 25.00, 2, 10.00, 2, 15.00, 1, 15.00, 2, 5.00, 3, 3.00, 2, 4.00, 1, 7.00 + 3005,4,0,1,0.98000,0.64000, 3005, 100.0,'VDCLINE1 ', 0.00, 1, 33.35 + 3021,2,0,1,1.00000,1.00000, 0, 100.0,' ', 493.37, 2, 200.00, 1, 100.00, 2, 50.00, 4, 25.00 + 3022,2,0,1,1.00000,1.00000, 0, 100.0,' ', 594.29, 4, 100.00, 2, 50.00, 4, 25.00, 3, 20.00, 2, 20.00 + 93002,1,0,1,0.99628,0.99628, 0, 100.0,' ', 1.44, 1, 1.44 + 0 /End of Switched shunt data, Begin GNE device data + 0 /End of GNE device data, Begin Induction machine data + 3010,"1 ",1,1,2, 5, 4, 5,1,1, 1.000, 21.600,1, 1.0000, 1.000, 1.000, 1.000, 1.000, 1.000 + 9154,"1 ",1,1,2, 1, 3, 1,1,2, 2.270, 4.160,2,-2.0000, 1.000, 1.000, 1.000, -1.000, 1.000 + 9204,"1 ",1,1,2, 2, 8, 2,1,1, 10.000, 0.575,1,10.0000, 1.000, 1.000, 1.000, 1.000, 1.000 + 93002,"1 ",1,1,2, 5, 6, 5,1,2, 5.620, 0.690,2,-5.0000, 1.000, 1.000, 1.000, -1.000, 1.000 + 0 /End of Induction machine data +Q diff --git a/Grids_and_profiles/grids/fubm_caseHVDC_vt.ods b/Grids_and_profiles/grids/fubm_caseHVDC_vt.ods new file mode 100644 index 000000000..c2b429fc1 Binary files /dev/null and b/Grids_and_profiles/grids/fubm_caseHVDC_vt.ods differ diff --git a/Grids_and_profiles/grids/grid_to_check_flow_signs.gridcal b/Grids_and_profiles/grids/grid_to_check_flow_signs.gridcal new file mode 100644 index 000000000..92b0932dc Binary files /dev/null and b/Grids_and_profiles/grids/grid_to_check_flow_signs.gridcal differ diff --git a/Grids_and_profiles/grids/ntc_8_bus.gridcal b/Grids_and_profiles/grids/ntc_8_bus.gridcal new file mode 100644 index 000000000..1babdeb7f Binary files /dev/null and b/Grids_and_profiles/grids/ntc_8_bus.gridcal differ diff --git a/Grids_and_profiles/grids/tr_remote_v_control_example.gridcal b/Grids_and_profiles/grids/tr_remote_v_control_example.gridcal new file mode 100644 index 000000000..5989a0f93 Binary files /dev/null and b/Grids_and_profiles/grids/tr_remote_v_control_example.gridcal differ diff --git a/src/GridCal/Gui/Diagrams/MapWidget/grid_map_widget.py b/src/GridCal/Gui/Diagrams/MapWidget/grid_map_widget.py index a6ee1d279..48b36643e 100644 --- a/src/GridCal/Gui/Diagrams/MapWidget/grid_map_widget.py +++ b/src/GridCal/Gui/Diagrams/MapWidget/grid_map_widget.py @@ -30,6 +30,7 @@ from PySide6.QtGui import (QIcon, QPixmap, QImage, QPainter, QStandardItemModel, QStandardItem, QColor, QDropEvent, QWheelEvent) +from GridCal.Gui.SubstationDesigner.substation_designer import SubstationDesigner from GridCalEngine.Devices.Diagrams.map_location import MapLocation from GridCalEngine.Devices.Substation import Bus from GridCalEngine.Devices.Branches.line import Line @@ -857,15 +858,46 @@ def dropEvent(self, event: QDropEvent): y0 = point0.y() lat, lon = self.to_lat_lon(x=x0, y=y0) - # print(f"Dropped at x:{x0}, y:{y0}, lat:{lat}, lon:{lon}") - if obj_type == self.library_model.get_substation_mime_data(): - api_object = Substation(name=f"Substation {self.circuit.get_substation_number()}", - latitude=lat, - longitude=lon) - self.circuit.add_substation(obj=api_object) - substation_graphics = self.add_api_substation(api_object=api_object, lat=lat, lon=lon) - substation_graphics.add_voltage_level() + self.create_substation_with_dialogue(lat=lat, lon=lon) + + def create_substation_with_dialogue(self, lat, lon): + """ + Create a substation using the dialogue + :param lat: + :param lon: + :return: + """ + kv = self.gui.get_default_voltage() + dlg = SubstationDesigner(grid=self.circuit, default_voltage=kv) + dlg.exec() + if dlg.was_ok(): + + # create the SE + se_object = Substation(name=dlg.get_name(), latitude=lat, longitude=lon) + + self.circuit.add_substation(obj=se_object) + substation_graphics = self.add_api_substation(api_object=se_object, lat=lat, lon=lon) + + for vl_template in dlg.get_voltage_levels(): + + # substation_graphics.add_voltage_level() + vl = VoltageLevel(name=f"{se_object.name} @{kv}KV VL", + Vnom=vl_template.voltage, + substation=se_object) + self.circuit.add_voltage_level(vl) + + bus = Bus(name=f"{se_object.name} @{kv}KV bus", + Vnom=vl_template.voltage, + substation=se_object, + voltage_level=vl) + self.circuit.add_bus(obj=bus) + + # add the vl graphics + self.add_api_voltage_level(substation_graphics=substation_graphics, api_object=vl) + + # sort voltage levels + substation_graphics.sort_voltage_levels() def wheelEvent(self, event: QWheelEvent): """ @@ -874,12 +906,12 @@ def wheelEvent(self, event: QWheelEvent): :return: """ - # SANTIAGO: NO TOCAR ESTO ES EL COMPORTAMIENTO DESEADO + # SANTIAGO: DO NOT TOUCH, THIS IS THE DESIRED BEHAVIOUR self.update_device_sizes() - def get_branch_width(self): + def get_branch_width(self) -> float: """ - + Get the desired branch width :return: """ max_zoom = self.map.max_level @@ -888,9 +920,9 @@ def get_branch_width(self): scale = self.diagram.min_branch_width + (zoom - min_zoom) / (max_zoom - min_zoom) return scale - def update_device_sizes(self): + def update_device_sizes(self) -> None: """ - + Updat ethe devices' sizes :return: """ diff --git a/src/GridCal/Gui/Diagrams/MapWidget/map_widget.py b/src/GridCal/Gui/Diagrams/MapWidget/map_widget.py index a6e6a8115..46d5f7d9d 100644 --- a/src/GridCal/Gui/Diagrams/MapWidget/map_widget.py +++ b/src/GridCal/Gui/Diagrams/MapWidget/map_widget.py @@ -469,12 +469,12 @@ def __init__(self, self.view_tlat = 0 # some cursors - self.standard_cursor = QCursor(Qt.ArrowCursor) - self.box_select_cursor = QCursor(Qt.CrossCursor) - self.wait_cursor = QCursor(Qt.WaitCursor) - self.drag_cursor = QCursor(Qt.OpenHandCursor) + self.standard_cursor = QCursor(Qt.CursorShape.ArrowCursor) + self.box_select_cursor = QCursor(Qt.CursorShape.CrossCursor) + self.wait_cursor = QCursor(Qt.CursorShape.WaitCursor) + self.drag_cursor = QCursor(Qt.CursorShape.OpenHandCursor) - self.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding) + self.setSizePolicy(QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Expanding) self.setMinimumSize(self.tile_width, self.tile_height) self.setMouseTracking(True) @@ -672,9 +672,9 @@ def mouseReleaseEvent(self, event: QMouseEvent) -> None: self.setCursor(self.default_cursor) b = event.button() - if b == Qt.NoButton: + if b == Qt.MouseButton.NoButton: pass - elif b == Qt.LeftButton: + elif b == Qt.MouseButton.LeftButton: self.left_mbutton_down = False if self.start_drag_x is None: @@ -688,10 +688,10 @@ def mouseReleaseEvent(self, event: QMouseEvent) -> None: longitude, latitude = self.view_to_geo(x, y) self.position_callback(latitude, longitude, x, y) - elif b == Qt.MidButton: + elif b == Qt.MouseButton.MiddleButton: self.mid_mbutton_down = False - elif b == Qt.RightButton: + elif b == Qt.MouseButton.RightButton: self.right_mbutton_down = False else: @@ -705,13 +705,13 @@ def mouseDoubleClickEvent(self, event: QMouseEvent): :return: """ b = event.button() - if b == Qt.NoButton: + if b == Qt.MouseButton.NoButton: pass - elif b == Qt.LeftButton: + elif b == Qt.MouseButton.LeftButton: pass - elif b == Qt.MidButton: + elif b == Qt.MouseButton.MiddleButton: pass - elif b == Qt.RightButton: + elif b == Qt.MouseButton.RightButton: pass else: pass @@ -781,7 +781,7 @@ def mouseMoveEvent(self, event: QMouseEvent): def keyPressEvent(self, event: QKeyEvent): """Capture a key press.""" - if event.key() == Qt.Key_Shift: + if event.key() == Qt.Key.Key_Shift: self.shift_down = True self.default_cursor = self.box_select_cursor self.setCursor(self.default_cursor) @@ -792,7 +792,7 @@ def keyReleaseEvent(self, event: QKeyEvent): """Capture a key release.""" key = event.key() - if event.key() == Qt.Key_Shift: + if event.key() == Qt.Key.Key_Shift: self.shift_down = False self.default_cursor = self.standard_cursor self.setCursor(self.default_cursor) diff --git a/src/GridCal/Gui/Diagrams/base_diagram_widget.py b/src/GridCal/Gui/Diagrams/base_diagram_widget.py index 53d5cf695..ed9ba8935 100644 --- a/src/GridCal/Gui/Diagrams/base_diagram_widget.py +++ b/src/GridCal/Gui/Diagrams/base_diagram_widget.py @@ -18,7 +18,6 @@ from typing import List, Dict, Union, Tuple, Callable, TYPE_CHECKING import numpy as np import cv2 -from docutils.nodes import title from matplotlib import pyplot as plt from PySide6.QtCore import Qt diff --git a/src/GridCal/Gui/Main/MainWindow.py b/src/GridCal/Gui/Main/MainWindow.py index 09e2e1fbf..0604abda5 100644 --- a/src/GridCal/Gui/Main/MainWindow.py +++ b/src/GridCal/Gui/Main/MainWindow.py @@ -4191,20 +4191,42 @@ def setupUi(self, mainWindow): self.frame_77.setFrameShadow(QFrame.Raised) self.gridLayout_11 = QGridLayout(self.frame_77) self.gridLayout_11.setObjectName(u"gridLayout_11") - self.label_115 = QLabel(self.frame_77) - self.label_115.setObjectName(u"label_115") + self.raw_export_version_comboBox = QComboBox(self.frame_77) + self.raw_export_version_comboBox.setObjectName(u"raw_export_version_comboBox") + + self.gridLayout_11.addWidget(self.raw_export_version_comboBox, 10, 1, 1, 1) + + self.model_version_label = QLabel(self.frame_77) + self.model_version_label.setObjectName(u"model_version_label") + self.model_version_label.setFont(font1) + + self.gridLayout_11.addWidget(self.model_version_label, 4, 0, 1, 2) + + self.label_131 = QLabel(self.frame_77) + self.label_131.setObjectName(u"label_131") palette42 = QPalette() palette42.setBrush(QPalette.Active, QPalette.WindowText, brush) palette42.setBrush(QPalette.Inactive, QPalette.WindowText, brush5) palette42.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) - self.label_115.setPalette(palette42) - self.label_115.setFont(font4) + self.label_131.setPalette(palette42) + self.label_131.setFont(font4) - self.gridLayout_11.addWidget(self.label_115, 0, 1, 1, 1) + self.gridLayout_11.addWidget(self.label_131, 8, 1, 1, 1) - self.verticalSpacer_20 = QSpacerItem(20, 436, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) + self.label_145 = QLabel(self.frame_77) + self.label_145.setObjectName(u"label_145") + self.label_145.setMinimumSize(QSize(24, 24)) + self.label_145.setMaximumSize(QSize(24, 24)) + self.label_145.setPixmap(QPixmap(u":/Icons/icons/new2c.svg")) + self.label_145.setScaledContents(True) + + self.gridLayout_11.addWidget(self.label_145, 8, 0, 1, 1) - self.gridLayout_11.addItem(self.verticalSpacer_20, 7, 1, 1, 1) + self.label_39 = QLabel(self.frame_77) + self.label_39.setObjectName(u"label_39") + self.label_39.setFont(font1) + + self.gridLayout_11.addWidget(self.label_39, 2, 0, 1, 2) self.label_136 = QLabel(self.frame_77) self.label_136.setObjectName(u"label_136") @@ -4215,24 +4237,19 @@ def setupUi(self, mainWindow): self.gridLayout_11.addWidget(self.label_136, 0, 0, 1, 1) - self.label_39 = QLabel(self.frame_77) - self.label_39.setObjectName(u"label_39") - self.label_39.setFont(font1) + self.file_information_label = QLabel(self.frame_77) + self.file_information_label.setObjectName(u"file_information_label") + self.file_information_label.setFont(font1) + self.file_information_label.setWordWrap(True) + self.file_information_label.setTextInteractionFlags(Qt.LinksAccessibleByMouse|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse) - self.gridLayout_11.addWidget(self.label_39, 2, 0, 1, 2) + self.gridLayout_11.addWidget(self.file_information_label, 3, 0, 1, 2) - self.line_28 = QFrame(self.frame_77) - self.line_28.setObjectName(u"line_28") - palette43 = QPalette() - palette43.setBrush(QPalette.Active, QPalette.WindowText, brush3) - palette43.setBrush(QPalette.Inactive, QPalette.WindowText, brush3) - palette43.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) - self.line_28.setPalette(palette43) - self.line_28.setFrameShadow(QFrame.Plain) - self.line_28.setLineWidth(4) - self.line_28.setFrameShape(QFrame.Shape.HLine) + self.user_name_label = QLabel(self.frame_77) + self.user_name_label.setObjectName(u"user_name_label") + self.user_name_label.setFont(font1) - self.gridLayout_11.addWidget(self.line_28, 1, 0, 1, 2) + self.gridLayout_11.addWidget(self.user_name_label, 5, 0, 1, 2) self.saveResultsCheckBox = QCheckBox(self.frame_77) self.saveResultsCheckBox.setObjectName(u"saveResultsCheckBox") @@ -4240,25 +4257,57 @@ def setupUi(self, mainWindow): self.gridLayout_11.addWidget(self.saveResultsCheckBox, 6, 0, 1, 2) - self.user_name_label = QLabel(self.frame_77) - self.user_name_label.setObjectName(u"user_name_label") - self.user_name_label.setFont(font1) + self.label_112 = QLabel(self.frame_77) + self.label_112.setObjectName(u"label_112") + self.label_112.setFont(font1) - self.gridLayout_11.addWidget(self.user_name_label, 5, 0, 1, 2) + self.gridLayout_11.addWidget(self.label_112, 10, 0, 1, 1) - self.model_version_label = QLabel(self.frame_77) - self.model_version_label.setObjectName(u"model_version_label") - self.model_version_label.setFont(font1) + self.label_115 = QLabel(self.frame_77) + self.label_115.setObjectName(u"label_115") + palette43 = QPalette() + palette43.setBrush(QPalette.Active, QPalette.WindowText, brush) + palette43.setBrush(QPalette.Inactive, QPalette.WindowText, brush5) + palette43.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) + self.label_115.setPalette(palette43) + self.label_115.setFont(font4) - self.gridLayout_11.addWidget(self.model_version_label, 4, 0, 1, 2) + self.gridLayout_11.addWidget(self.label_115, 0, 1, 1, 1) - self.file_information_label = QLabel(self.frame_77) - self.file_information_label.setObjectName(u"file_information_label") - self.file_information_label.setFont(font1) - self.file_information_label.setWordWrap(True) - self.file_information_label.setTextInteractionFlags(Qt.LinksAccessibleByMouse|Qt.TextSelectableByKeyboard|Qt.TextSelectableByMouse) + self.verticalSpacer_20 = QSpacerItem(20, 436, QSizePolicy.Policy.Minimum, QSizePolicy.Policy.Expanding) - self.gridLayout_11.addWidget(self.file_information_label, 3, 0, 1, 2) + self.gridLayout_11.addItem(self.verticalSpacer_20, 11, 1, 1, 1) + + self.line_28 = QFrame(self.frame_77) + self.line_28.setObjectName(u"line_28") + palette44 = QPalette() + palette44.setBrush(QPalette.Active, QPalette.WindowText, brush3) + palette44.setBrush(QPalette.Inactive, QPalette.WindowText, brush3) + palette44.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) + self.line_28.setPalette(palette44) + self.line_28.setFrameShadow(QFrame.Plain) + self.line_28.setLineWidth(4) + self.line_28.setFrameShape(QFrame.Shape.HLine) + + self.gridLayout_11.addWidget(self.line_28, 1, 0, 1, 2) + + self.line_33 = QFrame(self.frame_77) + self.line_33.setObjectName(u"line_33") + palette45 = QPalette() + palette45.setBrush(QPalette.Active, QPalette.WindowText, brush3) + palette45.setBrush(QPalette.Inactive, QPalette.WindowText, brush3) + palette45.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) + self.line_33.setPalette(palette45) + self.line_33.setFrameShadow(QFrame.Plain) + self.line_33.setLineWidth(4) + self.line_33.setFrameShape(QFrame.Shape.HLine) + + self.gridLayout_11.addWidget(self.line_33, 9, 0, 1, 2) + + self.label_24 = QLabel(self.frame_77) + self.label_24.setObjectName(u"label_24") + + self.gridLayout_11.addWidget(self.label_24, 7, 0, 1, 1) self.horizontalLayout_40.addWidget(self.frame_77) @@ -4272,38 +4321,20 @@ def setupUi(self, mainWindow): self.gridLayout_5.setObjectName(u"gridLayout_5") self.label_134 = QLabel(self.frame_79) self.label_134.setObjectName(u"label_134") - palette44 = QPalette() - palette44.setBrush(QPalette.Active, QPalette.WindowText, brush) - palette44.setBrush(QPalette.Inactive, QPalette.WindowText, brush5) - palette44.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) - self.label_134.setPalette(palette44) + palette46 = QPalette() + palette46.setBrush(QPalette.Active, QPalette.WindowText, brush) + palette46.setBrush(QPalette.Inactive, QPalette.WindowText, brush5) + palette46.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) + self.label_134.setPalette(palette46) self.label_134.setFont(font4) self.gridLayout_5.addWidget(self.label_134, 0, 1, 1, 2) - self.label_135 = QLabel(self.frame_79) - self.label_135.setObjectName(u"label_135") - self.label_135.setFont(font1) - - self.gridLayout_5.addWidget(self.label_135, 2, 0, 1, 3) - - self.cgmes_profiles_listView = QListView(self.frame_79) - self.cgmes_profiles_listView.setObjectName(u"cgmes_profiles_listView") - self.cgmes_profiles_listView.setFont(font1) - - self.gridLayout_5.addWidget(self.cgmes_profiles_listView, 12, 0, 1, 3) - - self.label_90 = QLabel(self.frame_79) - self.label_90.setObjectName(u"label_90") - self.label_90.setFont(font1) - - self.gridLayout_5.addWidget(self.label_90, 8, 0, 1, 3) - - self.cgmes_version_comboBox = QComboBox(self.frame_79) - self.cgmes_version_comboBox.setObjectName(u"cgmes_version_comboBox") - self.cgmes_version_comboBox.setFont(font1) + self.cgmes_boundary_set_label = QLabel(self.frame_79) + self.cgmes_boundary_set_label.setObjectName(u"cgmes_boundary_set_label") + self.cgmes_boundary_set_label.setFont(font1) - self.gridLayout_5.addWidget(self.cgmes_version_comboBox, 3, 0, 1, 3) + self.gridLayout_5.addWidget(self.cgmes_boundary_set_label, 9, 0, 1, 2) self.label_139 = QLabel(self.frame_79) self.label_139.setObjectName(u"label_139") @@ -4311,12 +4342,6 @@ def setupUi(self, mainWindow): self.gridLayout_5.addWidget(self.label_139, 11, 0, 1, 3) - self.cgmes_single_profile_per_file_checkBox = QCheckBox(self.frame_79) - self.cgmes_single_profile_per_file_checkBox.setObjectName(u"cgmes_single_profile_per_file_checkBox") - self.cgmes_single_profile_per_file_checkBox.setFont(font1) - - self.gridLayout_5.addWidget(self.cgmes_single_profile_per_file_checkBox, 13, 0, 1, 3) - self.label_137 = QLabel(self.frame_79) self.label_137.setObjectName(u"label_137") self.label_137.setMinimumSize(QSize(24, 24)) @@ -4326,19 +4351,36 @@ def setupUi(self, mainWindow): self.gridLayout_5.addWidget(self.label_137, 0, 0, 1, 1) + self.label_102 = QLabel(self.frame_79) + self.label_102.setObjectName(u"label_102") + + self.gridLayout_5.addWidget(self.label_102, 10, 0, 1, 1) + + self.label_135 = QLabel(self.frame_79) + self.label_135.setObjectName(u"label_135") + self.label_135.setFont(font1) + + self.gridLayout_5.addWidget(self.label_135, 2, 0, 1, 3) + self.line_31 = QFrame(self.frame_79) self.line_31.setObjectName(u"line_31") - palette45 = QPalette() - palette45.setBrush(QPalette.Active, QPalette.WindowText, brush3) - palette45.setBrush(QPalette.Inactive, QPalette.WindowText, brush3) - palette45.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) - self.line_31.setPalette(palette45) + palette47 = QPalette() + palette47.setBrush(QPalette.Active, QPalette.WindowText, brush3) + palette47.setBrush(QPalette.Inactive, QPalette.WindowText, brush3) + palette47.setBrush(QPalette.Disabled, QPalette.WindowText, brush1) + self.line_31.setPalette(palette47) self.line_31.setFrameShadow(QFrame.Plain) self.line_31.setLineWidth(4) self.line_31.setFrameShape(QFrame.Shape.HLine) self.gridLayout_5.addWidget(self.line_31, 1, 0, 1, 3) + self.cgmes_profiles_listView = QListView(self.frame_79) + self.cgmes_profiles_listView.setObjectName(u"cgmes_profiles_listView") + self.cgmes_profiles_listView.setFont(font1) + + self.gridLayout_5.addWidget(self.cgmes_profiles_listView, 12, 0, 1, 3) + self.selectCGMESBoundarySetButton = QPushButton(self.frame_79) self.selectCGMESBoundarySetButton.setObjectName(u"selectCGMESBoundarySetButton") self.selectCGMESBoundarySetButton.setMaximumSize(QSize(80, 16777215)) @@ -4346,16 +4388,28 @@ def setupUi(self, mainWindow): self.gridLayout_5.addWidget(self.selectCGMESBoundarySetButton, 9, 2, 1, 1) - self.cgmes_boundary_set_label = QLabel(self.frame_79) - self.cgmes_boundary_set_label.setObjectName(u"cgmes_boundary_set_label") - self.cgmes_boundary_set_label.setFont(font1) + self.cgmes_version_comboBox = QComboBox(self.frame_79) + self.cgmes_version_comboBox.setObjectName(u"cgmes_version_comboBox") + self.cgmes_version_comboBox.setFont(font1) - self.gridLayout_5.addWidget(self.cgmes_boundary_set_label, 9, 0, 1, 2) + self.gridLayout_5.addWidget(self.cgmes_version_comboBox, 3, 0, 1, 3) - self.label_102 = QLabel(self.frame_79) - self.label_102.setObjectName(u"label_102") + self.label_90 = QLabel(self.frame_79) + self.label_90.setObjectName(u"label_90") + self.label_90.setFont(font1) - self.gridLayout_5.addWidget(self.label_102, 10, 0, 1, 1) + self.gridLayout_5.addWidget(self.label_90, 8, 0, 1, 3) + + self.cgmes_single_profile_per_file_checkBox = QCheckBox(self.frame_79) + self.cgmes_single_profile_per_file_checkBox.setObjectName(u"cgmes_single_profile_per_file_checkBox") + self.cgmes_single_profile_per_file_checkBox.setFont(font1) + + self.gridLayout_5.addWidget(self.cgmes_single_profile_per_file_checkBox, 13, 0, 1, 3) + + self.cgmes_map_regions_like_raw_checkBox = QCheckBox(self.frame_79) + self.cgmes_map_regions_like_raw_checkBox.setObjectName(u"cgmes_map_regions_like_raw_checkBox") + + self.gridLayout_5.addWidget(self.cgmes_map_regions_like_raw_checkBox, 14, 0, 1, 1) self.horizontalLayout_40.addWidget(self.frame_79) @@ -5682,31 +5736,39 @@ def retranslateUi(self, mainWindow): #if QT_CONFIG(tooltip) self.file_tab.setToolTip(QCoreApplication.translate("mainWindow", u"File settings", None)) #endif // QT_CONFIG(tooltip) - self.label_115.setText(QCoreApplication.translate("mainWindow", u"File Information", None)) - self.label_136.setText("") + self.model_version_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) + self.label_131.setText(QCoreApplication.translate("mainWindow", u"Raw files", None)) + self.label_145.setText("") self.label_39.setText(QCoreApplication.translate("mainWindow", u"File path", None)) + self.label_136.setText("") + self.file_information_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) + self.user_name_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) #if QT_CONFIG(tooltip) self.saveResultsCheckBox.setToolTip(QCoreApplication.translate("mainWindow", u"If checked, the results are stored inside the gridcal file in a compressed format.", None)) #endif // QT_CONFIG(tooltip) self.saveResultsCheckBox.setText(QCoreApplication.translate("mainWindow", u"Save results in .gridcal files", None)) - self.user_name_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) - self.model_version_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) - self.file_information_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) + self.label_112.setText(QCoreApplication.translate("mainWindow", u"Export version", None)) + self.label_115.setText(QCoreApplication.translate("mainWindow", u"File Information", None)) + self.label_24.setText("") self.label_134.setText(QCoreApplication.translate("mainWindow", u"CGMES", None)) - self.label_135.setText(QCoreApplication.translate("mainWindow", u"Export version", None)) - self.label_90.setText(QCoreApplication.translate("mainWindow", u"Boundary set", None)) +#if QT_CONFIG(tooltip) + self.cgmes_boundary_set_label.setToolTip(QCoreApplication.translate("mainWindow", u"Path of the CGMES default boundary set (single zip file)", None)) +#endif // QT_CONFIG(tooltip) + self.cgmes_boundary_set_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) self.label_139.setText(QCoreApplication.translate("mainWindow", u"Profiles to export", None)) - self.cgmes_single_profile_per_file_checkBox.setText(QCoreApplication.translate("mainWindow", u"One file per profile", None)) self.label_137.setText("") + self.label_102.setText("") + self.label_135.setText(QCoreApplication.translate("mainWindow", u"Export version", None)) #if QT_CONFIG(tooltip) self.selectCGMESBoundarySetButton.setToolTip(QCoreApplication.translate("mainWindow", u"Select the CGMES boundary set (single zip file)", None)) #endif // QT_CONFIG(tooltip) self.selectCGMESBoundarySetButton.setText(QCoreApplication.translate("mainWindow", u"Select", None)) + self.label_90.setText(QCoreApplication.translate("mainWindow", u"Boundary set", None)) + self.cgmes_single_profile_per_file_checkBox.setText(QCoreApplication.translate("mainWindow", u"One file per profile", None)) #if QT_CONFIG(tooltip) - self.cgmes_boundary_set_label.setToolTip(QCoreApplication.translate("mainWindow", u"Path of the CGMES default boundary set (single zip file)", None)) + self.cgmes_map_regions_like_raw_checkBox.setToolTip(QCoreApplication.translate("mainWindow", u"

If active the CGMEs mapping will be:

GeographicalRegion <-> Area

SubGeographicalRegion <-> Zone

Otherwise:

GeographicalRegion <-> Country

SubGeographicalRegion <-> Community


", None)) #endif // QT_CONFIG(tooltip) - self.cgmes_boundary_set_label.setText(QCoreApplication.translate("mainWindow", u"...", None)) - self.label_102.setText("") + self.cgmes_map_regions_like_raw_checkBox.setText(QCoreApplication.translate("mainWindow", u"Map regions like raw files", None)) self.settings_tabWidget.setTabText(self.settings_tabWidget.indexOf(self.file_tab), QCoreApplication.translate("mainWindow", u"File", None)) #if QT_CONFIG(tooltip) self.settings_tabWidget.setTabToolTip(self.settings_tabWidget.indexOf(self.file_tab), QCoreApplication.translate("mainWindow", u"File related settings", None)) diff --git a/src/GridCal/Gui/Main/MainWindow.ui b/src/GridCal/Gui/Main/MainWindow.ui index 00c895b20..58e8d55ab 100644 --- a/src/GridCal/Gui/Main/MainWindow.ui +++ b/src/GridCal/Gui/Main/MainWindow.ui @@ -9063,8 +9063,23 @@ QProgressBar::chunk{ QFrame::Raised - - + + + + + + + + 9 + + + + ... + + + + + @@ -9108,22 +9123,46 @@ QProgressBar::chunk{ - File Information + Raw files - - - - Qt::Vertical + + + + + 24 + 24 + - + - 20 - 436 + 24 + 24 - + + + + + :/Icons/icons/new2c.svg + + + true + + + + + + + + 9 + + + + File path + + @@ -9150,18 +9189,125 @@ QProgressBar::chunk{ - - + + 9 - File path + ... + + + true + + + Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + + + + + + + + 9 + + + + ... + + + + + 9 + + + + If checked, the results are stored inside the gridcal file in a compressed format. + + + Save results in .gridcal files + + + + + + + + 9 + + + + Export version + + + + + + + + + + + + 85 + 87 + 83 + + + + + + + + + 0 + 0 + 0 + + + + + + + + + 190 + 190 + 190 + + + + + + + + + 16 + + + + File Information + + + + + + + Qt::Vertical + + + + 20 + 436 + + + + @@ -9212,60 +9358,60 @@ QProgressBar::chunk{ - - - - - 9 - - - - If checked, the results are stored inside the gridcal file in a compressed format. - - - Save results in .gridcal files - - - - - - - - 9 - + + + + + + + + + 186 + 189 + 182 + + + + + + + + + 186 + 189 + 182 + + + + + + + + + 190 + 190 + 190 + + + + + - - ... + + QFrame::Plain - - - - - - - 9 - + + 4 - - ... + + Qt::Horizontal - - - - - 9 - - + + - ... - - - true - - - Qt::LinksAccessibleByMouse|Qt::TextSelectableByKeyboard|Qt::TextSelectableByMouse + @@ -9336,45 +9482,18 @@ QProgressBar::chunk{ - - - - - 9 - - - - Export version - - - - - + + 9 - - - - - - - 9 - + + Path of the CGMES default boundary set (single zip file) - Boundary set - - - - - - - - 9 - + ... @@ -9390,18 +9509,6 @@ QProgressBar::chunk{ - - - - - 9 - - - - One file per profile - - - @@ -9427,6 +9534,25 @@ QProgressBar::chunk{ + + + + + + + + + + + + 9 + + + + Export version + + + @@ -9477,6 +9603,15 @@ QProgressBar::chunk{ + + + + + 9 + + + + @@ -9498,25 +9633,46 @@ QProgressBar::chunk{ - - + + 9 - - Path of the CGMES default boundary set (single zip file) + + + + + + + 9 + - ... + Boundary set - - + + + + + 9 + + - + One file per profile + + + + + + + <html><head/><body><p>If active the CGMEs mapping will be:</p><p>GeographicalRegion &lt;-&gt; Area</p><p>SubGeographicalRegion &lt;-&gt; Zone</p><p>Otherwise:</p><p>GeographicalRegion &lt;-&gt; Country</p><p>SubGeographicalRegion &lt;-&gt; Community</p><p><br/></p></body></html> + + + Map regions like raw files diff --git a/src/GridCal/Gui/Main/SubClasses/Model/diagrams.py b/src/GridCal/Gui/Main/SubClasses/Model/diagrams.py index 56fcab195..0109bad51 100644 --- a/src/GridCal/Gui/Main/SubClasses/Model/diagrams.py +++ b/src/GridCal/Gui/Main/SubClasses/Model/diagrams.py @@ -290,6 +290,13 @@ def __init__(self, parent=None): # Set context menu policy to CustomContextMenu self.ui.diagramsListView.setContextMenuPolicy(QtGui.Qt.ContextMenuPolicy.CustomContextMenu) + def get_default_voltage(self) -> float: + """ + Get the defualt marked voltage + :return: + """ + return self.ui.defaultBusVoltageSpinBox.value() + def auto_layout(self): """ Automatic layout of the nodes diff --git a/src/GridCal/Gui/Main/SubClasses/io.py b/src/GridCal/Gui/Main/SubClasses/io.py index 13aa417da..0c46bd50d 100644 --- a/src/GridCal/Gui/Main/SubClasses/io.py +++ b/src/GridCal/Gui/Main/SubClasses/io.py @@ -83,6 +83,8 @@ def __init__(self, parent=None): self.ui.cgmes_profiles_listView.setModel(gf.get_list_model(list(self.cgmes_profiles_dict.keys()), checks=True, check_value=True)) + self.ui.raw_export_version_comboBox.addItems(["33", "35"]) + self.ui.actionNew_project.triggered.connect(self.new_project) self.ui.actionOpen_file.triggered.connect(self.open_file) self.ui.actionAdd_circuit.triggered.connect(self.add_circuit) @@ -290,6 +292,12 @@ def open_file_now(self, filenames: Union[str, List[str]], :return: Nothing """ if len(filenames) > 0: + + for fname in filenames: + if not os.path.exists(fname): + error_msg(text=f"The file does not exists :(\n{fname}", title="File opening") + return + self.file_name = filenames[0] # store the working directory @@ -688,13 +696,19 @@ def get_file_save_options(self) -> filedrv.FileSavingOptions: one_file_per_profile = self.ui.cgmes_single_profile_per_file_checkBox.isChecked() + cgmes_map_areas_like_raw = self.ui.cgmes_map_regions_like_raw_checkBox.isChecked() + + raw_version = self.ui.raw_export_version_comboBox.currentText() + options = filedrv.FileSavingOptions(cgmes_boundary_set=self.current_boundary_set, simulation_drivers=self.get_simulations(), sessions_data=sessions_data, dictionary_of_json_files=json_files, cgmes_version=cgmes_version, cgmes_profiles=cgmes_profiles, - one_file_per_profile=one_file_per_profile) + cgmes_one_file_per_profile=one_file_per_profile, + cgmes_map_areas_like_raw=cgmes_map_areas_like_raw, + raw_version=raw_version) return options diff --git a/src/GridCal/Gui/Main/SubClasses/simulations.py b/src/GridCal/Gui/Main/SubClasses/simulations.py index fde0f26d7..132130f4f 100644 --- a/src/GridCal/Gui/Main/SubClasses/simulations.py +++ b/src/GridCal/Gui/Main/SubClasses/simulations.py @@ -2109,7 +2109,7 @@ def get_opf_ntc_options(self) -> Union[None, sim.OptimalNetTransferCapacityOptio idx_br = info.idx_branches if len(idx_from) == 0: - error_msg('The area "from" has no buses!') + error_msg('The "from" aggregation has no buses!') return None if len(idx_to) == 0: diff --git a/src/GridCal/Gui/SubstationDesigner/__init__.py b/src/GridCal/Gui/SubstationDesigner/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/GridCal/Gui/SubstationDesigner/substation_designer.py b/src/GridCal/Gui/SubstationDesigner/substation_designer.py new file mode 100644 index 000000000..abd13d2b8 --- /dev/null +++ b/src/GridCal/Gui/SubstationDesigner/substation_designer.py @@ -0,0 +1,178 @@ +# GridCal +# Copyright (C) 2015 - 2024 Santiago PeƱate Vera +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +from __future__ import annotations + + +from PySide6 import QtWidgets +from typing import List +from GridCal.Gui.SubstationDesigner.substation_designer_gui import Ui_Dialog +from GridCal.Gui.object_model import ObjectsModel +from GridCal.Gui.messages import yes_no_question +from GridCalEngine.Devices.multi_circuit import MultiCircuit +from GridCalEngine.Devices.Parents.editable_device import EditableDevice +from GridCalEngine.enumerations import DeviceType, SubstationTypes +import GridCalEngine.Devices as dev + + +class VoltageLevelTemplate(EditableDevice): + + def __init__(self, name='', code='', idtag: str | None = None, + device_type=DeviceType.GenericArea, voltage: float = 10): + EditableDevice.__init__(self, + name=name, + code=code, + idtag=idtag, + device_type=device_type) + + self.vl_type: SubstationTypes = SubstationTypes.SingleBar + self.voltage: float = voltage + + self.register(key='vl_type', units='', tpe=SubstationTypes, definition='longitude.', editable=True) + self.register(key='voltage', units='KV', tpe=float, definition='Voltage.', editable=True) + + +class SubstationDesigner(QtWidgets.QDialog): + """ + SubstationDesigner + """ + + def __init__(self, grid: MultiCircuit, default_voltage: float = 10.0, parent=None): + """ + + :param parent: + """ + QtWidgets.QDialog.__init__(self, parent) + self.ui = Ui_Dialog() + self.ui.setupUi(self) + self.setWindowTitle('Substation maker') + + self.grid = grid + + self.default_voltage = default_voltage + + self._accepted = False + + self.ui.se_name_lineEdit.setText(f"Substation {self.grid.get_substation_number()}") + + obj1 = VoltageLevelTemplate(name="VL", voltage=self.default_voltage, + device_type=DeviceType.VoltageLevelTemplate) + + self.property_list = [obj1.property_list[i] for i in [1, 5, 6]] + + self.mdl = ObjectsModel(objects=[obj1], + property_list=self.property_list, + time_index=None, + parent=self.ui.tableView, + editable=True) + + self.ui.tableView.setModel(self.mdl) + + self.ui.addVlButton.clicked.connect(self.add_vl) + self.ui.deleteVlButton.clicked.connect(self.remove_vl) + self.ui.createButton.clicked.connect(self.create_se) + + def get_name(self): + """ + Get the SE name + :return: + """ + return self.ui.se_name_lineEdit.text() + + def get_selected_objects(self): + """ + Get the list of selected objects + :return: + """ + + if self.mdl is not None: + sel_idx = self.ui.tableView.selectedIndexes() + if len(sel_idx) > 0: + + # get the unique rows + unique = set() + for idx in sel_idx: + unique.add(idx.row()) + + return [self.mdl.objects[i] for i in unique] + else: + return list() + else: + return list() + + def add_vl(self) -> None: + """ + Add voltage level + :return: + """ + obj1 = VoltageLevelTemplate(name="VL", voltage=self.default_voltage, + device_type=DeviceType.VoltageLevelTemplate) + self.mdl.objects.append(obj1) + self.mdl.update() + + def remove_vl(self): + """ + Remove voltage level + :return: + """ + sel = self.get_selected_objects() + cpy_lst = self.mdl.objects.copy() + for obj in sel: + cpy_lst.remove(obj) + + self.mdl = ObjectsModel(objects=cpy_lst, + property_list=self.property_list, + time_index=None, + parent=self.ui.tableView, + editable=True) + + self.ui.tableView.setModel(self.mdl) + + def get_voltage_levels(self) -> List[VoltageLevelTemplate]: + """ + Get the list of voltage levels + :return: + """ + return self.mdl.objects + + def was_ok(self) -> bool: + """ + Get if to create substation + """ + return self._accepted + + def create_se(self): + """ + Create the thing + :return: + """ + if len(self.mdl.objects) > 0: + self._accepted = True + self.close() + else: + ok = yes_no_question("There are no voltage levels, so no substation will be created, ok?") + if ok: + self._accepted = False + self.close() + + +if __name__ == "__main__": + import sys + app = QtWidgets.QApplication(sys.argv) + window = SubstationDesigner(None) + # window.resize(int(1.61 * 700.0), int(600.0)) # golden ratio + window.show() + sys.exit(app.exec()) diff --git a/src/GridCal/Gui/SubstationDesigner/substation_designer_gui.py b/src/GridCal/Gui/SubstationDesigner/substation_designer_gui.py new file mode 100644 index 000000000..e1d18a060 --- /dev/null +++ b/src/GridCal/Gui/SubstationDesigner/substation_designer_gui.py @@ -0,0 +1,122 @@ +# -*- coding: utf-8 -*- + +################################################################################ +## Form generated from reading UI file 'substation_designer_gui.ui' +## +## Created by: Qt User Interface Compiler version 6.7.2 +## +## WARNING! All changes made in this file will be lost when recompiling UI file! +################################################################################ + +from PySide6.QtCore import (QCoreApplication, QDate, QDateTime, QLocale, + QMetaObject, QObject, QPoint, QRect, + QSize, QTime, QUrl, Qt) +from PySide6.QtGui import (QBrush, QColor, QConicalGradient, QCursor, + QFont, QFontDatabase, QGradient, QIcon, + QImage, QKeySequence, QLinearGradient, QPainter, + QPalette, QPixmap, QRadialGradient, QTransform) +from PySide6.QtWidgets import (QApplication, QDialog, QFrame, QGridLayout, + QHBoxLayout, QHeaderView, QLabel, QLineEdit, + QPushButton, QSizePolicy, QSpacerItem, QTableView, + QWidget) + +class Ui_Dialog(object): + def setupUi(self, Dialog): + if not Dialog.objectName(): + Dialog.setObjectName(u"Dialog") + Dialog.resize(450, 312) + self.gridLayout = QGridLayout(Dialog) + self.gridLayout.setObjectName(u"gridLayout") + self.label = QLabel(Dialog) + self.label.setObjectName(u"label") + font = QFont() + font.setPointSize(10) + self.label.setFont(font) + + self.gridLayout.addWidget(self.label, 0, 0, 1, 1) + + self.se_name_lineEdit = QLineEdit(Dialog) + self.se_name_lineEdit.setObjectName(u"se_name_lineEdit") + self.se_name_lineEdit.setFont(font) + + self.gridLayout.addWidget(self.se_name_lineEdit, 0, 1, 1, 2) + + self.frame_2 = QFrame(Dialog) + self.frame_2.setObjectName(u"frame_2") + self.frame_2.setFrameShape(QFrame.NoFrame) + self.frame_2.setFrameShadow(QFrame.Raised) + self.horizontalLayout = QHBoxLayout(self.frame_2) + self.horizontalLayout.setObjectName(u"horizontalLayout") + self.horizontalLayout.setContentsMargins(0, 0, 0, 0) + self.addVlButton = QPushButton(self.frame_2) + self.addVlButton.setObjectName(u"addVlButton") + self.addVlButton.setFont(font) + + self.horizontalLayout.addWidget(self.addVlButton) + + self.deleteVlButton = QPushButton(self.frame_2) + self.deleteVlButton.setObjectName(u"deleteVlButton") + self.deleteVlButton.setFont(font) + + self.horizontalLayout.addWidget(self.deleteVlButton) + + self.horizontalSpacer = QSpacerItem(171, 20, QSizePolicy.Policy.Expanding, QSizePolicy.Policy.Minimum) + + self.horizontalLayout.addItem(self.horizontalSpacer) + + self.createButton = QPushButton(self.frame_2) + self.createButton.setObjectName(u"createButton") + self.createButton.setMaximumSize(QSize(80, 16777215)) + self.createButton.setFont(font) + + self.horizontalLayout.addWidget(self.createButton) + + + self.gridLayout.addWidget(self.frame_2, 6, 0, 1, 3) + + self.frame = QFrame(Dialog) + self.frame.setObjectName(u"frame") + self.frame.setFrameShape(QFrame.NoFrame) + self.frame.setFrameShadow(QFrame.Raised) + self.gridLayout_2 = QGridLayout(self.frame) + self.gridLayout_2.setObjectName(u"gridLayout_2") + self.gridLayout_2.setContentsMargins(0, 0, 0, 0) + self.label_3 = QLabel(self.frame) + self.label_3.setObjectName(u"label_3") + self.label_3.setFont(font) + + self.gridLayout_2.addWidget(self.label_3, 0, 0, 1, 2) + + self.tableView = QTableView(self.frame) + self.tableView.setObjectName(u"tableView") + self.tableView.setFont(font) + + self.gridLayout_2.addWidget(self.tableView, 2, 0, 1, 2) + + + self.gridLayout.addWidget(self.frame, 5, 0, 1, 3) + + + self.retranslateUi(Dialog) + + QMetaObject.connectSlotsByName(Dialog) + # setupUi + + def retranslateUi(self, Dialog): + Dialog.setWindowTitle(QCoreApplication.translate("Dialog", u"Dialog", None)) + self.label.setText(QCoreApplication.translate("Dialog", u"Name", None)) +#if QT_CONFIG(tooltip) + self.addVlButton.setToolTip(QCoreApplication.translate("Dialog", u"Add voltage level", None)) +#endif // QT_CONFIG(tooltip) + self.addVlButton.setText(QCoreApplication.translate("Dialog", u"+", None)) +#if QT_CONFIG(tooltip) + self.deleteVlButton.setToolTip(QCoreApplication.translate("Dialog", u"Remove voltage level", None)) +#endif // QT_CONFIG(tooltip) + self.deleteVlButton.setText(QCoreApplication.translate("Dialog", u"-", None)) +#if QT_CONFIG(tooltip) + self.createButton.setToolTip(QCoreApplication.translate("Dialog", u"Create substation", None)) +#endif // QT_CONFIG(tooltip) + self.createButton.setText(QCoreApplication.translate("Dialog", u"Create", None)) + self.label_3.setText(QCoreApplication.translate("Dialog", u"Voltage levels", None)) + # retranslateUi + diff --git a/src/GridCal/Gui/SubstationDesigner/substation_designer_gui.ui b/src/GridCal/Gui/SubstationDesigner/substation_designer_gui.ui new file mode 100644 index 000000000..6068c8cb6 --- /dev/null +++ b/src/GridCal/Gui/SubstationDesigner/substation_designer_gui.ui @@ -0,0 +1,175 @@ + + + Dialog + + + + 0 + 0 + 450 + 312 + + + + Dialog + + + + + + + 10 + + + + Name + + + + + + + + 10 + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 10 + + + + Add voltage level + + + + + + + + + + + + 10 + + + + Remove voltage level + + + - + + + + + + + Qt::Horizontal + + + + 171 + 20 + + + + + + + + + 80 + 16777215 + + + + + 10 + + + + Create substation + + + Create + + + + + + + + + + QFrame::NoFrame + + + QFrame::Raised + + + + 0 + + + 0 + + + 0 + + + 0 + + + + + + 10 + + + + Voltage levels + + + + + + + + 10 + + + + + + + + + + + + diff --git a/src/GridCal/Gui/SubstationDesigner/update_gui_file.py b/src/GridCal/Gui/SubstationDesigner/update_gui_file.py new file mode 100644 index 000000000..bc28bd278 --- /dev/null +++ b/src/GridCal/Gui/SubstationDesigner/update_gui_file.py @@ -0,0 +1,9 @@ +""" +Script to update correctly the main GUI (.py) file from the Qt design (.ui) file +""" +from GridCal.Gui.update_gui_common import convert_ui_file + +if __name__ == '__main__': + # convert_resource_file(source='icons.qrc') + for f in ['substation_designer_gui.ui']: + convert_ui_file(source=f) diff --git a/src/GridCal/Gui/object_model.py b/src/GridCal/Gui/object_model.py index a1b7f9920..ab3434b5e 100644 --- a/src/GridCal/Gui/object_model.py +++ b/src/GridCal/Gui/object_model.py @@ -172,6 +172,7 @@ def update(self): """ update table """ + self.r = len(self.objects) row = self.rowCount() self.beginInsertRows(QtCore.QModelIndex(), row, row) # whatever code diff --git a/src/GridCal/__version__.py b/src/GridCal/__version__.py index b482ea318..2d0c2a7fc 100644 --- a/src/GridCal/__version__.py +++ b/src/GridCal/__version__.py @@ -16,7 +16,7 @@ _current_year_ = datetime.datetime.now().year # do not forget to keep a three-number version!!! -__GridCal_VERSION__ = "5.1.49" +__GridCal_VERSION__ = "5.1.50" url = 'https://github.com/SanPen/GridCal' diff --git a/src/GridCalEngine/DataStructures/branch_data.py b/src/GridCalEngine/DataStructures/branch_data.py index 6e7e4b4ea..f0b599be8 100644 --- a/src/GridCalEngine/DataStructures/branch_data.py +++ b/src/GridCalEngine/DataStructures/branch_data.py @@ -372,19 +372,19 @@ def get_contingency_enabled_indices(self) -> IntVec: """ return np.where(self.contingency_enabled == 1)[0] - def get_inter_areas(self, buses_areas_1, buses_areas_2): + def get_inter_areas(self, bus_idx_from, bus_idx_to): """ Get the Branches that join two areas - :param buses_areas_1: Area from - :param buses_areas_2: Area to + :param bus_idx_from: Area from + :param bus_idx_to: Area to :return: List of (branch index, flow sense w.r.t the area exchange) """ lst: List[Tuple[int, float]] = list() for k in range(self.nelm): - if self.F[k] in buses_areas_1 and self.T[k] in buses_areas_2: + if self.F[k] in bus_idx_from and self.T[k] in bus_idx_to: lst.append((k, 1.0)) - elif self.F[k] in buses_areas_2 and self.T[k] in buses_areas_1: + elif self.F[k] in bus_idx_to and self.T[k] in bus_idx_from: lst.append((k, -1.0)) return lst diff --git a/src/GridCalEngine/DataStructures/hvdc_data.py b/src/GridCalEngine/DataStructures/hvdc_data.py index 38b70d70e..e829c110e 100644 --- a/src/GridCalEngine/DataStructures/hvdc_data.py +++ b/src/GridCalEngine/DataStructures/hvdc_data.py @@ -310,19 +310,19 @@ def get_power(self, Sbase: float, theta: Vec) -> Tuple[Vec, Vec, Vec, Vec, Vec, # Shvdc, Losses_hvdc, Pf_hvdc, Pt_hvdc, loading_hvdc, n_free return Pbus, Losses, Pf, Pt, loading, nfree - def get_inter_areas(self, buses_areas_1, buses_areas_2): + def get_inter_areas(self, bus_idx_from, bus_idx_to): """ Get the hvdcs that join two areas - :param buses_areas_1: Area from - :param buses_areas_2: Area to + :param bus_idx_from: Area from + :param bus_idx_to: Area to :return: List of (branch index, flow sense w.r.t the area exchange) """ lst: List[Tuple[int, float]] = list() for k in range(self.nelm): - if self.F[k] in buses_areas_1 and self.T[k] in buses_areas_2: + if self.F[k] in bus_idx_from and self.T[k] in bus_idx_to: lst.append((k, 1.0)) - elif self.F[k] in buses_areas_2 and self.T[k] in buses_areas_1: + elif self.F[k] in bus_idx_to and self.T[k] in bus_idx_from: lst.append((k, -1.0)) return lst diff --git a/src/GridCalEngine/DataStructures/numerical_circuit.py b/src/GridCalEngine/DataStructures/numerical_circuit.py index b351cf919..4e58c954a 100644 --- a/src/GridCalEngine/DataStructures/numerical_circuit.py +++ b/src/GridCalEngine/DataStructures/numerical_circuit.py @@ -2018,6 +2018,25 @@ def compare(self, nc_2: "NumericalCircuit", tol=1e-6) -> Tuple[bool, Logger]: # if any error in the logger, bad return logger.error_count() == 0, logger + def get_structural_ntc(self, bus_idx_from: IntVec, bus_idx_to: IntVec) -> float: + """ + Get the structural NTC + :param bus_idx_from: list of buses of the area from + :param bus_idx_to: list of buses of the area to + :return: structural NTC in MVA + """ + + inter_area_branches = self.branch_data.get_inter_areas(bus_idx_from=bus_idx_from, bus_idx_to=bus_idx_to) + sum_ratings = 0.0 + for k, sense in inter_area_branches: + sum_ratings += self.branch_data.rates[k] + + inter_area_hvdcs = self.hvdc_data.get_inter_areas(bus_idx_from=bus_idx_from, bus_idx_to=bus_idx_to) + for k, sense in inter_area_hvdcs: + sum_ratings += self.hvdc_data.rate[k] + + return sum_ratings + def compile_numerical_circuit_at(circuit: MultiCircuit, t_idx: Union[int, None] = None, diff --git a/src/GridCalEngine/Devices/Branches/dc_line.py b/src/GridCalEngine/Devices/Branches/dc_line.py index 9adaaa265..a520c30a0 100644 --- a/src/GridCalEngine/Devices/Branches/dc_line.py +++ b/src/GridCalEngine/Devices/Branches/dc_line.py @@ -142,7 +142,7 @@ def __init__(self, self.register(key='fault_pos', units='p.u.', tpe=float, definition='Per-unit positioning of the fault:0 would be at the "from" side,1 would ' 'be at the "to" side,therefore 0.5 is at the middle.') - self.register(key='template', units='', tpe=DeviceType.SequenceLineDevice, definition='', editable=False) + self.register(key='template', units='', tpe=DeviceType.AnyLineTemplateDevice, definition='', editable=False) self.register(key='locations', units='', tpe=SubObjectType.LineLocations, definition='', editable=False) diff --git a/src/GridCalEngine/Devices/Branches/line.py b/src/GridCalEngine/Devices/Branches/line.py index 101b76f63..46a0c8af2 100644 --- a/src/GridCalEngine/Devices/Branches/line.py +++ b/src/GridCalEngine/Devices/Branches/line.py @@ -176,7 +176,7 @@ def __init__(self, bus_from: Bus = None, bus_to: Bus = None, cn_from: Connectivi '0 would be at the "from" side,' '1 would be at the "to" side,' 'therefore 0.5 is at the middle.') - self.register(key='template', units='', tpe=DeviceType.SequenceLineDevice, definition='', editable=False) + self.register(key='template', units='', tpe=DeviceType.AnyLineTemplateDevice, definition='', editable=False) self.register(key='locations', units='', tpe=SubObjectType.LineLocations, definition='', editable=False) self.register(key='possible_tower_types', units='', tpe=SubObjectType.Associations, diff --git a/src/GridCalEngine/Devices/Parents/editable_device.py b/src/GridCalEngine/Devices/Parents/editable_device.py index 9ed258c5b..78906836d 100644 --- a/src/GridCalEngine/Devices/Parents/editable_device.py +++ b/src/GridCalEngine/Devices/Parents/editable_device.py @@ -24,7 +24,7 @@ HvdcControlType, ActionType, AvailableTransferMode, ContingencyMethod, CpfParametrization, CpfStopAt, InvestmentEvaluationMethod, SolverType, InvestmentsEvaluationObjectives, NodalCapacityMethod, TimeGrouping, - ZonalGrouping, MIPSolvers, AcOpfMode, + ZonalGrouping, MIPSolvers, AcOpfMode, SubstationTypes, BranchImpedanceMode, FaultType, TapChangerTypes) # types that can be assigned to a GridCal property @@ -55,7 +55,8 @@ Type[AcOpfMode], Type[BranchImpedanceMode], Type[FaultType], - Type[TapChangerTypes] + Type[TapChangerTypes], + Type[SubstationTypes] ] diff --git a/src/GridCalEngine/Devices/types.py b/src/GridCalEngine/Devices/types.py index b557d1cde..7d970a3d6 100644 --- a/src/GridCalEngine/Devices/types.py +++ b/src/GridCalEngine/Devices/types.py @@ -14,7 +14,6 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -from typing import Union from GridCalEngine.Devices.Aggregation import * from GridCalEngine.Devices.Associations import * from GridCalEngine.Devices.Branches import * diff --git a/src/GridCalEngine/IO/file_handler.py b/src/GridCalEngine/IO/file_handler.py index 49f2075ff..35a21bdb1 100644 --- a/src/GridCalEngine/IO/file_handler.py +++ b/src/GridCalEngine/IO/file_handler.py @@ -68,7 +68,9 @@ def __init__(self, dictionary_of_json_files: Dict[str, Dict[str, Any]] = None, cgmes_version: CGMESVersions = CGMESVersions.v2_4_15, cgmes_profiles: Union[None, List[cgmesProfile]] = None, - one_file_per_profile: bool = False): + cgmes_one_file_per_profile: bool = False, + cgmes_map_areas_like_raw: bool = False, + raw_version: str = "33"): """ Constructor :param cgmes_boundary_set: CGMES boundary set zip file path @@ -77,7 +79,9 @@ def __init__(self, :param dictionary_of_json_files: Dictionary of json files :param cgmes_version: Version to use with CGMES :param cgmes_profiles: CGMES profile list to export - :param one_file_per_profile: use one file per profile? + :param cgmes_one_file_per_profile: use one file per profile? + :param cgmes_map_areas_like_raw: use map areas like raw? + :param raw_version: Version to use when exporting raw/rawx files """ self.cgmes_version: CGMESVersions = cgmes_version @@ -105,7 +109,11 @@ def __init__(self, cgmesProfile.GL] # use one file per profile? - self.one_file_per_profile = one_file_per_profile + self.cgmes_one_file_per_profile = cgmes_one_file_per_profile + + self.cgmes_map_areas_like_raw = cgmes_map_areas_like_raw + + self.raw_version = raw_version def get_power_flow_results(self) -> Union[None, PowerFlowResults]: """ @@ -542,7 +550,7 @@ def save_cgmes(self) -> Logger: data_parser.load_files(files=[self.options.cgmes_boundary_set]) cgmes_circuit.parse_files(data_parser=data_parser) profiles_to_export = self.options.cgmes_profiles - one_file_per_profile = self.options.one_file_per_profile + one_file_per_profile = self.options.cgmes_one_file_per_profile pf_results = self.options.get_power_flow_results() cgmes_circuit = gridcal_to_cgmes(gc_model=self.circuit, cgmes_model=cgmes_circuit, diff --git a/src/GridCalEngine/IO/gridcal/pack_unpack.py b/src/GridCalEngine/IO/gridcal/pack_unpack.py index 311ed1856..f566113db 100644 --- a/src/GridCalEngine/IO/gridcal/pack_unpack.py +++ b/src/GridCalEngine/IO/gridcal/pack_unpack.py @@ -95,12 +95,12 @@ def get_objects_dictionary() -> Dict[str, ALL_DEV_TYPES]: 'transformer3w': dev.Transformer3W(), 'line': dev.Line(), - 'dc_line': dev.DcLine(None, None), + 'dc_line': dev.DcLine(), 'hvdc': dev.HvdcLine(), - 'vsc': dev.VSC(None, None), - 'upfc': dev.UPFC(None, None), + 'vsc': dev.VSC(), + 'upfc': dev.UPFC(), 'series_reactance': dev.SeriesReactance(), @@ -112,11 +112,6 @@ def get_objects_dictionary() -> Dict[str, ALL_DEV_TYPES]: 'investments_group': dev.InvestmentsGroup(), 'investment': dev.Investment(), - # TODO: Handle these legacy types - # 'generator_technology': dev.GeneratorTechnology(), - # 'generator_fuel': dev.GeneratorFuel(), - # 'generator_emission': dev.GeneratorEmission(), - 'fluid_node': dev.FluidNode(), 'fluid_path': dev.FluidPath(), 'fluid_turbine': dev.FluidTurbine(), @@ -1045,9 +1040,17 @@ def parse_object_type_from_json(template_elm: ALL_DEV_TYPES, if isinstance(gc_prop.tpe, DeviceType): - # this is a hyperlink to another object - # we must look for the reference in elements_dict - collection = elements_dict_by_type.get(gc_prop.tpe, None) + if gc_prop.tpe == DeviceType.AnyLineTemplateDevice: + # this is an exception, when dealing with line templates we need to look for + # several types, not only one + seq_templates = elements_dict_by_type.get(DeviceType.OverheadLineTypeDevice, dict()) + oh_templates = elements_dict_by_type.get(DeviceType.SequenceLineDevice, dict()) + ug_templates = elements_dict_by_type.get(DeviceType.UnderGroundLineDevice, dict()) + collection = {**seq_templates, **oh_templates, **ug_templates} + else: + # this is a hyperlink to another object + # we must look for the reference in elements_dict + collection = elements_dict_by_type.get(gc_prop.tpe, None) if collection is not None: ref_idtag = str(property_value) diff --git a/src/GridCalEngine/Simulations/NTC/ntc_driver.py b/src/GridCalEngine/Simulations/NTC/ntc_driver.py index a900ff6d5..2a6a83b9c 100644 --- a/src/GridCalEngine/Simulations/NTC/ntc_driver.py +++ b/src/GridCalEngine/Simulations/NTC/ntc_driver.py @@ -69,9 +69,10 @@ def opf(self): zonal_grouping=self.options.opf_options.zonal_grouping, skip_generation_limits=self.options.skip_generation_limits, consider_contingencies=self.options.consider_contingencies, + contingency_groups_used=self.options.opf_options.contingency_groups_used, lodf_threshold=self.options.lin_options.lodf_threshold, - buses_areas_1=self.options.area_from_bus_idx, - buses_areas_2=self.options.area_to_bus_idx, + bus_idx_from=self.options.area_from_bus_idx, + bus_idx_to=self.options.area_to_bus_idx, transfer_method=self.options.transfer_method, monitor_only_ntc_load_rule_branches=self.options.use_branch_rating_contribution, alpha_threshold=self.options.branch_exchange_sensitivity, diff --git a/src/GridCalEngine/Simulations/NTC/ntc_opf.py b/src/GridCalEngine/Simulations/NTC/ntc_opf.py index 79d6511ba..94ac70572 100644 --- a/src/GridCalEngine/Simulations/NTC/ntc_opf.py +++ b/src/GridCalEngine/Simulations/NTC/ntc_opf.py @@ -23,6 +23,7 @@ from typing import List, Union, Tuple, Callable from GridCalEngine.enumerations import MIPSolvers, ZonalGrouping from GridCalEngine.Devices.multi_circuit import MultiCircuit +from GridCalEngine.Devices.Aggregation.contingency_group import ContingencyGroup from GridCalEngine.DataStructures.numerical_circuit import NumericalCircuit, compile_numerical_circuit_at from GridCalEngine.DataStructures.generator_data import GeneratorData from GridCalEngine.DataStructures.load_data import LoadData @@ -36,30 +37,6 @@ from GridCalEngine.Simulations.ATC.available_transfer_capacity_driver import compute_alpha -# def get_structural_ntc(inter_area_branches, inter_area_hvdcs, branch_ratings, hvdc_ratings): -# """ -# -# :param inter_area_branches: -# :param inter_area_hvdcs: -# :param branch_ratings: -# :param hvdc_ratings: -# :return: -# """ -# if len(inter_area_branches): -# idx_branch, b = list(zip(*inter_area_branches)) -# idx_branch = list(idx_branch) -# sum_ratings = sum(branch_ratings[idx_branch]) -# else: -# sum_ratings = 0.0 -# -# if len(inter_area_hvdcs): -# idx_hvdc, b = list(zip(*inter_area_hvdcs)) -# idx_hvdc = list(idx_hvdc) -# sum_ratings += sum(hvdc_ratings[idx_hvdc]) -# -# return sum_ratings - - def formulate_monitorization_logic(monitor_only_sensitive_branches: bool, monitor_only_ntc_load_rule_branches: bool, monitor_loading: BoolVec, @@ -993,10 +970,11 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, zonal_grouping: ZonalGrouping = ZonalGrouping.NoGrouping, skip_generation_limits: bool = False, consider_contingencies: bool = False, + contingency_groups_used: List[ContingencyGroup] = (), alpha_threshold: float = 0.001, lodf_threshold: float = 0.001, - buses_areas_1: IntVec = None, - buses_areas_2: IntVec = None, + bus_idx_from: IntVec | None = None, + bus_idx_to: IntVec | None = None, transfer_method: AvailableTransferMode = AvailableTransferMode.InstalledPower, monitor_only_sensitive_branches: bool = True, monitor_only_ntc_load_rule_branches: bool = False, @@ -1013,10 +991,11 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, :param zonal_grouping: Zonal grouping? :param skip_generation_limits: Skip the generation limits? :param consider_contingencies: Consider the contingencies? + :param contingency_groups_used: List of contingency groups to simulate :param alpha_threshold: threshold to consider the exchange sensitivity :param lodf_threshold: threshold to consider LODF sensitivities - :param buses_areas_1: array of bus indices in the area 1 - :param buses_areas_2: array of bus indices in the area 2 + :param bus_idx_from: array of bus indices in the area 1 + :param bus_idx_to: array of bus indices in the area 2 :param transfer_method: AvailableTransferMode :param monitor_only_sensitive_branches :param monitor_only_ntc_load_rule_branches @@ -1086,8 +1065,8 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, load_data_t=nc.load_data, bus_data_t=nc.bus_data, p_bus_t=nc.Pbus, - bus_a1=buses_areas_1, - bus_a2=buses_areas_2, + bus_a1=bus_idx_from, + bus_a2=bus_idx_to, transfer_method=transfer_method, skip_generation_limits=skip_generation_limits, ntc_vars=mip_vars, @@ -1105,32 +1084,46 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, if zonal_grouping == ZonalGrouping.NoGrouping: - structural_ntc = nc.branch_data.get_inter_areas(buses_areas_1=buses_areas_1, buses_areas_2=buses_areas_2) - # declare the linear analysis - ls = LinearAnalysis(numerical_circuit=nc, distributed_slack=False, correct_values=True) + ls = LinearAnalysis(numerical_circuit=nc, + distributed_slack=False, + correct_values=True) + + # compute the PTDF and LODF + ls.run() # compute exchange sensitivities - if monitor_only_sensitive_branches or monitor_only_ntc_load_rule_branches: - - # TODO, these conditions are confusing and maybe conflicting with the consider_contingencies option - - # compute the PTDF and LODF - ls.run() - - alpha = compute_alpha(ptdf=ls.PTDF, - lodf=ls.LODF, - P0=nc.Sbus.real, - Pinstalled=nc.bus_installed_power, - Pgen=nc.generator_data.get_injections_per_bus().real, - Pload=nc.load_data.get_injections_per_bus().real, - idx1=buses_areas_1, - idx2=buses_areas_2, - mode=mode_2_int[transfer_method]) - else: - alpha = None + # if monitor_only_sensitive_branches or monitor_only_ntc_load_rule_branches: + # + # # TODO, these conditions are confusing and maybe conflicting with the consider_contingencies option + # + # alpha = compute_alpha(ptdf=ls.PTDF, + # lodf=ls.LODF, + # P0=nc.Sbus.real, + # Pinstalled=nc.bus_installed_power, + # Pgen=nc.generator_data.get_injections_per_bus().real, + # Pload=nc.load_data.get_injections_per_bus().real, + # idx1=bus_idx_from, + # idx2=bus_idx_to, + # mode=mode_2_int[transfer_method]) + # else: + # alpha = None + + alpha = compute_alpha(ptdf=ls.PTDF, + lodf=ls.LODF, + P0=nc.Sbus.real, + Pinstalled=nc.bus_installed_power, + Pgen=nc.generator_data.get_injections_per_bus().real, + Pload=nc.load_data.get_injections_per_bus().real, + idx1=bus_idx_from, + idx2=bus_idx_to, + mode=mode_2_int[transfer_method]) + + # compute the structural NTC: this is the sum of ratings in the inter area + structural_ntc = nc.get_structural_ntc(bus_idx_from=bus_idx_from, bus_idx_to=bus_idx_to) # formulate branches ----------------------------------------------------------------------------------- + f_obj += add_linear_branches_formulation( t_idx=t_idx, Sbase=nc.Sbase, @@ -1142,7 +1135,7 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, monitor_only_ntc_load_rule_branches=monitor_only_ntc_load_rule_branches, alpha=alpha, alpha_threshold=alpha_threshold, - structural_ntc=structural_ntc, + structural_ntc=float(structural_ntc), ntc_load_rule=ntc_load_rule, inf=1e20 ) @@ -1158,12 +1151,9 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, # formulate contingencies -------------------------------------------------------------------------------- if consider_contingencies: - # if we want to include contingencies, we'll need the LODF at this time step - if ls.PTDF is None: - ls.run() - # Compute the more generalistic contingency structures - mctg = LinearMultiContingencies(grid=grid) + # declare the multi-contingencies analysis and compute + mctg = LinearMultiContingencies(grid=grid, contingency_groups_used=contingency_groups_used) mctg.compute(lodf=ls.LODF, ptdf=ls.PTDF, ptdf_threshold=lodf_threshold, lodf_threshold=lodf_threshold) # formulate the contingencies @@ -1203,7 +1193,7 @@ def run_linear_ntc_opf_ts(grid: MultiCircuit, lp_model.save_model(file_name=export_model_fname) print('LP model saved as:', export_model_fname) - status = lp_model.solve() + status = lp_model.solve(robust=True) # gather the results if status == LpModel.OPTIMAL: diff --git a/src/GridCalEngine/Simulations/NTC/ntc_options.py b/src/GridCalEngine/Simulations/NTC/ntc_options.py index 1f8f07297..d5a1e7ffc 100644 --- a/src/GridCalEngine/Simulations/NTC/ntc_options.py +++ b/src/GridCalEngine/Simulations/NTC/ntc_options.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Lesser General Public License # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +from __future__ import annotations from GridCalEngine.Simulations.options_template import OptionsTemplate from GridCalEngine.Simulations.OPF.opf_options import OptimalPowerFlowOptions @@ -30,17 +31,17 @@ class OptimalNetTransferCapacityOptions(OptionsTemplate): def __init__(self, area_from_bus_idx: IntVec, area_to_bus_idx: IntVec, - transfer_method: AvailableTransferMode, - loading_threshold_to_report: float, - skip_generation_limits: bool, - transmission_reliability_margin: float, - branch_exchange_sensitivity: float, - use_branch_exchange_sensitivity: bool, - branch_rating_contribution: float, - use_branch_rating_contribution: bool, - consider_contingencies: bool, - opf_options: OptimalPowerFlowOptions, - lin_options: LinearAnalysisOptions): + transfer_method: AvailableTransferMode = AvailableTransferMode.InstalledPower , + loading_threshold_to_report: float = 98.0, + skip_generation_limits: bool = True, + transmission_reliability_margin: float = 400.0, + branch_exchange_sensitivity: float = 5.0 / 100.0, + use_branch_exchange_sensitivity: bool = True, + branch_rating_contribution: float = 70 / 100.0, + use_branch_rating_contribution: bool = False, + consider_contingencies: bool = False, + opf_options: OptimalPowerFlowOptions | None = None, + lin_options: LinearAnalysisOptions | None = None,): """ :param area_from_bus_idx: array of area "from" bus indices @@ -72,8 +73,15 @@ def __init__(self, self.use_branch_rating_contribution: bool = use_branch_rating_contribution self.consider_contingencies: bool = consider_contingencies - self.opf_options: OptimalPowerFlowOptions = opf_options - self.lin_options: LinearAnalysisOptions = lin_options + if opf_options is None: + self.opf_options = OptimalPowerFlowOptions() + else: + self.opf_options: OptimalPowerFlowOptions = opf_options + + if lin_options is None: + self.lin_options = LinearAnalysisOptions() + else: + self.lin_options: LinearAnalysisOptions = lin_options self.register(key="area_from_bus_idx", tpe=SubObjectType.Array) self.register(key="area_to_bus_idx", tpe=SubObjectType.Array) diff --git a/src/GridCalEngine/Simulations/NTC/ntc_results.py b/src/GridCalEngine/Simulations/NTC/ntc_results.py index 18b116559..9f3923e45 100644 --- a/src/GridCalEngine/Simulations/NTC/ntc_results.py +++ b/src/GridCalEngine/Simulations/NTC/ntc_results.py @@ -658,64 +658,6 @@ def create_contingency_branch_report(self, loading_threshold, reverse): contingency_rates=self.contingency_rates ) - # # Add exchange sensitivities - # y, columns = add_exchange_sensitivities( - # y=y, - # columns=columns, - # mc_idx=self.contingency_branch_indices_list, - # alpha=self.alpha, - # alpha_n1=self.contingency_branch_alpha_list, - # report_contigency_alpha=False, - # ) - # - # # Add TTC, TRM and NTC - # y, columns = add_ntc_data( - # y=y, - # columns=columns, - # ttc=self.get_exchange_power(), - # trm=self.trm, - # ) - # - # # Add MACZT (margin available for cross-zonal trade) data - # y, columns = add_maczt( - # y=y, - # columns=columns, - # ttc=self.get_exchange_power(), - # trm=self.trm, - # ) - # - # # Add min ntc to be considered as critical element - # y, columns = add_min_ntc( - # y=y, - # columns=columns, - # ntc_load_rule=self.ntc_load_rule, - # ) - # - # # Add interarea Branches data - # y, columns = add_inter_area_branches_data( - # y=y, - # columns=columns, - # inter_area_branches=self.inter_area_branches, - # Sf=self.Sf, - # names=self.branch_names, - # ) - # - # # Add hvdc Branches data - # y, columns = add_hvdc_data( - # y=y, - # columns=columns, - # hvdc_Pf=self.hvdc_Pf, - # hvdc_names=self.hvdc_names, - # ) - # - # # Add controlled shifter data - # y, columns = self.add_shifter_data( - # y=y, - # columns=columns, - # controlled_shifters=self.get_controlled_shifters_as_pt(), - # phase_shift=self.phase_shift, - # ) - c_name = [c for c in columns if 'contingency' in c.lower() and '%' in c.lower()][0] # filter results if required diff --git a/src/GridCalEngine/Simulations/NTC/ntc_ts_driver.py b/src/GridCalEngine/Simulations/NTC/ntc_ts_driver.py index 94862de36..fec7c3206 100644 --- a/src/GridCalEngine/Simulations/NTC/ntc_ts_driver.py +++ b/src/GridCalEngine/Simulations/NTC/ntc_ts_driver.py @@ -109,19 +109,22 @@ def opf(self): for t_idx, t in enumerate(self.time_indices): - opf_vars = run_linear_ntc_opf_ts(grid=self.grid, - time_indices=[t], # only one time index at a time - solver_type=self.options.opf_options.mip_solver, - zonal_grouping=self.options.opf_options.zonal_grouping, - skip_generation_limits=self.options.skip_generation_limits, - consider_contingencies=self.options.consider_contingencies, - lodf_threshold=self.options.lin_options.lodf_threshold, - buses_areas_1=self.options.area_from_bus_idx, - buses_areas_2=self.options.area_to_bus_idx, - logger=self.logger, - progress_text=None, - progress_func=None, - export_model_fname=self.options.opf_options.export_model_fname) + opf_vars = run_linear_ntc_opf_ts( + grid=self.grid, + time_indices=[t], # only one time index at a time + solver_type=self.options.opf_options.mip_solver, + zonal_grouping=self.options.opf_options.zonal_grouping, + skip_generation_limits=self.options.skip_generation_limits, + consider_contingencies=self.options.consider_contingencies, + contingency_groups_used=self.options.opf_options.contingency_groups_used, + lodf_threshold=self.options.lin_options.lodf_threshold, + bus_idx_from=self.options.area_from_bus_idx, + bus_idx_to=self.options.area_to_bus_idx, + logger=self.logger, + progress_text=None, + progress_func=None, + export_model_fname=self.options.opf_options.export_model_fname + ) self.results.voltage[t_idx, :] = np.ones(opf_vars.nbus) * np.exp(1j * opf_vars.bus_vars.theta) self.results.bus_shadow_prices[t_idx, :] = opf_vars.bus_vars.shadow_prices diff --git a/src/GridCalEngine/Simulations/OPF/linear_opf_ts.py b/src/GridCalEngine/Simulations/OPF/linear_opf_ts.py index 7674835a8..67256904e 100644 --- a/src/GridCalEngine/Simulations/OPF/linear_opf_ts.py +++ b/src/GridCalEngine/Simulations/OPF/linear_opf_ts.py @@ -1849,7 +1849,7 @@ def run_linear_opf_ts(grid: MultiCircuit, logger.add_info("LP model saved as", value=export_model_fname) print('LP model saved as:', export_model_fname) - status = lp_model.solve(robust=False) + status = lp_model.solve(robust=True) # gather the results logger.add_info("Status", value=str(status)) diff --git a/src/GridCalEngine/__version__.py b/src/GridCalEngine/__version__.py index f744abaf1..394e82882 100644 --- a/src/GridCalEngine/__version__.py +++ b/src/GridCalEngine/__version__.py @@ -16,7 +16,7 @@ _current_year_ = datetime.datetime.now().year # do not forget to keep a three-number version!!! -__GridCalEngine_VERSION__ = "5.1.49" +__GridCalEngine_VERSION__ = "5.1.50" url = 'https://github.com/SanPen/GridCal' diff --git a/src/GridCalEngine/api.py b/src/GridCalEngine/api.py index 79f052650..a306e8b28 100644 --- a/src/GridCalEngine/api.py +++ b/src/GridCalEngine/api.py @@ -61,7 +61,7 @@ def save_cgmes_file(grid: MultiCircuit, # define the export options options = FileSavingOptions() - options.one_file_per_profile = False + options.cgmes_one_file_per_profile = False options.cgmes_profiles = [cgmesProfile.EQ, cgmesProfile.OP, cgmesProfile.TP, diff --git a/src/GridCalEngine/enumerations.py b/src/GridCalEngine/enumerations.py index 0bff1a052..7054195a6 100644 --- a/src/GridCalEngine/enumerations.py +++ b/src/GridCalEngine/enumerations.py @@ -993,6 +993,7 @@ class DeviceType(Enum): SequenceLineDevice = 'Sequence line' UnderGroundLineDevice = 'Underground line' OverheadLineTypeDevice = 'Tower' + AnyLineTemplateDevice = "Any line template" TransformerTypeDevice = 'Transformer type' SwitchDevice = 'Switch' @@ -1007,6 +1008,7 @@ class DeviceType(Enum): MunicipalityDevice = 'Municipality' BusBarDevice = 'BusBar' VoltageLevelDevice = 'Voltage level' + VoltageLevelTemplate = 'Voltage level template' Technology = 'Technology' TechnologyGroup = 'Technology Group' @@ -1832,6 +1834,9 @@ def argparse(s): class Colormaps(Enum): + """ + Available colormaps + """ GridCal = 'GridCal' TSO = 'TSO' # -1, 1 TSO2 = 'TSO 2' # -1, 1 @@ -1860,3 +1865,44 @@ def argparse(s): return Colormaps[s] except KeyError: return s + + +class SubstationTypes(Enum): + """ + Types of substation types + """ + SingleBar = 'Single bar' + SingleBarWithBypass = 'Single bar with bypass' + SingleBarWithSplitter = 'Single bar with splitter' + DoubleBar = "Double bar" + DoubleBarWithBypass = "Double bar with bypass" + DoubleBarWithTransference = "Double bar with transference bar" + DoubleBarDuplex = "Double bar duplex" + Ring = 'Ring' + BreakerAndAHalf = 'Breaker and a half' + + def __str__(self) -> str: + return str(self.value) + + def __repr__(self): + return str(self) + + @staticmethod + def argparse(s): + """ + + :param s: + :return: + """ + try: + return SubstationTypes[s] + except KeyError: + return s + + @classmethod + def list(cls): + """ + + :return: + """ + return list(map(lambda c: c.value, cls)) diff --git a/src/GridCalServer/__version__.py b/src/GridCalServer/__version__.py index a43c638e2..0cd8673ae 100644 --- a/src/GridCalServer/__version__.py +++ b/src/GridCalServer/__version__.py @@ -16,7 +16,7 @@ _current_year_ = datetime.datetime.now().year # do not forget to keep a three-number version!!! -__GridCalServer_VERSION__ = "5.1.49" +__GridCalServer_VERSION__ = "5.1.50" url = 'https://github.com/SanPen/GridCal' diff --git a/src/tests/data/grids/test_line_templates.gridcal b/src/tests/data/grids/test_line_templates.gridcal new file mode 100644 index 000000000..9909220d1 Binary files /dev/null and b/src/tests/data/grids/test_line_templates.gridcal differ diff --git a/src/tests/test_cgmes_roundtrip.py b/src/tests/test_cgmes_roundtrip.py index af2368f44..817a9dc99 100644 --- a/src/tests/test_cgmes_roundtrip.py +++ b/src/tests/test_cgmes_roundtrip.py @@ -20,7 +20,7 @@ def create_file_save_options(boundary_zip_path: str) -> FileSavingOptions: :return: """ options = FileSavingOptions() - options.one_file_per_profile = False + options.cgmes_one_file_per_profile = False options.cgmes_profiles = [cgmesProfile.EQ, cgmesProfile.OP, cgmesProfile.TP, diff --git a/src/tests/test_load_all_grids.py b/src/tests/test_load_all_grids.py index 979e2bd86..5c50f1cc1 100644 --- a/src/tests/test_load_all_grids.py +++ b/src/tests/test_load_all_grids.py @@ -15,7 +15,6 @@ # along with this program; if not, write to the Free Software Foundation, # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. import os - from GridCalEngine.IO.file_handler import FileOpen @@ -54,3 +53,20 @@ def test_all_grids(): circuit = file_handler.open() assert len(failed) == 0 + + +def test_line_templates_finding(): + """ + Test that checks that a line assigned a line template that is not a Sequence line can open it + :return: + """ + # get the directory of this file + current_path = os.path.dirname(__file__) + + # navigate to the grids folder + fname = os.path.join(current_path, 'data', 'grids', 'test_line_templates.gridcal') + + opener = FileOpen(fname) + grid = opener.open() + + assert not opener.logger.has_logs() diff --git a/src/trunk/ntc/ntc_example.py b/src/trunk/ntc/ntc_example.py new file mode 100644 index 000000000..8e8b54967 --- /dev/null +++ b/src/trunk/ntc/ntc_example.py @@ -0,0 +1,36 @@ +import GridCalEngine.api as gce + +fname = "../../../Grids_and_profiles/grids/ntc_8_bus.gridcal" + +grid = gce.open_file(fname) + +info = grid.get_inter_aggregation_info(objects_from=[grid.areas[0]], + objects_to=[grid.areas[1]]) + +opf_options = gce.OptimalPowerFlowOptions() +lin_options = gce.LinearAnalysisOptions() + +ntc_options = gce.OptimalNetTransferCapacityOptions( + area_from_bus_idx=info.idx_bus_from, + area_to_bus_idx=info.idx_bus_to, + transfer_method=gce.AvailableTransferMode.InstalledPower, + loading_threshold_to_report=98.0, + skip_generation_limits=True, + transmission_reliability_margin=0.1, + branch_exchange_sensitivity=0.01, + use_branch_exchange_sensitivity=True, + branch_rating_contribution=1.0, + use_branch_rating_contribution=True, + consider_contingencies=True, + opf_options=opf_options, + lin_options=lin_options +) + +drv = gce.OptimalNetTransferCapacityDriver(grid, ntc_options) + +drv.run() + +res = drv.results + +drv.logger.print("Logger:") +print()