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)

rtype:

TypeVar(X, bound= XmlSerializable)

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)

rtype:

str

Methods Documentation

classmethod from_genius(issues, file_name, **kwargs)[source]
Return type:

TypeVar(X, bound= XmlSerializable)

abstract classmethod from_xml_str(xml_str, **kwargs)[source]

Imports a utility function from a GENIUS XML string.

Parameters:

xml_str (str) – The string containing GENIUS style XML utility function definition

Return type:

TypeVar(X, bound= XmlSerializable)

Returns:

A utility function object (depending on the input file)

to_genius(file_name, **kwargs)[source]

Exports a utility function to a GENIUS XML file.

Parameters:

file_name (str) – File name to export to

Return type:

None

Returns:

None

Remarks:

See to_xml_str for all the parameters

abstract to_xml_str(**kwargs)[source]

Exports a utility function to a well formatted string

Return type:

str

abstract xml(issues)[source]
Return type:

str