XmlSerializableUFun

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

Bases: negmas.protocols.XmlSerializable, Protocol

Can be serialized to XML format (compatible with GENIUS)

Methods Summary

from_genius(issues, file_name, **kwargs)

Imports a utility function from a GENIUS XML file.

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]

Imports a utility function from a GENIUS XML file.

Parameters

file_name (str) – File name to import from

Return type

TypeVar(X, bound= XmlSerializable)

Returns

A utility function object (depending on the input file)

abstract classmethod from_xml_str(xml_str, **kwargs)

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)

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

to_xml_str(**kwargs)

Exports a utility function to a well formatted string

Return type

str

abstract xml(issues)[source]
Return type

str