예제 #1
0
파일: main.py 프로젝트: juliacamps/CN
    conf_name += "RIV_"


#Loading Data
data_content = data.read_dataset(season_sep=season_sep)
data_model = History()
data_model.build(seasons_content=data_content,seasons_ids=seasons_evaluated)

#Building the model
temporal_network = {}
temporal_network_kh = {}
temporal_network_riv = {}
for i in range(0,len(seasons_evaluated),1):
    season = seasons_evaluated[i]
    network_name = r"Network_of_season_" + str(season)# + conf_name
    current_data = data_model.getSeason(season)
    G = nx.DiGraph(season=season)
    G_kh = nx.DiGraph(season=season)
    G_riv = nx.DiGraph(season=season)
    current_crews = current_data.getCrews()
    current_actuations = current_data.getActuations()
    for crew in current_crews.items():
        G.add_node(crew[0],crew=crew[1],color=[1,1,0])
        G_kh.add_node(crew[0], crew=crew[1], color=[1, 1, 0])
        G_riv.add_node(crew[0], crew=crew[1], color=[1, 1, 0])

    for item in current_actuations.items():
        actuation = item[1]
        participants = actuation.getParticipants()
        for participant_1 in participants:
            for participant_2 in participants: