API Reference

Use Case class

UseCase.__init__([name, users, date_start, ...])

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

UseCase.collect_appliances_from_users()

Gather all appliances from a UseCase instance users into self.appliances attribute

UseCase.initialize([num_days, peak_enlarge, ...])

Sets the list of days for which to generate profiles and compute peak time range

UseCase.calc_peak_time_range([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).

UseCase.generate_daily_load_profiles([days, ...])

Iterate over the days and generate a daily profile for each of the days

UseCase.generate_daily_load_profiles_parallel([...])

Generate a daily profile for each of the days in a parallel process

UseCase.date_start

Start date of the daily profiles generated by the UseCase instance

UseCase.date_end

End date of the daily profiles generated by the UseCase instance

UseCase.peak_enlarge

UseCase.num_days

Number of days for which the UseCase instance will be able to generate profiles

UseCase.datetimeindex

Return the datetimeindex of the UseCase and call UseCase.initialize() if it was not set

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 appliance (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

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.

Visualization

Plot.__init__(df[, index])

initializes a Plot object using a pd.DataFrame

Plot.from_file(file[, sheet_name, sep, index])

initializing a Plot object from a file results

Plot.freq

return the frequency of the pd.DatetimeIndex

Plot.columns

returns a list of columns (cases) of the Plot dataframe

Plot.index

Plot.resample(freq, rule[, conversion, inplace])

returns a resampled version of the data

Plot.line([columns, engine])

creating a like plot

Plot.shadow([main_column, columns, average, ...])

creating a shadow plot

Plot.area([columns, engine])

an area plot

Plot.load_duration_curve(column[, engine])

plots the load duration curve

Plot.error(base_column, validated_data)

returns the error

Plot.peak

a dict with all peak hours for each column of the pd.DataFrame

Plot.DataFrame

returns the data of the Plot object

Plot.add_column(var)

adds new column to the data

Plot.loc([index, columns])

loc method to filter the data

Plot.head(var)

returns the top var numbers of data

Plot.plot(**kwargs)

returns a pd.DataFrame.plot object

Plot.to_excel(path)

saves the data into excel

Plot.to_csv(path[, sep])

saves the data into csv

Plot.mean()

returns the mean of the columns

Plot.sum()

returns the sum of the columns