XmlSerializableUFun

class negmas.preferences.XmlSerializableUFun(*args, **kwargs)[source]

Bases: Protocol

Can 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

classmethod from_genius(issues: list[Issue], file_name: PathLike, **kwargs) X[source]
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_str for all the parameters

abstractmethod to_xml_str(**kwargs) str[source]

Exports a utility function to a well formatted string

abstractmethod xml(issues: list[Issue]) str[source]