AdvancedParams
1# coding: utf-8 2 3 4class AdvancedParams(object): 5 def __init__(self): 6 self.number_of_cores = 12 7 self.minimum_iteration = 5 8 self.network_sim = False 9 10 def set_number_of_cores(self, num_cores): 11 self.number_of_cores = num_cores 12 13 def init_advanced_params_from_json(self, json_object): 14 self.number_of_cores = json_object["Advanced"]["number_of_cores"] 15 self.minimum_iteration = json_object["Advanced"]["minimum_iteration"] 16 self.network_sim = json_object["Advanced"]["network_sim"] 17 return self 18 19 def to_json_object(self): 20 json_object = {"number_of_cores": self.number_of_cores, 21 "minimum_iteration": self.minimum_iteration, 22 "network_sim": self.network_sim} 23 return json_object
class
AdvancedParams:
5class AdvancedParams(object): 6 def __init__(self): 7 self.number_of_cores = 12 8 self.minimum_iteration = 5 9 self.network_sim = False 10 11 def set_number_of_cores(self, num_cores): 12 self.number_of_cores = num_cores 13 14 def init_advanced_params_from_json(self, json_object): 15 self.number_of_cores = json_object["Advanced"]["number_of_cores"] 16 self.minimum_iteration = json_object["Advanced"]["minimum_iteration"] 17 self.network_sim = json_object["Advanced"]["network_sim"] 18 return self 19 20 def to_json_object(self): 21 json_object = {"number_of_cores": self.number_of_cores, 22 "minimum_iteration": self.minimum_iteration, 23 "network_sim": self.network_sim} 24 return json_object