def gen_from_xmlstring(): """Generate BT graph from xml string.""" dname = '/home/aadeshnpn/Documents/BYU/hcmi/hri/supporting_materials/nest_maintenance' # noqa: E501 xmlstring = '' m = Model() a = Agent('1', m) bt = BTConstruct(None, a, xmlstring) bt.construct() bt.visualize(name=dname + '/' + str(90))
def main(): """Parse args and call bt visualize module.""" # dname = '/home/aadeshnpn/Documents/BYU/hcmi/hri/supporting_materials/nest_maintenance' # noqa: E501 # jfname = dname + '/1539014820252.json' # dname = '/home/aadeshnpn/Documents/BYU/hcmi/hri/supporting_materials/cooperative_transport' # noqa: E501 # jfname = dname + '/1538447335350.json' dname = '/home/aadeshnpn/Documents/BYU/hcmi/hri/supporting_materials/foraging' # noqa: E501 jfname = dname + '/1538473090382007.json' jdata = JsonPhenotypeData.load_json_file(jfname) phenotypes = jdata['phenotypes'] for i in range(len(phenotypes)): # if i >= 5: # break m = Model() a = Agent('1', m) bt = BTConstruct(None, a, phenotypes[i]) bt.construct() bt.visualize(name=dname + '/' + str(i))