naohiro701 commited on
Commit
a322048
·
verified ·
1 Parent(s): fe4d036

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -147,8 +147,8 @@ def plot_capacity_distribution(alternative_solutions, selected_technologies):
147
 
148
  return fig_violin
149
 
150
- # Function to create cost breakdown stacked bar plot for each threshold
151
- def plot_cost_breakdown(alternative_solutions, selected_technologies):
152
  # Generate a bar plot for each case based on threshold and technology type
153
  for sol in alternative_solutions:
154
  cost_data = {
@@ -196,4 +196,9 @@ if st.button("Run MGA Optimization"):
196
  st.plotly_chart(fig_violin, use_container_width=True)
197
 
198
  # Display cost breakdown stacked bar plots for each case
199
- plot_cost_breakdown(alternative_solutions, selected_technologies)
 
 
 
 
 
 
147
 
148
  return fig_violin
149
 
150
+ # Function to create cost breakdown stacked bar plot for each threshold and technology type
151
+ def plot_cost_breakdown(alternative_solutions, selected_technologies, renewable_capacity_cost, battery_cost_per_mwh):
152
  # Generate a bar plot for each case based on threshold and technology type
153
  for sol in alternative_solutions:
154
  cost_data = {
 
196
  st.plotly_chart(fig_violin, use_container_width=True)
197
 
198
  # Display cost breakdown stacked bar plots for each case
199
+ plot_cost_breakdown(alternative_solutions, selected_technologies, {
200
+ 'solar': solar_cost,
201
+ 'onshore_wind': onshore_wind_cost,
202
+ 'offshore_wind': offshore_wind_cost,
203
+ 'river': river_cost
204
+ }, battery_cost)