You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For generate_random_traffic_network in generate_network.py, the resulting network has less nodes than n_clients. Is this intentional?
I believe the reason is that when building up edge_labels , the datatype is a set (which makes sense). This means that duplicate edges can't exist. However, when creating the traffic graph, edge_labels is iterated over.
import cyberbattle.simulation.generate_network as gn
import networkx as nx
random_traffic = gn.generate_random_traffic_network(n_clients=10,n_servers={"A":1})
random_traffic.number_of_nodes()
yields 5 nodes for me.
If the above is not the intended behavior, should there really be the sum of the values in the n_servers dict plus n_clients?
So in my above example 10+1 nodes total representing 10 clients and 1 server.
That (10+1 from above) seems to be the behavior in the networkx example of stochastic_block_model (used to create the traffic). Although, that leaves the opportunity for nodes to not be connected to any other nodes.
import networkx as nx
sizes = [10,1]
probs = [[0.25, 0.05], [0.05, 0.35]]
g = nx.stochastic_block_model(sizes, probs, seed=0)
g.number_of_nodes()
yields 11 nodes for me
Please let me know if you need further clarification on my question.
The text was updated successfully, but these errors were encountered:
For generate_random_traffic_network in generate_network.py, the resulting network has less nodes than
n_clients
. Is this intentional?I believe the reason is that when building up
edge_labels
, the datatype is a set (which makes sense). This means that duplicate edges can't exist. However, when creating the traffic graph,edge_labels
is iterated over.yields 5 nodes for me.
If the above is not the intended behavior, should there really be the sum of the values in the
n_servers
dict plusn_clients
?So in my above example 10+1 nodes total representing 10 clients and 1 server.
That (10+1 from above) seems to be the behavior in the networkx example of
stochastic_block_model
(used to create the traffic). Although, that leaves the opportunity for nodes to not be connected to any other nodes.yields 11 nodes for me
Please let me know if you need further clarification on my question.
The text was updated successfully, but these errors were encountered: