mirror of
https://github.com/gsi-upm/soil
synced 2024-11-25 04:12:29 +00:00
Cambios menores
This commit is contained in:
parent
0991696241
commit
967451e2d5
13
models.py
13
models.py
@ -11,23 +11,10 @@ import settings
|
|||||||
|
|
||||||
settings.init()
|
settings.init()
|
||||||
|
|
||||||
####################
|
|
||||||
# Network creation #
|
|
||||||
####################
|
|
||||||
|
|
||||||
if settings.network_type == 0:
|
|
||||||
G = nx.complete_graph(settings.number_of_nodes)
|
|
||||||
if settings.network_type == 1:
|
|
||||||
G = nx.barabasi_albert_graph(settings.number_of_nodes,3)
|
|
||||||
if settings.network_type == 2:
|
|
||||||
G = nx.margulis_gabber_galil_graph(settings.number_of_nodes, None)
|
|
||||||
# More types of networks can be added here
|
|
||||||
|
|
||||||
##############################
|
##############################
|
||||||
# Variables initializitation #
|
# Variables initializitation #
|
||||||
##############################
|
##############################
|
||||||
def init():
|
def init():
|
||||||
|
|
||||||
global networkStatus
|
global networkStatus
|
||||||
networkStatus={} # Dict that will contain the status of every agent in the network
|
networkStatus={} # Dict that will contain the status of every agent in the network
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user