shorten

negmas.helpers.shorten(name: str, length: int = 4, common_parts=('Mechanism', 'Negotiator', 'Agent', 'Controller', 'Acceptance', 'Component', 'Model', 'Strategy', 'Offering', 'Entity')) str[source]

Returns a short version of the name.

Remarks:
  • Removes common parts of names in negmas like Negotiator, Agent, etc

  • Keeps Capital letters up to the given length

  • Adds some of the lowercase letters to fit the length

  • If the input is shorter than the length, it is returned as it is