grape.fault_diagnosis.FaultDiagnosis.fitness_iteration_parallel¶
-
FaultDiagnosis.
fitness_iteration_parallel
(out_queue, ichunk, chunk_length, individuals, perturbed_nodes, initial_condition)[source]¶ Parallel iteration for fitness evaluation. We append to the multiprocessing queue a tuple constituted by constituted by the index of the individual, the individual itself, and its fitness.
- Parameters
out_queue (multiprocessing.queues.Queue) – multiprocessing queue
ichunk (int) – index of the chunk under consideration.
chunk_length (int) – lengths of the chunks (the last chunk may be shorter due to non-even division of the number of generations by the number of processors).
individuals (list) – list of individuals on which to perform fitness evaluation.
perturbed_nodes (list) – nodes(s) involved in the perturbing event.
initial_condition (dict) – initial status (boolean) for the graph switches.