XmlSerializableUFun
- class negmas.preferences.XmlSerializableUFun(*args, **kwargs)[source]
Bases:
ProtocolCan be serialized to XML format (compatible with GENIUS)
Methods Summary
from_genius(issues, file_name, **kwargs)from_xml_str(xml_str, **kwargs)Imports a utility function from a GENIUS XML string.
to_genius(file_name, **kwargs)Exports a utility function to a GENIUS XML file.
to_xml_str(**kwargs)Exports a utility function to a well formatted string
xml(issues)Methods Documentation
- abstractmethod classmethod from_xml_str(xml_str: str, **kwargs) X[source]
Imports a utility function from a GENIUS XML string.
- Parameters:
xml_str (str) – The string containing GENIUS style XML utility function definition
- Returns:
A utility function object (depending on the input file)
- to_genius(file_name: PathLike, **kwargs) None[source]
Exports a utility function to a GENIUS XML file.
- Parameters:
file_name (str) – File name to export to
- Returns:
None
- Remarks:
See
to_xml_strfor all the parameters