Class CatsXOR

  • All Implemented Interfaces:
    BiddingLanguage

    public class CatsXOR
    extends java.lang.Object
    implements BiddingLanguage

    The original CATS Regions model has a specific way to generate bids, which does not directly translate into our iterator-based way of generating bids. This class provides an iterator that imitates the original bid-generation technique. To do this, it first collects and filters all possible bids and then provides the iterator on that collection.

    If you prefer to have an iterator that works more like the other iterators in SATS, you can change the behavior of this class via noCapForSubstitutableGoods(). In that case, the first bundle of the provided iterator is the initial bundle which the following elements are based on. The next bundles each have one license of the original bundle as a starting point and are extended so that they have the same amount of licenses as the original bundle. In the CATS Regions model, they are called substitutable bids/bundles.

    Two things to consider when using the option noCapForSubstitutableGoods():
    • If this iterator finds an invalid bundle (identical to the original bundle or not satisfying the budget/ reselling value constraints), it will try to find another one until #MAX_RETRIES is reached. This is rare, but still make sure to handle this #NoSuchElementException.
    • The elements which #next() returns are checked to be not identical to the original bundle, but it's impossible to detect if it's similar to another substitutable bundle. If duplicate substitutable bundles are an issue, make sure to handle after you iterated through all the elements.
    Author:
    Fabio Isler
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      CATSBidder getBidder()
      References back to the SATSBidder instance from whom this Bidding language instance was created.
      java.util.Set<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> getCATSXORBids()  
      java.util.Iterator<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> iterator()  
      CatsXOR noCapForSubstitutableGoods()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • noCapForSubstitutableGoods

        public CatsXOR noCapForSubstitutableGoods()
      • getBidder

        public CATSBidder getBidder()
        Description copied from interface: BiddingLanguage
        References back to the SATSBidder instance from whom this Bidding language instance was created.
        Specified by:
        getBidder in interface BiddingLanguage
      • iterator

        public java.util.Iterator<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> iterator()
        Specified by:
        iterator in interface BiddingLanguage
      • getCATSXORBids

        public java.util.Set<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> getCATSXORBids()