API Reference

Use Case class

UseCase.__init__([name, users])

Creates a UseCase instance for gathering a list of User instances which own Appliance instances

UseCase.add_user(user)

adds new user to the user property list

UseCase.save([filename])

Saves/returns the model databas including all the users and their appliances as a single pd.DataFrame or excel file.

UseCase.export_to_dataframe()

exports the model database to a pd.DataFrame containing all the data related to users and their appliances

UseCase.load(filename)

Open an .xlsx file which was produced via the save method and create instances of Users and Appliances

User class

User.__init__([user_name, num_users, ...])

Creates a User instance (User Category)

User.add_appliance(*args, **kwargs)

adds an appliance to the user category with all the appliance characteristics in a single function

User.save([filename])

Saves/returns the model databas including allappliances as a single pd.DataFrame or excel file.

User.export_to_dataframe()

Saves/returns the model databas including allappliances as a single pd.DataFrame or excel file.

User.Appliance([number, power, num_windows, ...])

Back-compatibility with legacy code

User.generate_single_load_profile(prof_i, ...)

Generates a load profile for a single user taking all its appliances into consideration

User.generate_aggregated_load_profile(...)

Generates an aggregated load profile from single load profile of each user

User.maximum_profile

Aggregate the theoretical maximal profiles of each appliance of the user by switching the appliance always on

Appliance class

Appliance.__init__(user[, number, power, ...])

Creates an appliance for a given user

Appliance.save()

returns a pd.DataFrame containing the appliance data

Appliance.export_to_dataframe()

returns a pd.DataFrame containing the appliance data

Appliance.windows([window_1, window_2, ...])

assings functioning windows to the appliance and adds the appliance to the user class

Appliance.specific_cycle(cycle_num, **kwargs)

assigining specific duty cycle for the appliace (maximum of three cycles can be assigned)

Appliance.specific_cycle_1([p_11, t_11, ...])

assigining the frist specific duty cycle for the appliace (maximum of three cycles can be assigned)

Appliance.specific_cycle_2([p_21, t_21, ...])

assigining the frist specific duty cycle for the appliace (maximum of three cycles can be assigned)

Appliance.specific_cycle_3([p_31, t_31, ...])

assigining the frist specific duty cycle for the appliace (maximum of three cycles can be assigned)

Appliance.cycle_behaviour([cw11, cw12, ...])

_summary_

Appliance.maximum_profile

Virtual maximum load profile of the appliance

Appliance.__eq__(other_appliance)

checks the equality of two appliances


Utilities

yearly_pattern([year])

Definition of a yearly pattern of weekends and weekdays, in case some appliances have specific wd/we behaviour If no argument is provided, the pattern always starts a monday and lasts 365 days, otherwise the pattern matches the weekdays and weekends of the provided year

calc_peak_time_range(user_list[, peak_enlarge])

Calculate the peak time range, which is used to discriminate between off-peak and on-peak coincident switch-on probability Calculate first the overall Peak Window (taking into account all User classes).

load_data(example)

download_example(destination)

Copies the model files from the ramp package to a given path :param destination: The path to copy the model files.