General174 commited on
Commit
09c21c1
·
1 Parent(s): 1562534

Upload 3 files

Browse files
Files changed (3) hide show
  1. Input_Jahr_2021.xlsx +2 -2
  2. app.py +3 -4
  3. sourced.py +4 -3
Input_Jahr_2021.xlsx CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:1c4ef37909db51eea482b585b2d38496735c11b680d8553d528e9e1089bb48a2
3
- size 995439
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c92d04350980ce78a44f5ce2cc57fef81682eb12247d80b9f89bed4954302d7d
3
+ size 995396
app.py CHANGED
@@ -70,7 +70,6 @@ iConv = sets_dict['iConv']
70
  iPtG = sets_dict['iPtG']
71
  iRes = sets_dict['iRes']
72
  iHyRes = sets_dict['iHyRes']
73
- iChar = sets_dict['iChar']
74
 
75
  # Unpack params_dict into the workspace
76
  l_co2 = params_dict['l_co2']
@@ -251,8 +250,8 @@ with colb1:
251
  fig
252
 
253
  # %%
254
- df_charging = m.solution['y_ch'].sel(i = iChar).to_dataframe().reset_index()
255
- fig = px.area(m.solution['y_ch'].sel(i = iChar).to_dataframe().reset_index(), y='y_ch', x='t', title='Storage charging', color='i')
256
 
257
  with colb2:
258
  fig
@@ -284,7 +283,7 @@ with pd.ExcelWriter(output, engine='xlsxwriter') as writer:
284
  df_new_capacities.to_excel(writer, sheet_name='Capacities', index=False)
285
  df_production.to_excel(writer, sheet_name='Production', index=False)
286
  df_charging.to_excel(writer, sheet_name='Charging', index=False)
287
- D_t.to_dataframe().reset_index().to_excel(writer, sheet_name='Demand', index=False)
288
  df_curtailment.to_excel(writer, sheet_name='Curtailment', index=False)
289
  df_Co2_price.to_excel(writer, sheet_name='CO2_Price', index=False)
290
 
 
70
  iPtG = sets_dict['iPtG']
71
  iRes = sets_dict['iRes']
72
  iHyRes = sets_dict['iHyRes']
 
73
 
74
  # Unpack params_dict into the workspace
75
  l_co2 = params_dict['l_co2']
 
250
  fig
251
 
252
  # %%
253
+ df_charging = m.solution['y_ch'].sel(i = iSto).to_dataframe().reset_index()
254
+ fig = px.area(m.solution['y_ch'].sel(i = iSto).to_dataframe().reset_index(), y='y_ch', x='t', title='Storage charging', color='i')
255
 
256
  with colb2:
257
  fig
 
283
  df_new_capacities.to_excel(writer, sheet_name='Capacities', index=False)
284
  df_production.to_excel(writer, sheet_name='Production', index=False)
285
  df_charging.to_excel(writer, sheet_name='Charging', index=False)
286
+ D_t.to_excel(writer, sheet_name='Demand', index=False)
287
  df_curtailment.to_excel(writer, sheet_name='Curtailment', index=False)
288
  df_Co2_price.to_excel(writer, sheet_name='CO2_Price', index=False)
289
 
sourced.py CHANGED
@@ -35,6 +35,9 @@ def load_data_from_excel(url_excel,load_from_pickle_flag = False, write_to_pickl
35
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
36
  i = pd.Index(df_excel.iloc[:, 0], name='i')
37
 
 
 
 
38
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
39
  iConv = pd.Index(df_excel.iloc[0:7, 2], name='iConv')
40
 
@@ -47,11 +50,9 @@ def load_data_from_excel(url_excel,load_from_pickle_flag = False, write_to_pickl
47
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
48
  iPtG = pd.Index(df_excel.iloc[0:1, 8], name='iPtG')
49
 
50
- df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
51
- iHyRes = pd.Index(df_excel.iloc[0:1, 10], name='iHyRes')
52
 
53
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
54
- iChar = pd.Index(df_excel.iloc[0:3, 12], name='iChar')
55
 
56
  # Parameters
57
  l_co2 = pd.read_excel(url_excel, sheet_name='CO2_Cap').iloc[0,0]
 
35
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
36
  i = pd.Index(df_excel.iloc[:, 0], name='i')
37
 
38
+
39
+
40
+
41
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
42
  iConv = pd.Index(df_excel.iloc[0:7, 2], name='iConv')
43
 
 
50
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
51
  iPtG = pd.Index(df_excel.iloc[0:1, 8], name='iPtG')
52
 
 
 
53
 
54
  df_excel = pd.read_excel(url_excel, sheet_name='Technologies')
55
+ iHyRes = pd.Index(df_excel.iloc[0:1, 10], name='iHyRes')
56
 
57
  # Parameters
58
  l_co2 = pd.read_excel(url_excel, sheet_name='CO2_Cap').iloc[0,0]