Skip to content

Commit

Permalink
Merge pull request #113 from oemof/fix/hotfixes
Browse files Browse the repository at this point in the history
Fix/hotfixes
  • Loading branch information
c-moeller committed Apr 28, 2020
2 parents a682b36 + 382f0ec commit 27791fc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 109 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -160,5 +160,5 @@
title='Heat of the collector')
ax.grid()
ax.legend()
plt.savefig('compare_precalculations.png')
plt.savefig('results/heat_of_the_collector.png')
plt.show()
Original file line number Diff line number Diff line change
Expand Up @@ -170,15 +170,13 @@
# save model results to csv
results = outputlib.processing.results(model)

collector_inflow = outputlib.views.node(
results, 'solar_collector-inflow')['sequences']
thermal_bus = outputlib.views.node(results, 'thermal')['sequences']
electricity_bus = outputlib.views.node(results, 'electricity')['sequences']
df = pd.DataFrame()
df = df.append(collector_inflow)
df = df.join(thermal_bus, lsuffix='_1')
df = df.join(electricity_bus, lsuffix='_1')
df.to_csv(results_path + 'flat_plate_investment_results.csv')
thermal_bus = outputlib.views.node(results, 'thermal')['sequences']
solar_bus = outputlib.views.node(results, 'solar')['sequences']
df = pd.merge(
pd.merge(electricity_bus, thermal_bus, left_index=True, right_index=True),
solar_bus, left_index=True, right_index=True)
df.to_csv(results_path + 'flat_plate_results.csv')

# Example plot
plot_collector_heat(precalc_data, periods, eta_0)
4 changes: 2 additions & 2 deletions examples/solar_thermal_collector/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def plot_collector_heat(data_precalc, periods, eta_0):
t = list(range(1, periods + 1))

fig, ax = plt.subplots()
ax.plot(t, heat_calc, label='CSP precalculation')
ax.plot(t, heat_calc, label='Solar thermal precalculation')
ax.plot(t, heat_compare, label='constant efficiency')
ax.set(
xlabel='time in h',
Expand All @@ -27,7 +27,7 @@ def plot_collector_heat(data_precalc, periods, eta_0):
)
ax.grid()
ax.legend()
plt.savefig('compare_precalculations.png')
plt.savefig('results/compare_precalculations.png')
plt.show()

return
49 changes: 0 additions & 49 deletions examples/solar_thermal_collector/results/flate_plate_precalcs.csv

This file was deleted.

This file was deleted.

0 comments on commit 27791fc

Please sign in to comment.