Class SATSBidder
- java.lang.Object
-
- org.spectrumauctions.sats.core.model.SATSBidder
-
- All Implemented Interfaces:
java.io.Serializable,org.marketdesignresearch.mechlib.core.bidder.Bidder,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
-
-
Field Summary
Fields Modifier and Type Field Description protected static doubleDEFAULT_DEMAND_QUERY_EPSILONprotected static doubleDEFAULT_DEMAND_QUERY_TIME_LIMIT
-
Constructor Summary
Constructors Modifier Constructor Description protectedSATSBidder(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.BigDecimalcalculateValue(org.marketdesignresearch.mechlib.core.Bundle bundle)Returns the value this bidder has for a specific bundle.protected booleancanEqual(java.lang.Object other)abstract SATSBidderdrawSimilarBidder(RNGSupplier rngSupplier)booleanequals(java.lang.Object o)java.lang.StringgetDescription()java.util.UUIDgetId()longgetLongId()org.marketdesignresearch.mechlib.instrumentation.MipInstrumentationgetMipInstrumentation()java.lang.StringgetName()longgetPopulation()protected BidderSetupgetSetup()java.lang.StringgetSetupType()java.lang.StringgetShortDescription()<T extends org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy>
TgetStrategy(java.lang.Class<T> type)java.math.BigDecimalgetValue(org.marketdesignresearch.mechlib.core.Bundle bundle, boolean ignoreAllocationLimits)<T extends BiddingLanguage>
TgetValueFunction(java.lang.Class<T> type)Use this method to get a desired value function representation (bidding language) for this bidder.<T extends BiddingLanguage>
TgetValueFunction(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>
TgetValueFunction(java.lang.Class<T> type, RNGSupplier rngSupplier)abstract WorldgetWorld()longgetWorldId()inthashCode()abstract voidrefreshReference(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.voidsetMipInstrumentation(org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation mipInstrumentation)voidsetStrategy(org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy strategy)protected voidstore()java.lang.StringtoString()
-
-
-
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:
getIdin interfaceorg.marketdesignresearch.mechlib.core.bidder.Bidder
-
getName
public java.lang.String getName()
- Specified by:
getNamein interfaceorg.marketdesignresearch.mechlib.core.bidder.Bidder
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
getDescription
public java.lang.String getDescription()
- Specified by:
getDescriptionin interfaceorg.marketdesignresearch.mechlib.core.bidder.Bidder
-
getShortDescription
public java.lang.String getShortDescription()
- Specified by:
getShortDescriptionin interfaceorg.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
-
getValue
public java.math.BigDecimal getValue(org.marketdesignresearch.mechlib.core.Bundle bundle, boolean ignoreAllocationLimits)- Specified by:
getValuein interfaceorg.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.
-
getValueFunction
public abstract <T extends BiddingLanguage> T getValueFunction(java.lang.Class<T> type, RNGSupplier rngSupplier) throws UnsupportedBiddingLanguageException
-
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()
-
drawSimilarBidder
public abstract SATSBidder drawSimilarBidder(RNGSupplier rngSupplier)
-
getSetup
protected BidderSetup getSetup()
-
setStrategy
public void setStrategy(org.marketdesignresearch.mechlib.core.bidder.strategy.InteractionStrategy strategy)
- Specified by:
setStrategyin interfaceorg.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:
getStrategyin interfaceorg.marketdesignresearch.mechlib.core.bidder.Bidder
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classjava.lang.Object
-
canEqual
protected boolean canEqual(java.lang.Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
getMipInstrumentation
public org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation getMipInstrumentation()
- Specified by:
getMipInstrumentationin interfaceorg.marketdesignresearch.mechlib.instrumentation.MipInstrumentationable
-
setMipInstrumentation
public void setMipInstrumentation(org.marketdesignresearch.mechlib.instrumentation.MipInstrumentation mipInstrumentation)
- Specified by:
setMipInstrumentationin interfaceorg.marketdesignresearch.mechlib.instrumentation.MipInstrumentationable
-
-