From 505e4aae9a3edc61be746326a00b529fac29b784 Mon Sep 17 00:00:00 2001 From: "pierre-francois.duc" Date: Tue, 14 May 2024 00:39:05 +0200 Subject: [PATCH] Explicit the arguments in methods the example files Do this only for the first occurence as there are many appliances and users in examples 1 and 3 --- ramp/example/input_file_1.py | 6 +++--- ramp/example/input_file_2.py | 8 +++----- ramp/example/input_file_3.py | 10 +++++----- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/ramp/example/input_file_1.py b/ramp/example/input_file_1.py index ae1179f4..9d83c176 100644 --- a/ramp/example/input_file_1.py +++ b/ramp/example/input_file_1.py @@ -19,7 +19,7 @@ """ # Create new user classes -HI = User("high income", 11, 3) +HI = User(user_name="high income", num_users=11, user_preference=3) User_list.append(HI) HMI = User("higher middle income", 38, 3) @@ -46,8 +46,8 @@ # Create new appliances # Church -Ch_indoor_bulb = Church.add_appliance(10, 26, 1, 210, 0.2, 60, "yes", flat="yes") -Ch_indoor_bulb.windows([1200, 1440], [0, 0], 0.1) +Ch_indoor_bulb = Church.add_appliance(number=10, power=26, num_windows=1, func_time=210, time_fraction_random_variability=0.2, func_cycle=60, fixed="yes", flat="yes") +Ch_indoor_bulb.windows(window_1=[1200, 1440], window_2=[0, 0], random_var_w=0.1) Ch_outdoor_bulb = Church.add_appliance(7, 26, 1, 150, 0.2, 60, "yes", flat="yes") Ch_outdoor_bulb.windows([1200, 1440], [0, 0], 0.1) diff --git a/ramp/example/input_file_2.py b/ramp/example/input_file_2.py index 36142f8b..83878573 100644 --- a/ramp/example/input_file_2.py +++ b/ramp/example/input_file_2.py @@ -18,14 +18,12 @@ """ # Create new user classes -HH = User("generic households", 1) +HH = User(user_name="generic households", num_users=1) User_list.append(HH) HH_shower_P = pd.read_csv("ramp/example/shower_P.csv") - -# High-Income -HH_shower = HH.add_appliance(1, HH_shower_P, 2, 15, 0.1, 3, thermal_p_var=0.2) -HH_shower.windows([390, 540], [1080, 1200], 0.2) +HH_shower = HH.add_appliance(number=1, power=HH_shower_P, num_windows=2, func_time=15, time_fraction_random_variability=0.1, func_cycle=3, thermal_p_var=0.2) +HH_shower.windows(window_1=[390, 540], window_2=[1080, 1200], random_var_w=0.2) if __name__ == "__main__": diff --git a/ramp/example/input_file_3.py b/ramp/example/input_file_3.py index 51dc482f..74441eaf 100644 --- a/ramp/example/input_file_3.py +++ b/ramp/example/input_file_3.py @@ -17,7 +17,7 @@ """ # Create new user classes -HH = User("generic household", 1, 3) +HH = User(user_name="generic household", num_users=1, user_preference=3) User_list.append(HH) # Create new appliances @@ -25,11 +25,11 @@ # Create Cooking appliances HH_lunch1_soup = HH.add_appliance( - 1, 1800, 2, 70, 0.15, 60, thermal_p_var=0.2, pref_index=1, fixed_cycle=1 + number=1, power=1800, num_windows=2, func_time=70, time_fraction_random_variability=0.15, func_cycle=60, thermal_p_var=0.2, pref_index=1, fixed_cycle=1 ) -HH_lunch1_soup.windows([12 * 60, 15 * 60], [0, 0], 0.15) -HH_lunch1_soup.specific_cycle_1(1800, 10, 750, 60, 0.15) -HH_lunch1_soup.cycle_behaviour([12 * 60, 15 * 60], [0, 0]) +HH_lunch1_soup.windows(window_1=[12 * 60, 15 * 60], window_2=[0, 0], random_var_w=0.15) +HH_lunch1_soup.specific_cycle_1(p_11=1800, t_11=10, p_12=750, t_12=60, r_c1=0.15) +HH_lunch1_soup.cycle_behaviour(cw11=[12 * 60, 15 * 60], cw12=[0, 0]) HH_lunch2_rice = HH.add_appliance( 1, 1800, 2, 25, 0.15, 20, thermal_p_var=0.2, pref_index=2, fixed_cycle=1