grape.fault_diagnosis.FaultDiagnosis

class FaultDiagnosis(filename, parallel=False)[source]

Class FaultDiagnosis.

Perturbation of a GeneralGraph object. Perturbation can be simulated on a list of elements. From one element, the perturbation propagates in all directions, unless an isolating element is present.

Create an input graph, with the structure contained in the input file.

Parameters
  • filename (str) – input file in CSV format.

  • parallel (bool, optional) – flag for parallel graph creation, default to False.

__init__(filename, parallel=False)[source]

Create an input graph, with the structure contained in the input file.

Parameters
  • filename (str) – input file in CSV format.

  • parallel (bool, optional) – flag for parallel graph creation, default to False.

Methods

__init__(filename[, parallel])

Create an input graph, with the structure contained in the input file.

apply_perturbation(perturbed_nodes, params, …)

Perturbation simulator, actually applying the perturbation to all the nodes.

check_input_with_gephi()

Write list of nodes and list of edges CSV format files, to visualize the input with Gephi.

check_paths_and_measures([prefix])

Describe the topology of the graph.

delete_a_node(node)

Delete a node in the graph.

fitness_evaluation(individual, …)

Evaluation of fitness on individual.

fitness_evaluation_parallel(pop, …)

Wrapper for fitness evaluation.

fitness_iteration_parallel(out_queue, …)

Parallel iteration for fitness evaluation.

graph_characterization_to_file(filename)

Write to file graph characterization after the perturbation.

optimizer(perturbed_nodes, …)

Genetic algorithm to optimize switches conditions, using DEAP.

rm_nodes(node, graph[, visited, broken_nodes])

Remove nodes from the graph in a depth first search way to propagate the perturbation.

FaultDiagnosis.simulate_area_perturbation

simulate_element_perturbation(perturbed_nodes)

Simulate a perturbation of one or multiple nodes.

update_output(attribute_list[, prefix])

Update columns output DataFrame with attributes in attribute_list.

FaultDiagnosis.update_status_areas