Commit 5a41f15f authored by Jaber Ibne Mahboob's avatar Jaber Ibne Mahboob
Browse files

Minor update

Minor update
parent eb009b3e
......@@ -129,8 +129,8 @@ class hpp_reliability(object):
def plot_availability_ts(self, component_name, availability_df):
ts_indices = availability_df.index
plt.figure(figsize=(15,12)) # Make the figure
plt.title(f'Availability of {component_name}')
plt.plot(ts_indices, availability_df, label="Availability")
plt.title(f'Availability of {component_name} for sampling-constant: {self.sampling_const_of_current_component}')
plt.plot(ts_indices, availability_df, label="Availability of {component_name}")
plt.legend()
plt.show() # Show the figure
......@@ -164,7 +164,7 @@ class hpp_reliability(object):
npdata = availability_df.to_numpy() # convert the data into numpy array
moving_avg = self.moving_average(npdata,interval_in_hrs) # get the moving average
plt.figure(figsize=(15,12)) # make a plot to show moving average
plt.title(f'{interval_in_months} months period moving average of the availability of {component_name}')
plt.title(f'{interval_in_months} months moving average of the availability of {component_name} for sampling-constant: {self.sampling_const_of_current_component}')
plt.plot(
ts_indices[(interval_in_hrs-1):len(ts_indices)],
moving_avg,
......@@ -188,6 +188,7 @@ class hpp_reliability(object):
availability_df: dataframe of the availability of all components in this units
"""
def availability_ts(self, pdf_list, N_components, seed, ts_indices, sampling_const, component_name):
self.sampling_const_of_current_component = sampling_const # to display the value in plot later
N_ts = len(ts_indices) # get the length of time series
pdf_TTF_plant = cp.Iid(pdf_list["pdf_TTF"], N_components) # get pdf of TTF & TTR of all components using Independent identical distributed vector of random variables
pdf_TTR_plant = cp.Iid(pdf_list["pdf_TTR"], N_components)
......
......@@ -17,15 +17,15 @@ if __name__ == "__main__":
params_default_av = { # default reliability parameters
"master_seed": 14,
"sampling_ts":{"start":'2016-01-01 00:00', "end":'2035-12-31 23:00'},
#"resulting_ts":{"start":'2016-01-01 00:00', "end":'2035-12-31 23:00'},
"resulting_ts":{"start":'2018-09-01 00:00', "end":'2019-08-31 23:00'},
"resulting_ts":{"start":'2016-01-01 00:00', "end":'2035-12-31 23:00'},
#"resulting_ts":{"start":'2018-09-01 00:00', "end":'2019-08-31 23:00'},
"timeFormat_availability" : '%d/%m/%Y %H:%M',
"data_directory":'Data/'
}
params_components_av = { # reliability parameters for each component type
"WT":{"MTTF": 1.10e4, "MTTR": 1.10e2, "N_components": 120, "N_units": 1, "sampling_const": 150},
"PV":{"MTTF": 3.53e4, "MTTR": 2.18e3, "N_components": 166, "N_units": 1, "sampling_const": 1300},
"inverter":{"MTTF": 3.01e4, "MTTR": 7.20e2, "N_components": 400, "N_units": 1, "sampling_const": 300},
#"WT":{"MTTF": 1.10e4, "MTTR": 1.10e2, "N_components": 120, "N_units": 1, "sampling_const": 150},
"PV":{"MTTF": 3.53e4, "MTTR": 2.18e3, "N_components": 166, "N_units": 400, "sampling_const": 1300},
#"inverter":{"MTTF": 3.01e4, "MTTR": 7.20e2, "N_components": 400, "N_units": 1, "sampling_const": 300},
#"BESS":{"MTTF": 7.09e4, "MTTR": 1.68e2, "N_components": 10, "N_units": 1, "sampling_const": 2200} # taking only BESS_6
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment