Skip to content

Commit

Permalink
matouqin: update driver.py
Browse files Browse the repository at this point in the history
modification on plotting commands
  • Loading branch information
Zadie-Zhang committed Jul 2, 2024
1 parent 8ac4fb8 commit ec6c38b
Showing 1 changed file with 24 additions and 19 deletions.
43 changes: 24 additions & 19 deletions models/matouqin/driver.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def driver():
# f_data = f'{data_dir}test1680.dat' # parameter file for creating model instance
# modify_periods(f_data_base, f_data, 1680) # data processing, select the time period

f_data = f'{data_dir}dat1.dat' # real data test by ZZ
# f_data = f'{data_dir}dat1.dat' # real data test by ZZ
# f_data = f'{data_dir}test1.dat' # small scale data for testing the model
# f_data = f'{path}/Local/testx.dat' # test data

Expand All @@ -76,7 +76,7 @@ def driver():
# glpk settings
# opt = pe.SolverFactory('glpk')
# opt.options['log'] = f'{res_dir}glpk_log.txt'
# opt.options['wmps'] = f'{res_dir}glpk.mps' # glpk
# # opt.options['wmps'] = f'{res_dir}glpk.mps' # glpk
# results = opt.solve(model, tee=True) # True to pipe output to the terminal

# cplex settings
Expand Down Expand Up @@ -115,22 +115,27 @@ def driver():

print('\nPlotting begins ----------------------------------------------------------------')
fig = Plot(res_dir, fig_dir, f_data)

# Flow overview, 'hourly', 'daily', 'weekly', 'monthly', 'original' flows; 'original' use for model test results
# 'kaleido' is needed for fig_save: True
# fig.plot_flow('original', True, True, True)
fig.plot_flow('hourly', True, True, True)
fig.plot_flow('daily', fig_show=True)
fig.plot_flow('weekly', fig_show=True)
fig.plot_flow('monthly', fig_show=True)

# Finance and storage investment overview
fig.plot_overview()
# Cost composition
# fig.plot_CS()
#
# # Detailed flow, unit: 'day', 'week'
fig.plot_dv_flow(100, 'day')
fig.plot_dv_flow(15, 'week')
# # Flow overview, 'hourly', 'daily', 'weekly', 'monthly', 'original' flows; 'original' use for model test results
# # 'kaleido' is needed for fig_save: True
# fig.plot_supply('hourly', False, True, False)
# fig.plot_inflow('hourly', False, True, False)
fig.plot_supply('daily', False, True, False)
fig.plot_inflow('daily', False, True, False)
#
# # fig.plot_flow('original', True, True, True)
# # fig.plot_flow('hourly', True, True, True)
# # fig.plot_flow('daily', fig_show=True)
# # fig.plot_flow('weekly', fig_show=True)
# # fig.plot_flow('monthly', fig_show=True)
#
# # Finance and storage investment overview
fig.plot_overview_sep()

show_figs() # show figures
# # fig.plot_overview()

# # Detailed flow, unit: 'day', 'week'
# # fig.plot_dv_flow(100, 'day')
# # fig.plot_dv_flow(15, 'week')
#
# show_figs() # show figures

0 comments on commit ec6c38b

Please sign in to comment.