Source code for scml.scml2020.agents.bcse

from negmas import LinearUtilityFunction

from .indneg import IndependentNegotiationsAgent
from .indneg import MarketAwareIndependentNegotiationsAgent

__all__ = ["BuyCheapSellExpensiveAgent", "MarketAwareBuyCheapSellExpensiveAgent"]


[docs]class BuyCheapSellExpensiveAgent(IndependentNegotiationsAgent): """An agent that tries to buy cheap and sell expensive but does not care about production scheduling."""
[docs] def create_ufun(self, is_seller: bool, issues=None, outcomes=None): if is_seller: return LinearUtilityFunction((1, 1, 10), issues=issues, outcomes=outcomes) return LinearUtilityFunction((1, -1, -10), issues=issues, outcomes=outcomes)
[docs]class MarketAwareBuyCheapSellExpensiveAgent( MarketAwareIndependentNegotiationsAgent, BuyCheapSellExpensiveAgent ): """An agent that tries to buy cheap and sell expensive but does not care about production scheduling."""