Paths

This tutorial demonstrates how paths through the killweb can be extracted from MIMIK.

[1]:
import os
%matplotlib widget

from mimik.killweb import Killweb

Load and display the simple killweb.

[2]:
# config filename
config_filename = "simple_killweb.json"
configs_pth = os.path.join('configs', config_filename)

killweb = Killweb(config_file=configs_pth, silent=True)
killweb.create_component_networkx_visualization();

All viables paths through the killweb can be printed or exported to a list.

[3]:
killweb.print_all_paths_in_killweb()
Find1, Fix1, Track1
Find1, Fix2, Track1
Find1, Fix1, Track2
Find1, Fix2, Track2
Find2, Fix1, Track1
Find2, Fix2, Track1
Find2, Fix1, Track2
Find2, Fix2, Track2

There are 8 paths through the killweb
[4]:
paths = killweb.get_all_paths_in_killweb()
print(paths)
[['Find1', 'Fix1', 'Track1'], ['Find1', 'Fix2', 'Track1'], ['Find1', 'Fix1', 'Track2'], ['Find1', 'Fix2', 'Track2'], ['Find2', 'Fix1', 'Track1'], ['Find2', 'Fix2', 'Track1'], ['Find2', 'Fix1', 'Track2'], ['Find2', 'Fix2', 'Track2']]