Class CatsXOR
- java.lang.Object
-
- org.spectrumauctions.sats.core.bidlang.xor.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
Two things to consider when using the optionnoCapForSubstitutableGoods(). 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.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
-
-
Constructor Summary
Constructors Constructor Description CatsXOR(java.util.Collection<CATSLicense> goods, RNGSupplier rngSupplier, CATSBidder bidder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CATSBiddergetBidder()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()CatsXORnoCapForSubstitutableGoods()
-
-
-
Constructor Detail
-
CatsXOR
public CatsXOR(java.util.Collection<CATSLicense> goods, RNGSupplier rngSupplier, CATSBidder bidder)
-
-
Method Detail
-
noCapForSubstitutableGoods
public CatsXOR noCapForSubstitutableGoods()
-
getBidder
public CATSBidder getBidder()
Description copied from interface:BiddingLanguageReferences back to the SATSBidder instance from whom this Bidding language instance was created.- Specified by:
getBidderin interfaceBiddingLanguage
-
iterator
public java.util.Iterator<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> iterator()
- Specified by:
iteratorin interfaceBiddingLanguage
-
getCATSXORBids
public java.util.Set<org.marketdesignresearch.mechlib.core.bidder.valuefunction.BundleValue> getCATSXORBids()
-
-