6 PHM Robot Task Completion Class 11 from phm_reliability_calculation.class_reliability_calculation
import ReliabilityCalculation
16 Actual POTC Calculation Class 18 def __init__(self, selected_reliability_model, selected_reliability_unit, shape_parameter):
37 Calculation POTC Function 39 potc_result = float(pow(float(reliability), float(distance)))
46 Distance calculation function between 2 points 48 distance_result = float(math.sqrt(abs(pow((float(finish_position[0]) - float(start_position[0])), 2) + pow((float(finish_position[1]) - float(start_position[1])), 2))))
50 return distance_result
55 Function of calculating distances in a mission 58 distance_list = list()
60 for goal
in range(len(goals) - 1):
68 POTC Value Calculation Function 75 potc_calculate_list = list()
76 potc_calculate_list.append([0, 1])
79 for path
in path_calculate_list:
80 temp_task_time = time_list[counter]
87 calculate_distance = path
92 potc_calculate_list.append([counter+1, potc])
101 Predict POTC Calculation Class 103 def __init__(self, hazard_rate, reliability, selected_reliability_model, selected_reliability_unit, shape_parameter):
120 Time Calculation Function 123 time = float(distance / speed)
130 Function of calculating times in a mission 135 for path
in path_list:
137 time_list.append(calculated_time)
145 Split incoming robot tasks into position list and time list 147 position_list = list()
151 for item
in robot_task_list:
152 position_list.append([item[0], item[1]])
153 speed_list.append(item[2])
158 return position_list, time_list
165 Calculation POTC Function 167 potc_result = float(pow(float(reliability), float(distance)))
174 Distance calculation function between 2 points 176 distance_result = float(math.sqrt(abs(pow((float(finish_position[0]) - float(start_position[0])), 2) + pow((float(finish_position[1]) - float(start_position[1])), 2))))
178 return distance_result
183 Function of calculating distances in a mission 185 goals = task_position_list
186 distance_list = list()
188 for goal
in range(len(goals) - 1):
196 POTC Reliability Value Calculation Function 209 POTC Value Calculation Function 214 for task_position
in task_position_list:
219 self.
main_dict[str(float(calculate_reliability_dict[
"Total Time"]))][
"potc"] = current_potc_result
220 last_potc = current_potc_result
240 Get POTC values as many as the number of simulations 242 Potc list = [Simulation Count, POTC Value] 246 potc_calculate_list = list()
247 potc_calculate_list.append([0, 1])
249 for count
in range(int(simulation_count)):
251 potc_calculate_list.append([count+1, potc])
253 return potc_calculate_list
def __init__(self, selected_reliability_model, selected_reliability_unit, shape_parameter)
selected_reliability_model
def distance_calculate(cls, start_position, finish_position)
def calculate_potc_func(self, time_list, task_position_list)
def path_calculate(self, task_position_list)
def probability_of_task_completion_formula(cls, reliability, distance)
def calculate_time_func(cls, distance, speed)
def prognostic_calculate_potc_func(self, simulation_count, time_list, task_position_list)
selected_reliability_unit
def probability_of_task_completion_formula(cls, reliability, distance)
def distance_calculate(cls, start_position, finish_position)
selected_reliability_unit
def prognostic_calculate_last_potc_func(self, time_list, task_position_list)
def probability_of_task_completion_calculate_func(self, time_list, task_position, hazard_rate, reliability)
def calculate_time_list_func(self, path_list, speed_list)
def path_calculate(self, task_position)
def calculate_potc_reliability_func(self, time)
selected_reliability_model
def __init__(self, hazard_rate, reliability, selected_reliability_model, selected_reliability_unit, shape_parameter)
def split_robot_task_list_func(self, robot_task_list)