Skip to content

Commit

Permalink
Adapt input files
Browse files Browse the repository at this point in the history
With this addition the input files can be run and the results vizualized
  • Loading branch information
Bachibouzouk committed Nov 17, 2023
1 parent 0e1c7c3 commit aeca596
Show file tree
Hide file tree
Showing 3 changed files with 86 additions and 0 deletions.
28 changes: 28 additions & 0 deletions ramp/example/input_file_1.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,3 +254,31 @@

S_Stereo = School.Appliance(1, 150, 2, 90, 0.1, 5, occasional_use=0.33)
S_Stereo.windows([510, 750], [810, 1080], 0.35)

if __name__ == "__main__":
from ramp.core.core import UseCase

uc = UseCase(
users=User_list,
parallel_processing=False,
)
uc.initialize(peak_enlarge=0.15)

Profiles_list = uc.generate_daily_load_profiles()

# post-processing
from ramp.post_process import post_process as pp

Profiles_avg, Profiles_list_kW, Profiles_series = pp.Profile_formatting(
Profiles_list
)
pp.Profile_series_plot(
Profiles_series
) # by default, profiles are plotted as a series
if (
len(Profiles_list) > 1
): # if more than one daily profile is generated, also cloud plots are shown
pp.Profile_cloud_plot(Profiles_list, Profiles_avg)

# this would be a new method using work of @mohammadamint
# results = uc.export_results()
29 changes: 29 additions & 0 deletions ramp/example/input_file_2.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,32 @@
# High-Income
HH_shower = HH.Appliance(1, HH_shower_P, 2, 15, 0.1, 3, thermal_P_var=0.2)
HH_shower.windows([390, 540], [1080, 1200], 0.2)


if __name__ == "__main__":
from ramp.core.core import UseCase

uc = UseCase(
users=User_list,
parallel_processing=False,
)
uc.initialize(peak_enlarge=0.15)

Profiles_list = uc.generate_daily_load_profiles()

# post-processing
from ramp.post_process import post_process as pp

Profiles_avg, Profiles_list_kW, Profiles_series = pp.Profile_formatting(
Profiles_list
)
pp.Profile_series_plot(
Profiles_series
) # by default, profiles are plotted as a series
if (
len(Profiles_list) > 1
): # if more than one daily profile is generated, also cloud plots are shown
pp.Profile_cloud_plot(Profiles_list, Profiles_avg)

# this would be a new method using work of @mohammadamint
# results = uc.export_results()
29 changes: 29 additions & 0 deletions ramp/example/input_file_3.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,32 @@

HH_mate = HH.Appliance(1, 1800, 1, 30, 0.3, 2, thermal_P_var=0.2, pref_index=0)
HH_mate.windows([7 * 60, 20 * 60], [0, 0], 0.15)


if __name__ == "__main__":
from ramp.core.core import UseCase

uc = UseCase(
users=User_list,
parallel_processing=False,
)
uc.initialize(peak_enlarge=0.15)

Profiles_list = uc.generate_daily_load_profiles()

# post-processing
from ramp.post_process import post_process as pp

Profiles_avg, Profiles_list_kW, Profiles_series = pp.Profile_formatting(
Profiles_list
)
pp.Profile_series_plot(
Profiles_series
) # by default, profiles are plotted as a series
if (
len(Profiles_list) > 1
): # if more than one daily profile is generated, also cloud plots are shown
pp.Profile_cloud_plot(Profiles_list, Profiles_avg)

# this would be a new method using work of @mohammadamint
# results = uc.export_results()

0 comments on commit aeca596

Please sign in to comment.