Class SATSBidder

  • All Implemented Interfaces:
    java.io.Serializable, org.marketdesignresearch.mechlib.core.bidder.Bidder, org.marketdesignresearch.mechlib.core.bidder.valuefunction.ValueFunction, org.marketdesignresearch.mechlib.instrumentation.MipInstrumentationable
    Direct Known Subclasses:
    BMBidder, CATSBidder, GSVMBidder, LSVMBidder, MRVMBidder, SRVMBidder

    public abstract class SATSBidder
    extends java.lang.Object
    implements org.marketdesignresearch.mechlib.core.bidder.Bidder, java.io.Serializable
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected SATSBidder​(BidderSetup setup, long population, long id, long worldId)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      abstract java.math.BigDecimal calculateValue​(org.marketdesignresearch.mechlib.core.Bundle bundle)
      Returns the value this bidder has for a specific bundle.
      java.util.List<java.math.BigDecimal> calculateValues​(java.util.List<org.marketdesignresearch.mechlib.core.Bundle> bundles)
      Returns a list of values for a list of bundles, in the same order as the bundles were ordered in the input.
      protected boolean canEqual​(java.lang.Object other)  
      abstract SATSBidder drawSimilarBidder​(RNGSupplier rngSupplier)  
      boolean equals​(java.lang.Object o)  
      java.lang.String getDescription()  
      java.util.UUID getId()  
      long getLongId()  
      org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation getMipInstrumentation()  
      java.lang.String getName()  
      long getPopulation()  
      protected BidderSetup getSetup()  
      java.lang.String getSetupType()  
      java.lang.String getShortDescription()  
      <T extends org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy>
      T
      getStrategy​(java.lang.Class<T> type)  
      java.math.BigDecimal getValue​(org.marketdesignresearch.mechlib.core.Bundle bundle, boolean ignoreAllocationLimits)  
      <T extends BiddingLanguage>
      T
      getValueFunction​(java.lang.Class<T> type)
      Use this method to get a desired value function representation (bidding language) for this bidder.
      <T extends BiddingLanguage>
      T
      getValueFunction​(java.lang.Class<T> type, long seed)
      Use this method to get a desired value function representation (bidding language) for this bidder.
      abstract <T extends BiddingLanguage>
      T
      getValueFunction​(java.lang.Class<T> type, RNGSupplier rngSupplier)  
      abstract World getWorld()  
      long getWorldId()  
      int hashCode()  
      abstract void refreshReference​(World world)
      To prevent from creating too many identical world instances, worlds are not serialized and deserialized with the bidder
      As a temporary solution, the world instance is re-added after deserialization by calling this method.

      This method will be removed in a later version and be done automatically during deserialization.
      void setMipInstrumentation​(org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation mipInstrumentation)  
      void setStrategy​(org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy strategy)  
      protected void store()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface org.marketdesignresearch.mechlib.core.bidder.Bidder

        getAllocationLimit, getBestBundle, getBestBundles, getBestBundles, getUtility, getValue, getValue, getValue
    • Field Detail

      • DEFAULT_DEMAND_QUERY_EPSILON

        protected static final double DEFAULT_DEMAND_QUERY_EPSILON
        See Also:
        Constant Field Values
      • DEFAULT_DEMAND_QUERY_TIME_LIMIT

        protected static final double DEFAULT_DEMAND_QUERY_TIME_LIMIT
        See Also:
        Constant Field Values
    • Constructor Detail

      • SATSBidder

        protected SATSBidder​(BidderSetup setup,
                             long population,
                             long id,
                             long worldId)
    • Method Detail

      • getLongId

        public long getLongId()
      • getId

        public java.util.UUID getId()
        Specified by:
        getId in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getDescription

        public java.lang.String getDescription()
        Specified by:
        getDescription in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • getShortDescription

        public java.lang.String getShortDescription()
        Specified by:
        getShortDescription in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • getSetupType

        public java.lang.String getSetupType()
        Returns:
        the name of the configuration (BidderSetup) (i.e., the 'bidder type') with which the bidder was created.
      • calculateValue

        public abstract java.math.BigDecimal calculateValue​(org.marketdesignresearch.mechlib.core.Bundle bundle)
        Returns the value this bidder has for a specific bundle.
        Parameters:
        bundle - the bundle for which the value is asked
        Returns:
        bidder specific value for this bundle
      • calculateValues

        public java.util.List<java.math.BigDecimal> calculateValues​(java.util.List<org.marketdesignresearch.mechlib.core.Bundle> bundles)
        Returns a list of values for a list of bundles, in the same order as the bundles were ordered in the input.
        Parameters:
        bundles - the bundles for which the value is asked
        Returns:
        a list of bidder specific values for these bundles
      • getValue

        public java.math.BigDecimal getValue​(org.marketdesignresearch.mechlib.core.Bundle bundle,
                                             boolean ignoreAllocationLimits)
        Specified by:
        getValue in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • getValueFunction

        public <T extends BiddingLanguage> T getValueFunction​(java.lang.Class<T> type)
                                                       throws UnsupportedBiddingLanguageException
        Use this method to get a desired value function representation (bidding language) for this bidder. Note that this method may cause your compiler to throw a warning, as the generics of generic Bidding Languages (such as XOR) is not specified in .class.
        Parameters:
        type - the type of the value function
        Returns:
        the value function of this bidder
        Throws:
        UnsupportedBiddingLanguageException - Throws this exception for all bidding languages which are not supported by the implementing bidder class. This javadoc should be extended by the implementing class, specifying which value function representation are supported.
      • getValueFunction

        public <T extends BiddingLanguage> T getValueFunction​(java.lang.Class<T> type,
                                                              long seed)
                                                       throws UnsupportedBiddingLanguageException
        Use this method to get a desired value function representation (bidding language) for this bidder. Note that this method may cause your compiler to throw a warning, as the generics of generic Bidding Languages (such as XOR) is not specified in .class. generic
        Parameters:
        type - the type of the value function
        Returns:
        the value function of this bidder
        Throws:
        UnsupportedBiddingLanguageException - Throws this exception for all bidding languages which are not supported by the implementing bidder class. This javadoc should be extended by the implementing class, specifying which value function representation are supported.
      • getPopulation

        public long getPopulation()
        Returns:
        the population to which this bidder belongs. The population is not meaningful, if for a specific world instance, only one set of Bidders is created. However, if there are multiple sets of bidders (which should not be part of the same simulation) created, they have different population ids.
      • getWorld

        public abstract World getWorld()
        Returns:
        World to which this bidder belongs. The implementing Bidder class, overriding this method, should return a world type corresponding to the specific model.
      • store

        protected void store()
      • refreshReference

        public abstract void refreshReference​(World world)
        To prevent from creating too many identical world instances, worlds are not serialized and deserialized with the bidder
        As a temporary solution, the world instance is re-added after deserialization by calling this method.

        This method will be removed in a later version and be done automatically during deserialization.
      • getWorldId

        public long getWorldId()
      • setStrategy

        public void setStrategy​(org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy strategy)
        Specified by:
        setStrategy in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • getStrategy

        public <T extends org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy> T getStrategy​(java.lang.Class<T> type)
        Specified by:
        getStrategy in interface org.marketdesignresearch.mechlib.core.bidder.Bidder
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getMipInstrumentation

        public org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation getMipInstrumentation()
        Specified by:
        getMipInstrumentation in interface org.marketdesignresearch.mechlib.instrumentation.MipInstrumentationable
      • setMipInstrumentation

        public void setMipInstrumentation​(org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation mipInstrumentation)
        Specified by:
        setMipInstrumentation in interface org.marketdesignresearch.mechlib.instrumentation.MipInstrumentationable