grape.fault_diagnosis.FaultDiagnosis.simulate_element_perturbation

FaultDiagnosis.simulate_element_perturbation(perturbed_nodes, params={'indpb': 0.6, 'ngen': 100, 'npop': 300, 'nsel': 5, 'tresh': 0.5}, weights={'w1': 1.0, 'w2': -1.0, 'w3': -1.0, 'w4': -1.0, 'w5': 2.0}, parallel=False, verbose=True)[source]

Simulate a perturbation of one or multiple nodes.

Parameters
  • perturbed_nodes (list) – nodes(s) involved in the perturbing event.

  • params (dict, optional) – values for the optimizer evolutionary algorithm. Dict of: {str: int, str: int, str: float, str: float, str: int}: - ‘npop’: number of individuals for each population (default to 300) - ‘ngen’: total number of generations (default to 100) - ‘indpb’: independent probability for attributes to be changed (default to 0.6) - ‘tresh’: threshold for applying crossover/mutation (default to 0.5) - ‘nsel’: number of individuals to select (default to 5)

  • weights (dict, optional) –

    weights for fitness evaluation on individuals. Dict of: {str: float, str: float, str: float}: - ‘w1’: weight multiplying number of switch flips (default to 1.0) - ‘w2’: weight multiplying total final service (default to -1.0) - ‘w3’: weight multiplying final graph size (default to -1.0) - ‘w4’: weight multiplying number of users with non-zero service

    (default to -1.0)

    • ’w5’: weight for service balance over users (default to 2.0)

  • parallel (bool, optional) – flag for parallel fitness evaluation of initial population, default to False.

  • verbose (bool, optional different kinds of perturbations, default to None.) – flag for verbose output, default to True.

Note

A perturbation, depending on the considered system, may spread in all directions starting from the damaged component(s) and may be affect nearby elements.

Raises

SystemExit