From 98c1444d09d2d18dc62fe0c3492ce3be1ede4fbc Mon Sep 17 00:00:00 2001
From: Shahm Barmada <45445736+ShahmBarmada@users.noreply.github.com>
Date: Thu, 4 Nov 2021 09:45:10 +0200
Subject: [PATCH] made collective analysis based on selective ranges instead of
continuous ranges
---
App.py | 116 ++++++++--
Plotter.py | 52 +++--
QtUI/ui_main_window.ui | 15 +-
QtUI/ui_range_selection.ui | 436 +++++++++++++++++++++++++++++++++++++
UI_Main.py | 9 +-
UI_RangeForm.py | 155 +++++++++++++
6 files changed, 741 insertions(+), 42 deletions(-)
create mode 100644 QtUI/ui_range_selection.ui
create mode 100644 UI_RangeForm.py
diff --git a/App.py b/App.py
index 4e483d2..1a3b8ef 100644
--- a/App.py
+++ b/App.py
@@ -10,13 +10,15 @@
from CSV_Parser import csvParser
from Plotter import (PlotterSelective, PlotterCollective)
from UI_Main import Ui_MainWindow
+from UI_RangeForm import Ui_RangeForm
dataList = {'Renewable Energy Sources [g]':'0100', 'Hydrolic Powers [g]':'0200', 'Solar Thermal Powers [g]':'0300', 'Combined Steam & Heat Production [g]':'0400', 'Geothermal Heat Production [g]':'0500', 'Power Plants Electricity Production [g]':'0600', 'Nuclear [g]':'0700', 'Pump Consumption [g]':'0800', 'Turbine Production [g]':'0900', 'Pump Storage [g]':'1000', 'Electrolyser Gr.2 [g]':'1100', 'Electrolyser Gr.3 [g]':'1200', 'EV & V2G (Transport) [g]':'1300', 'Nordpool Prices [g]':'1400', 'Market Prices [g]':'1500', 'Exports Payment [g]':'1600', 'Individual Heat 1 [g]':'1700', 'Individual Electricity [g]':'1800', 'Individual Heat 2 [g]':'1900', 'Transports Heat 2 [g]':'2000', 'District Cooling [g]':'2100', 'Desalination [g]':'2200', 'Gas Grid Demand & Balance [g]':'2300', 'Electr. Demand':'0001', 'Elec.dem Cooling':'0002', 'Fixed Exp/Imp':'0003', 'DH Demand':'0004', 'Wind Electr.':'0101', 'Offshore Electr.':'0102', 'PV Electr.':'0103', 'CSP Electr.':'0104', 'River Electr.':'0105', 'Wave Electr.':'0106', 'Tidal Electr.':'0107', 'CSP2 Electr.':'0108', 'CSP2 Storage':'0109', 'CSP2 loss':'0110', 'Hydro Electr.':'0201', 'Hydro pump':'0202', 'Hydro storage':'0203', 'Hydro Wat-Sup':'0204', 'Hydro Wat-Loss':'0205', 'Solar Heat':'0301', 'CSHP 1 Heat':'0401', 'Waste 1 Heat':'0402', 'Boiler 1 Heat':'0005', 'Solar 1 Heat':'0302', 'Sol1 Str Heat':'0303', 'CSHP 2 Heat':'0403', 'Waste 2 Heat':'0404', 'Geoth 2 Heat':'0501', 'Geoth 2 Steam':'0502', 'Geoth 2 Storage':'0503', 'CHP 2 Heat':'0006', 'HP 2 Heat':'0007', 'Boiler 2 Heat':'0008', 'EH 2 Heat':'0009', 'ELT 2 Heat':'0010', 'Solar2 Heat':'0304', 'Sol2 Str Heat':'0305', 'Storage2 Heat':'0011', 'Balance2 Heat':'0012', 'CSHP 3 Heat':'0405', 'Waste 3 Heat':'0406', 'Geoth 3 Heat':'0504', 'Geoth 3 Steam':'0505', 'Geoth 3 Storage':'0506', 'CHP 3 Heat':'0013', 'HP 3 Heat':'0014', 'Boiler 3 Heat':'0015', 'EH 3 Heat':'0016', 'ELT 3 Heat':'0017', 'Solar3 Heat':'0306', 'Sol3 Str Heat':'0307', 'Storage3 Heat':'0018', 'Balance3 Heat':'0019', 'Flexible Electr.':'0020', 'HP Electr.':'0021', 'CSHP Electr.':'0022', 'CHP Electr.':'0023', 'PP Electr.':'0601', 'PP2 Electr.':'0602', 'Nuclear Electr.':'0701', 'Geother. Electr.':'0702', 'Pump Electr.':'0801', 'Turbine Electr.':'0901', 'Pumped Storage':'1001', 'Pump2 Electr.':'0802', 'Turbine2 Electr.':'0902', 'Pumped2 Storage':'1002', 'Rock in Electr.':'0903', 'Rock out Steam':'0904', 'Rock str Storage':'0905', 'ELT 2 Electr.':'1101', 'ELT 2 H2 ELT 2':'1102', 'ELT 3 Electr.':'1201', 'ELT 3 H2 ELT 3':'1202', 'V2G Demand':'1301', 'V2G Charge':'1302', 'V2G Discha.':'1303', 'V2G Storage':'1304', 'H2 Electr.':'2001', 'H2 Storage':'2002', 'CO2Hydro Electr.':'2003', 'NH3Hydro Electr.':'2004', 'CO2Hydro liq.fuel':'2005', 'NH3Hydro Ammonia':'2006', 'HH-CHP Electr.':'1801', 'HH-HP Electr.':'1802', 'HH-HP/EB Electr.':'1803', 'HH-EB Electr.':'1804', 'HH-H2 Electr.':'1901', 'HH-H2 Storage':'1902', 'HH-H2 Prices':'1903', 'HH Dem. Heat':'1701', 'HH CHP+HP Heat':'1702', 'HH Boil. Heat':'1703', 'HH Solar Heat':'1704', 'HH Store Heat':'1705', 'HH Balan Heat':'1706', 'Stabil. LoadPercent':'0024', 'Import Electr.':'0025', 'Export Electr.':'0026', 'CEEP Electr.':'0027', 'EEEP Electr.':'0028', 'ExMarket Prices':'1401', 'ExMarket Prod':'1402', 'System Prices':'1501', 'InMarket Prices':'1502', 'Btl-neck Prices':'1503', 'Import Payment':'0029', 'Export Payment':'1601', 'Blt-neck Payment':'1602', 'Add-exp Payment':'0030', 'Boilers ':'2301', 'CHP2+3 ':'2302', 'PP CAES':'2303', 'Indi- vidual':'2304', 'Transp. ':'2305', 'Indust. Various':'2306', 'Demand Sum':'2307', 'Biogas ':'2308', 'Syngas ':'2309', 'CO2HyGas ':'2310', 'SynHyGas ':'2311', 'SynFuel ':'2312', 'Storage ':'2313', 'Storage Content':'2314', 'Sum ':'2315', 'Import Gas':'2316', 'Export Gas':'2317', 'FreshW Demand':'2201', 'FreshW Storage':'2202', 'SaltW Demand':'2203', 'Brine Prod.':'2204', 'Brine Storage':'2205', 'Desal.Pl Electr.':'2206', 'FWPump Electr.':'2207', 'Turbine Electr.':'2208', 'Pump Electr.':'2209', 'CoolGr1 Demand':'2101', 'CoolGr2 Demand':'2102', 'CoolGr3 Demand':'2103', 'Cool-El Demand':'2104', 'CoolGr1 Natural':'2105', 'CoolGr2 Natural':'2106', 'CoolGr3 Natural':'2107', 'Cooling DHgr1':'2108', 'Cooling DHgr2':'2109', 'Cooling DHgr3':'2110', 'Cooling Electr.':'2111'}
monthList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
-figList, pltList, stdList = [], [], []
+figList, pltList, stdList, xRangelist = [], [], [], []
figID, pltID, stdID = 1, 1, 1
+
class MainWindow(QMainWindow, Ui_MainWindow):
def __init__(self):
@@ -43,7 +45,7 @@ def SwitchHandelers(self):
self.lw_StdList.currentRowChanged.connect(self.UpdateStdSlct)
self.cb_TicksX.stateChanged.connect(self.UpdateTickStateX)
self.cb_TicksY.stateChanged.connect(self.UpdateTickStateY)
- self.cb_Xdata.currentTextChanged.connect(self.UpdateRangeX)
+ self.cb_Xdata.currentTextChanged.connect(self.UpdateXdata)
def SelectiveAnalysis(self):
self.rb_HourlyVal.setEnabled(True)
@@ -52,6 +54,7 @@ def SelectiveAnalysis(self):
self.cb_StatMean.setEnabled(True)
self.cb_StatMedian.setEnabled(True)
self.rb_HourlyVal.setChecked(True)
+ self.btn_Xrange.setEnabled(False)
self.UpdateDataType()
def CollectiveAnalysis(self):
@@ -61,6 +64,7 @@ def CollectiveAnalysis(self):
self.cb_StatMean.setEnabled(False)
self.cb_StatMedian.setEnabled(False)
self.rb_AnnualVal.setChecked(True)
+ self.btn_Xrange.setEnabled(True)
self.UpdateDataType()
def UpdateDataType(self):
@@ -125,8 +129,8 @@ def UpdateDataType(self):
self.cb_Trace.setCurrentIndex(0)
self.rb_Xdata.setChecked(True)
self.rb_Xtime.setEnabled(False)
- self.cb_Xstart.setEnabled(True)
- self.cb_Xend.setEnabled(True)
+ self.cb_Xstart.setEnabled(False)
+ self.cb_Xend.setEnabled(False)
self.sb_Col.setEnabled(False)
self.sb_Row.setEnabled(False)
self.cb_Ydata.clear()
@@ -176,17 +180,10 @@ def UpdateTrace(self):
if self.rb_AnnualVal.isChecked():
self.cb_Xdata.clear()
self.cb_Xdata.addItems(['Energy Balance (per Index)', 'Installed Capacities (per Index)', 'Total Elect. Demand', 'Total Heat Demand'])
- self.UpdateRangeX()
-
- def UpdateRangeX(self):
- self.cb_Xstart.clear()
- self.cb_Xend.clear()
- if self.cb_Xdata.currentText() == 'Energy Balance (per Index)':
- self.cb_Xstart.addItems(['Coal', 'Oil', 'N.Gas', 'Biomass', 'Renewable'])
- self.cb_Xend.addItems(['Coal', 'Oil', 'N.Gas', 'Biomass', 'Renewable'])
- elif self.cb_Xdata.currentText() == 'Installed Capacities (per Index)':
- self.cb_Xstart.addItems(['PP1', 'CHP2', 'CHP3', 'PP2', 'Nuclear', 'Geopower', 'Hydro', 'Res1', 'Res2', 'Res3', 'Res4', 'Res5', 'Res6', 'Res7', 'Heat Pump 2', 'Heat Pump 3', 'Electrolysers', 'Boiler 2', 'Boiler3 ', 'Boiler 2 Thermal', 'Boiler 3 Thermal', 'CHP2 Thermal', 'CHP3 Thermal'])
- self.cb_Xend.addItems(['PP1', 'CHP2', 'CHP3', 'PP2', 'Nuclear', 'Geopower', 'Hydro', 'Res1', 'Res2', 'Res3', 'Res4', 'Res5', 'Res6', 'Res7', 'Heat Pump 2', 'Heat Pump 3', 'Electrolysers', 'Boiler 2', 'Boiler3 ', 'Boiler 2 Thermal', 'Boiler 3 Thermal', 'CHP2 Thermal', 'CHP3 Thermal'])
+
+ def UpdateXdata(self):
+ global xDataMode
+ xDataMode = self.cb_Xdata.currentText()
def UpdateTickStateX(self):
if self.cb_TicksX.isChecked():
@@ -240,6 +237,7 @@ def Connections(self):
self.btn_PltDlt.clicked.connect(self.RemovePlot)
self.btn_FigSave.clicked.connect(self.SaveFigure)
self.btn_FigView.clicked.connect(self.PreviewFigure)
+ self.btn_Xrange.clicked.connect(self.OpenRangeWindow)
def openAboutDialog(self):
QMessageBox.about(self, 'About', 'Hi, I\'m developer')
@@ -591,12 +589,11 @@ def PrepareFigure(self):
# get X data series:
xData = self.cb_Xdata.currentText()
- xStart = self.cb_Xstart.currentText()
- xEnd = self.cb_Xend.currentText()
+ xRange = xRangelist
traceStyle = self.cb_Style.currentText()
# process figure in plotter
- figure = PlotterCollective(slctFig, slctStd, xData, xStart, xEnd, traceStyle)
+ figure = PlotterCollective(slctFig, slctStd, xData, xRange, traceStyle)
def SaveFigure(self):
try:
@@ -626,6 +623,10 @@ def PreviewFigure(self):
except:
pass
+ def OpenRangeWindow(self):
+ self.RangeDialog = RangeWindow(self)
+ self.RangeDialog.show()
+
class PreviewWindow(QMainWindow):
def __init__(self, parent= None):
super(PreviewWindow, self).__init__(parent)
@@ -656,6 +657,85 @@ def __init__(self, parent= None):
self.setCentralWidget(self.imageLable)
os.remove('./preview.jpg')
+class RangeWindow(QMainWindow, Ui_RangeForm):
+ def __init__(self, parent= MainWindow):
+ super(RangeWindow, self).__init__(parent)
+ self.setupUi(self)
+ self.UpdateStack()
+ self.pushButton.clicked.connect(self.GenerateList)
+
+ def UpdateStack(self):
+ if xDataMode == 'Energy Balance (per Index)':
+ self.groupBox.setVisible(True)
+ self.groupBox_2.setVisible(False)
+ elif xDataMode == 'Installed Capacities (per Index)':
+ self.groupBox.setVisible(False)
+ self.groupBox_2.setVisible(True)
+
+ def GenerateList(self):
+
+ xRangelist.clear()
+ if self.groupBox.isVisible():
+ if self.checkBox_1.isChecked():
+ xRangelist.append(self.checkBox_1.text())
+ if self.checkBox_2.isChecked():
+ xRangelist.append(self.checkBox_2.text())
+ if self.checkBox_3.isChecked():
+ xRangelist.append(self.checkBox_3.text())
+ if self.checkBox_4.isChecked():
+ xRangelist.append(self.checkBox_4.text())
+ if self.checkBox_5.isChecked():
+ xRangelist.append(self.checkBox_5.text())
+
+ elif self.groupBox_2.isVisible():
+ if self.checkBox_6.isChecked():
+ xRangelist.append(self.checkBox_6.text())
+ if self.checkBox_7.isChecked():
+ xRangelist.append(self.checkBox_7.text())
+ if self.checkBox_8.isChecked():
+ xRangelist.append(self.checkBox_8.text())
+ if self.checkBox_9.isChecked():
+ xRangelist.append(self.checkBox_9.text())
+ if self.checkBox_10.isChecked():
+ xRangelist.append(self.checkBox_10.text())
+ if self.checkBox_11.isChecked():
+ xRangelist.append(self.checkBox_11.text())
+ if self.checkBox_12.isChecked():
+ xRangelist.append(self.checkBox_12.text())
+ if self.checkBox_13.isChecked():
+ xRangelist.append(self.checkBox_13.text())
+ if self.checkBox_14.isChecked():
+ xRangelist.append(self.checkBox_14.text())
+ if self.checkBox_15.isChecked():
+ xRangelist.append(self.checkBox_15.text())
+ if self.checkBox_16.isChecked():
+ xRangelist.append(self.checkBox_16.text())
+ if self.checkBox_17.isChecked():
+ xRangelist.append(self.checkBox_17.text())
+ if self.checkBox_18.isChecked():
+ xRangelist.append(self.checkBox_18.text())
+ if self.checkBox_19.isChecked():
+ xRangelist.append(self.checkBox_19.text())
+ if self.checkBox_20.isChecked():
+ xRangelist.append(self.checkBox_20.text())
+ if self.checkBox_21.isChecked():
+ xRangelist.append(self.checkBox_21.text())
+ if self.checkBox_22.isChecked():
+ xRangelist.append(self.checkBox_22.text())
+ if self.checkBox_23.isChecked():
+ xRangelist.append(self.checkBox_23.text())
+ if self.checkBox_24.isChecked():
+ xRangelist.append(self.checkBox_24.text())
+ if self.checkBox_26.isChecked():
+ xRangelist.append(self.checkBox_26.text())
+ if self.checkBox_27.isChecked():
+ xRangelist.append(self.checkBox_27.text())
+ if self.checkBox_29.isChecked():
+ xRangelist.append(self.checkBox_29.text())
+ if self.checkBox_31.isChecked():
+ xRangelist.append(self.checkBox_31.text())
+
+ self.close()
app = QApplication(sys.argv)
mainWindow = MainWindow()
diff --git a/Plotter.py b/Plotter.py
index 7aab604..e686642 100644
--- a/Plotter.py
+++ b/Plotter.py
@@ -504,12 +504,12 @@ def PlotterSelective (srcFig= dict, srcPlt= list):
return figure
-def PlotterCollective (srcFig= dict, srcStd= list, xDataSrc= str, xStart= str, xEnd= str, traceStyle= str):
+def PlotterCollective (srcFig= dict, srcStd= list, xDataSrc= str, xRange= list, traceStyle= str):
if xDataSrc == 'Energy Balance (per Index)':
indexList = ['Coal', 'Oil', 'N.Gas', 'Biomass', 'Renewable']
- indexList = indexList[indexList.index(xStart):indexList.index(xEnd)+1]
+ #indexList = indexList[indexList.index(xStart):indexList.index(xEnd)+1]
SumDF = pd.DataFrame(0, index= indexList, columns=['test'])
@@ -517,9 +517,9 @@ def PlotterCollective (srcFig= dict, srcStd= list, xDataSrc= str, xStart= str, x
stdDF = pd.read_csv(srcStd[study]['path'], delimiter=',', low_memory=False, index_col='Index')
rangeStart = stdDF.index.get_loc('TotalAnnualCosts')
- rangeStart = rangeStart + stdDF.iloc[rangeStart:rangeStart+100].index.get_loc(xStart)
+ rangeStart = rangeStart + stdDF.iloc[rangeStart:rangeStart+100].index.get_loc(indexList[0])
- rangeEnd = stdDF.iloc[rangeStart:rangeStart+100].index.get_loc(xEnd)
+ rangeEnd = stdDF.iloc[rangeStart:rangeStart+100].index.get_loc(indexList[-1])
rangeEnd = rangeEnd + rangeStart +1
xData = stdDF.iloc[rangeStart:rangeEnd].index.values.tolist()
@@ -531,6 +531,11 @@ def PlotterCollective (srcFig= dict, srcStd= list, xDataSrc= str, xStart= str, x
SumDF.drop(['test'], axis= 1, inplace=True)
+ xRangeTarget = SumDF.index.values.tolist()
+ for j in range(len(xRangeTarget)):
+ if xRangeTarget[j] not in xRange:
+ SumDF.drop([xRangeTarget[j]], axis= 0, inplace=True)
+
figure = make_subplots()
if traceStyle == 'Whiskers & Points':
@@ -571,40 +576,45 @@ def PlotterCollective (srcFig= dict, srcStd= list, xDataSrc= str, xStart= str, x
list1 = ['InputCapPpEl', 'InputCapChp2El', 'InputCapChp3El', 'InputCapPp2El', 'InputNuclearCap', 'InputGeopowerCap', 'InputHydroCap', 'InputRes1Capacity', 'InputRes2Capacity', 'InputRes3Capacity', 'InputRes4Capacity', 'InputRes5Capacity', 'InputRes6Capacity', 'InputRes7Capacity', 'InputCapHp2El', 'InputCapHp3El', 'InputCapElttransEl', 'InputEh2', 'InputEh3', 'InputCapBoiler2Th', 'InputCapBoiler3Th', 'InputCapChp2Thermal', 'InputCapChp3Thermal']
- list2 = ['PP1', 'CHP2', 'CHP3', 'PP2', 'Nuclear', 'Geopower', 'Hydro', 'Res1', 'Res2', 'Res3', 'Res4', 'Res5', 'Res6', 'Res7', 'Heat Pump 2', 'Heat Pump 3', 'Electrolysers', 'Boiler 2', 'Boiler3 ', 'Boiler 2 Thermal', 'Boiler 3 Thermal', 'CHP2 Thermal', 'CHP3 Thermal']
+ list2 = ['PP1', 'CHP2', 'CHP3', 'PP2', 'Nuclear', 'Geopower', 'Hydro', 'Res1', 'Res2', 'Res3', 'Res4', 'Res5', 'Res6', 'Res7', 'Heat Pump 2', 'Heat Pump 3', 'Electrolysers', 'Boiler 2', 'Boiler 3 ', 'Boiler 2 Thermal', 'Boiler 3 Thermal', 'CHP2 Thermal', 'CHP3 Thermal']
- xStartIndex = list2.index(xStart)
- xEndIndex = list2.index(xEnd)+1
+ #xStartIndex = list2.index(xStart)
+ #xEndIndex = list2.index(xEnd)+1
- xStart = list1[xStartIndex]
- try:
- xEnd = list1[xEndIndex]
- except:
- xEnd = list1[-1]
+ #xStart = list1[xStartIndex]
+ #try:
+ # xEnd = list1[xEndIndex]
+ #except:
+ # xEnd = list1[-1]
- list1 = list1[xStartIndex:xEndIndex]
- list2 = list2[xStartIndex:xEndIndex]
+ #list1 = list1[xStartIndex:xEndIndex]
+ #list2 = list2[xStartIndex:xEndIndex]
SumDF = pd.DataFrame(0, index= list1, columns=['test'])
for study in range(len(srcStd)):
stdDF = pd.read_csv(srcStd[study]['path'], delimiter=',', low_memory=False, index_col='Index')
-
- rangeStart = stdDF.index.get_loc(xStart)
- rangeEnd = stdDF.index.get_loc(xEnd) +1
-
- #xData = stdDF.iloc[rangeStart:rangeEnd].index.values.tolist()
-
+
+ rangeStart = stdDF.index.get_loc(list1[0])
+ rangeEnd = stdDF.index.get_loc(list1[-1]) +1
+
stdDF = stdDF.iloc[rangeStart:rangeEnd]
stdDF = stdDF.loc[:, 'g0-Data1']
stdDF = stdDF.astype(float)
-
+
SumDF.insert(0, 'std' + str(study), stdDF)
SumDF.drop(['test'], axis= 1, inplace=True)
SumDF.rename(index= dict(zip(list1, list2)), inplace= True)
+ xRangeTarget = SumDF.index.values.tolist()
+ for j in range(len(xRangeTarget)):
+ if xRangeTarget[j] not in xRange:
+ SumDF.drop([xRangeTarget[j]], axis= 0, inplace=True)
+
+ SumDF.sort_index(axis=0, inplace=True)
+
xData = SumDF.index.values.tolist()
figure = make_subplots()
diff --git a/QtUI/ui_main_window.ui b/QtUI/ui_main_window.ui
index 9335fca..e1bf962 100644
--- a/QtUI/ui_main_window.ui
+++ b/QtUI/ui_main_window.ui
@@ -47,7 +47,7 @@
QFrame::Plain
- 0
+ 1
@@ -1066,6 +1066,19 @@
Data Series
+
+
+
+ 290
+ 40
+ 50
+ 24
+
+
+
+ Select
+
+
diff --git a/QtUI/ui_range_selection.ui b/QtUI/ui_range_selection.ui
new file mode 100644
index 0000000..a69de4f
--- /dev/null
+++ b/QtUI/ui_range_selection.ui
@@ -0,0 +1,436 @@
+
+
+ MainWindow
+
+
+
+ 0
+ 0
+ 260
+ 430
+
+
+
+ Ranges Form
+
+
+
+
+ true
+
+
+
+ 10
+ 10
+ 241
+ 381
+
+
+
+ Installed Capacities
+
+
+ true
+
+
+
+
+ 10
+ 230
+ 105
+ 24
+
+
+
+ Res3
+
+
+
+
+
+ 10
+ 110
+ 105
+ 24
+
+
+
+ Geopower
+
+
+
+
+
+ 10
+ 170
+ 105
+ 24
+
+
+
+ Res1
+
+
+
+
+
+ 10
+ 200
+ 105
+ 24
+
+
+
+ Res2
+
+
+
+
+
+ 10
+ 140
+ 105
+ 24
+
+
+
+ Hydro
+
+
+
+
+
+ 10
+ 260
+ 105
+ 24
+
+
+
+ Res4
+
+
+
+
+
+ 10
+ 320
+ 105
+ 24
+
+
+
+ Res6
+
+
+
+
+
+ 10
+ 290
+ 105
+ 24
+
+
+
+ Res5
+
+
+
+
+
+ 120
+ 140
+ 105
+ 24
+
+
+
+ Heat Pump 2
+
+
+
+
+
+ 120
+ 170
+ 105
+ 24
+
+
+
+ Heat Pump 3
+
+
+
+
+
+ 120
+ 200
+ 105
+ 24
+
+
+
+ Electrolysers
+
+
+
+
+
+ 120
+ 230
+ 105
+ 24
+
+
+
+ Boiler 2
+
+
+
+
+
+ 120
+ 80
+ 105
+ 24
+
+
+
+ CHP2 Thermal
+
+
+
+
+
+ 120
+ 260
+ 105
+ 24
+
+
+
+ Boiler 3
+
+
+
+
+
+ 120
+ 110
+ 105
+ 24
+
+
+
+ CHP3 Thermal
+
+
+
+
+
+ 120
+ 290
+ 118
+ 24
+
+
+
+ Boiler 2 Thermal
+
+
+
+
+
+ 120
+ 320
+ 118
+ 24
+
+
+
+ Boiler 3 Thermal
+
+
+
+
+
+ 10
+ 350
+ 105
+ 24
+
+
+
+ Res7
+
+
+
+
+
+ 10
+ 80
+ 105
+ 24
+
+
+
+ Nuclear
+
+
+
+
+
+ 10
+ 20
+ 105
+ 24
+
+
+
+ PP1
+
+
+
+
+
+ 120
+ 50
+ 105
+ 24
+
+
+
+ CHP3
+
+
+
+
+
+ 10
+ 50
+ 105
+ 24
+
+
+
+ PP2
+
+
+
+
+
+ 120
+ 20
+ 105
+ 24
+
+
+
+ CHP2
+
+
+
+
+
+
+ 10
+ 10
+ 121
+ 171
+
+
+
+ Energy Balance
+
+
+ true
+
+
+ false
+
+
+
+
+ 10
+ 20
+ 105
+ 22
+
+
+
+ Coal
+
+
+
+
+
+ 11
+ 50
+ 105
+ 22
+
+
+
+ Oil
+
+
+
+
+
+ 11
+ 80
+ 105
+ 22
+
+
+
+ N.Gas
+
+
+
+
+
+ 11
+ 110
+ 105
+ 22
+
+
+
+ Biomass
+
+
+
+
+
+ 11
+ 140
+ 105
+ 22
+
+
+
+ Renewable
+
+
+
+
+
+
+ 90
+ 400
+ 75
+ 24
+
+
+
+ Save
+
+
+
+
+
+
+
diff --git a/UI_Main.py b/UI_Main.py
index 1d980f1..61e5b61 100644
--- a/UI_Main.py
+++ b/UI_Main.py
@@ -230,13 +230,13 @@ def setupUi(self, MainWindow):
self.sb_RowSpan.setGeometry(QtCore.QRect(305, 185, 50, 24))
self.sb_RowSpan.setMinimum(1)
self.sb_RowSpan.setMaximum(12)
- self.sb_RowSpan.setEnabled(False)
+ self.sb_RowSpan.setEnabled(False)
self.sb_RowSpan.setObjectName("sb_RowSpan")
self.sb_ColSpan = QtWidgets.QSpinBox(self.gb_PlotConfigs)
self.sb_ColSpan.setGeometry(QtCore.QRect(305, 215, 50, 24))
self.sb_ColSpan.setMinimum(1)
self.sb_ColSpan.setMaximum(12)
- self.sb_ColSpan.setEnabled(False)
+ self.sb_ColSpan.setEnabled(False)
self.sb_ColSpan.setObjectName("sb_ColSpan")
self.label32 = QtWidgets.QLabel(self.gb_PlotConfigs)
self.label32.setGeometry(QtCore.QRect(235, 215, 60, 24))
@@ -318,6 +318,9 @@ def setupUi(self, MainWindow):
self.rb_Xdata = QtWidgets.QRadioButton(self.gb_SeriesX)
self.rb_Xdata.setGeometry(QtCore.QRect(10, 90, 90, 24))
self.rb_Xdata.setObjectName("rb_Xdata")
+ self.btn_Xrange = QtWidgets.QPushButton(self.gb_SeriesX)
+ self.btn_Xrange.setGeometry(QtCore.QRect(290, 40, 50, 24))
+ self.btn_Xrange.setObjectName("btn_Xrange")
self.gb_SeriesY = QtWidgets.QGroupBox(self.gb_Plots)
self.gb_SeriesY.setGeometry(QtCore.QRect(10, 485, 365, 50))
self.gb_SeriesY.setFlat(True)
@@ -474,6 +477,7 @@ def setupUi(self, MainWindow):
self.stackedWidget.addWidget(self.page_2)
self.btn_Page = QtWidgets.QPushButton(self.centralwidget)
self.btn_Page.setGeometry(QtCore.QRect(850, 8, 30, 21))
+
self.btn_Page.setObjectName("btn_Page")
self.btn_Page.setFlat(True)
MainWindow.setCentralWidget(self.centralwidget)
@@ -560,6 +564,7 @@ def retranslateUi(self, MainWindow):
self.label35.setText(_translate("MainWindow", "To"))
self.rb_Xtime.setText(_translate("MainWindow", "Time Series"))
self.rb_Xdata.setText(_translate("MainWindow", "Data Series"))
+ self.btn_Xrange.setText(_translate("MainWindow", "Select"))
self.gb_SeriesY.setTitle(_translate("MainWindow", "Data (Y Axis):"))
self.gb_Figures.setTitle(_translate("MainWindow", "Figures"))
self.btn_FigDlt.setText(_translate("MainWindow", "Delete"))
diff --git a/UI_RangeForm.py b/UI_RangeForm.py
new file mode 100644
index 0000000..1352b71
--- /dev/null
+++ b/UI_RangeForm.py
@@ -0,0 +1,155 @@
+# Form implementation generated from reading ui file '.\QtUI\ui_range_selection.ui'
+#
+# Created by: PyQt6 UI code generator 6.1.0
+#
+# WARNING: Any manual changes made to this file will be lost when pyuic6 is
+# run again. Do not edit this file unless you know what you are doing.
+
+
+from PyQt6 import QtCore, QtGui, QtWidgets
+
+
+class Ui_RangeForm(object):
+ def setupUi(self, MainWindow):
+ MainWindow.setObjectName("MainWindow")
+ MainWindow.resize(260, 430)
+ self.centralwidget = QtWidgets.QWidget(MainWindow)
+ self.centralwidget.setObjectName("centralwidget")
+ self.groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
+ self.groupBox_2.setEnabled(True)
+ self.groupBox_2.setGeometry(QtCore.QRect(10, 10, 241, 381))
+ self.groupBox_2.setFlat(True)
+ self.groupBox_2.setObjectName("groupBox_2")
+ self.checkBox_11 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_11.setGeometry(QtCore.QRect(10, 230, 105, 24))
+ self.checkBox_11.setObjectName("checkBox_11")
+ self.checkBox_12 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_12.setGeometry(QtCore.QRect(10, 110, 105, 24))
+ self.checkBox_12.setObjectName("checkBox_12")
+ self.checkBox_13 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_13.setGeometry(QtCore.QRect(10, 170, 105, 24))
+ self.checkBox_13.setObjectName("checkBox_13")
+ self.checkBox_14 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_14.setGeometry(QtCore.QRect(10, 200, 105, 24))
+ self.checkBox_14.setObjectName("checkBox_14")
+ self.checkBox_15 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_15.setGeometry(QtCore.QRect(10, 140, 105, 24))
+ self.checkBox_15.setObjectName("checkBox_15")
+ self.checkBox_16 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_16.setGeometry(QtCore.QRect(10, 260, 105, 24))
+ self.checkBox_16.setObjectName("checkBox_16")
+ self.checkBox_17 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_17.setGeometry(QtCore.QRect(10, 320, 105, 24))
+ self.checkBox_17.setObjectName("checkBox_17")
+ self.checkBox_18 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_18.setGeometry(QtCore.QRect(10, 290, 105, 24))
+ self.checkBox_18.setObjectName("checkBox_18")
+ self.checkBox_19 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_19.setGeometry(QtCore.QRect(120, 140, 105, 24))
+ self.checkBox_19.setObjectName("checkBox_19")
+ self.checkBox_20 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_20.setGeometry(QtCore.QRect(120, 170, 105, 24))
+ self.checkBox_20.setObjectName("checkBox_20")
+ self.checkBox_21 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_21.setGeometry(QtCore.QRect(120, 200, 105, 24))
+ self.checkBox_21.setObjectName("checkBox_21")
+ self.checkBox_22 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_22.setGeometry(QtCore.QRect(120, 230, 105, 24))
+ self.checkBox_22.setObjectName("checkBox_22")
+ self.checkBox_24 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_24.setGeometry(QtCore.QRect(120, 80, 105, 24))
+ self.checkBox_24.setObjectName("checkBox_24")
+ self.checkBox_26 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_26.setGeometry(QtCore.QRect(120, 260, 105, 24))
+ self.checkBox_26.setObjectName("checkBox_26")
+ self.checkBox_27 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_27.setGeometry(QtCore.QRect(120, 110, 105, 24))
+ self.checkBox_27.setObjectName("checkBox_27")
+ self.checkBox_29 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_29.setGeometry(QtCore.QRect(120, 290, 118, 24))
+ self.checkBox_29.setObjectName("checkBox_29")
+ self.checkBox_31 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_31.setGeometry(QtCore.QRect(120, 320, 118, 24))
+ self.checkBox_31.setObjectName("checkBox_31")
+ self.checkBox_23 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_23.setGeometry(QtCore.QRect(10, 350, 105, 24))
+ self.checkBox_23.setObjectName("checkBox_23")
+ self.checkBox_10 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_10.setGeometry(QtCore.QRect(10, 80, 105, 24))
+ self.checkBox_10.setObjectName("checkBox_10")
+ self.checkBox_6 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_6.setGeometry(QtCore.QRect(10, 20, 105, 24))
+ self.checkBox_6.setObjectName("checkBox_6")
+ self.checkBox_9 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_9.setGeometry(QtCore.QRect(120, 50, 105, 24))
+ self.checkBox_9.setObjectName("checkBox_9")
+ self.checkBox_7 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_7.setGeometry(QtCore.QRect(10, 50, 105, 24))
+ self.checkBox_7.setObjectName("checkBox_7")
+ self.checkBox_8 = QtWidgets.QCheckBox(self.groupBox_2)
+ self.checkBox_8.setGeometry(QtCore.QRect(120, 20, 105, 24))
+ self.checkBox_8.setObjectName("checkBox_8")
+ self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
+ self.groupBox.setGeometry(QtCore.QRect(10, 10, 121, 171))
+ self.groupBox.setFlat(True)
+ self.groupBox.setCheckable(False)
+ self.groupBox.setObjectName("groupBox")
+ self.checkBox_1 = QtWidgets.QCheckBox(self.groupBox)
+ self.checkBox_1.setGeometry(QtCore.QRect(10, 20, 105, 22))
+ self.checkBox_1.setObjectName("checkBox_1")
+ self.checkBox_2 = QtWidgets.QCheckBox(self.groupBox)
+ self.checkBox_2.setGeometry(QtCore.QRect(11, 50, 105, 22))
+ self.checkBox_2.setObjectName("checkBox_2")
+ self.checkBox_3 = QtWidgets.QCheckBox(self.groupBox)
+ self.checkBox_3.setGeometry(QtCore.QRect(11, 80, 105, 22))
+ self.checkBox_3.setObjectName("checkBox_3")
+ self.checkBox_4 = QtWidgets.QCheckBox(self.groupBox)
+ self.checkBox_4.setGeometry(QtCore.QRect(11, 110, 105, 22))
+ self.checkBox_4.setObjectName("checkBox_4")
+ self.checkBox_5 = QtWidgets.QCheckBox(self.groupBox)
+ self.checkBox_5.setGeometry(QtCore.QRect(11, 140, 105, 22))
+ self.checkBox_5.setObjectName("checkBox_5")
+ self.pushButton = QtWidgets.QPushButton(self.centralwidget)
+ self.pushButton.setGeometry(QtCore.QRect(90, 400, 75, 24))
+ self.pushButton.setObjectName("pushButton")
+ MainWindow.setCentralWidget(self.centralwidget)
+
+ self.groupBox_2.setVisible(False)
+
+ self.retranslateUi(MainWindow)
+ QtCore.QMetaObject.connectSlotsByName(MainWindow)
+
+ def retranslateUi(self, MainWindow):
+ _translate = QtCore.QCoreApplication.translate
+ MainWindow.setWindowTitle(_translate("MainWindow", "Ranges Form"))
+ self.groupBox_2.setTitle(_translate("MainWindow", "Installed Capacities"))
+ self.checkBox_11.setText(_translate("MainWindow", "Res3"))
+ self.checkBox_12.setText(_translate("MainWindow", "Geopower"))
+ self.checkBox_13.setText(_translate("MainWindow", "Res1"))
+ self.checkBox_14.setText(_translate("MainWindow", "Res2"))
+ self.checkBox_15.setText(_translate("MainWindow", "Hydro"))
+ self.checkBox_16.setText(_translate("MainWindow", "Res4"))
+ self.checkBox_17.setText(_translate("MainWindow", "Res6"))
+ self.checkBox_18.setText(_translate("MainWindow", "Res5"))
+ self.checkBox_19.setText(_translate("MainWindow", "Heat Pump 2"))
+ self.checkBox_20.setText(_translate("MainWindow", "Heat Pump 3"))
+ self.checkBox_21.setText(_translate("MainWindow", "Electrolysers"))
+ self.checkBox_22.setText(_translate("MainWindow", "Boiler 2"))
+ self.checkBox_24.setText(_translate("MainWindow", "CHP2 Thermal"))
+ self.checkBox_26.setText(_translate("MainWindow", "Boiler 3"))
+ self.checkBox_27.setText(_translate("MainWindow", "CHP3 Thermal"))
+ self.checkBox_29.setText(_translate("MainWindow", "Boiler 2 Thermal"))
+ self.checkBox_31.setText(_translate("MainWindow", "Boiler 3 Thermal"))
+ self.checkBox_23.setText(_translate("MainWindow", "Res7"))
+ self.checkBox_10.setText(_translate("MainWindow", "Nuclear"))
+ self.checkBox_6.setText(_translate("MainWindow", "PP1"))
+ self.checkBox_9.setText(_translate("MainWindow", "CHP3"))
+ self.checkBox_7.setText(_translate("MainWindow", "PP2"))
+ self.checkBox_8.setText(_translate("MainWindow", "CHP2"))
+ self.groupBox.setTitle(_translate("MainWindow", "Energy Balance"))
+ self.checkBox_1.setText(_translate("MainWindow", "Coal"))
+ self.checkBox_2.setText(_translate("MainWindow", "Oil"))
+ self.checkBox_3.setText(_translate("MainWindow", "N.Gas"))
+ self.checkBox_4.setText(_translate("MainWindow", "Biomass"))
+ self.checkBox_5.setText(_translate("MainWindow", "Renewable"))
+ self.pushButton.setText(_translate("MainWindow", "Save"))