if i want to simulate my network like this picture but Bipartite = 4 and increase my nodes to 600 node (n=150 l =150 s=150 and m=150) and also have 685 edges randomly...how can write simulation coding to make this network? can anyone help me ? enter code here
thank you so much for your attention
also this picture coding here
import networkx as nx
import matplotlib.pyplot as plt
import random
from networkx.algorithms import bipartite
B = nx.Graph()
n = [1,2,3,4]
l = [*'abc']
B.add_nodes_from(n, bipartite=0)
B.add_nodes_from(l, bipartite=1)
B.add_edges_from([(1, "a"), (1, "b"), (2, "b"), (2, "c"), (3, "c"), (4, "a")])
pos = dict()
pos.update( (n, (1, i)) for i, n in enumerate(n) )
pos.update( (n, (2, i)) for i, n in enumerate(l) )
nx.draw_networkx(B, pos=pos)
nx.draw_networkx_nodes(B, pos=pos, nodelist=n)
plt.axis('off')
plt.show()