Rational

class negmas.common.Rational(name: str = None, ufun: Optional[UtilityFunction] = None, id: str = None)[source]

Bases: negmas.common.NamedObject

A rational object is an object that can have a utility function.

Parameters
  • name – Object name. Used for printing and logging but not internally by the system

  • ufun – An optional utility function to attach to the object

Attributes Summary

has_ufun

Does the entity has an associated ufun?

reserved_value

Reserved value is what the entity gets if no agreement is reached in the negotiation.

ufun

An alias to utility_function

utility_function

The utility function attached to that object

Methods Summary

on_ufun_changed()

Called to inform the entity that its ufun has changed.

Attributes Documentation

has_ufun

Does the entity has an associated ufun?

reserved_value

Reserved value is what the entity gets if no agreement is reached in the negotiation.

The reserved value can either be explicity defined for the ufun or it can be the output of the ufun for None outcome.

ufun

An alias to utility_function

utility_function

The utility function attached to that object

Methods Documentation

on_ufun_changed()[source]

Called to inform the entity that its ufun has changed.

Remarks:

  • You MUST call the super() version of this function either before or after your code when you are overriding it.