def xml(self):
"""
This function writes the individual to an xml format.
Returns
----------
xml individual : str
The xml string of the individual.
"""
doc = Document()
if self.live:
status = "true"
else:
status = "false"
xml_doc = analyse_xml.create_xml_individual(doc, self.id, self.generation, status, self.genotype, self.derivedparams, self.scores)
return xml_doc.toxml()
评论列表
文章目录