Class MRVMBidder
- java.lang.Object
-
- org.spectrumauctions.sats.core.model.SATSBidder
-
- org.spectrumauctions.sats.core.model.mrvm.MRVMBidder
-
- 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:
MRVMLocalBidder,MRVMNationalBidder,MRVMRegionalBidder
public abstract class MRVMBidder extends SATSBidder
- Author:
- Michael Weiss
- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.spectrumauctions.sats.core.model.SATSBidder
DEFAULT_DEMAND_QUERY_EPSILON, DEFAULT_DEMAND_QUERY_TIME_LIMIT
-
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract voidbidderTypeSpecificDemandQueryMIPAdjustments(MRVM_MIP mip)Allows a specific bidder type (subclass) to change the demand query mip before execution.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)booleanequals(java.lang.Object o)abstract java.math.BigDecimalgammaFactor(MRVMRegionsMap.Region r, java.util.Set<MRVMLicense> bundle)Calculates the gamma factor, as explained in the model writeup.abstract java.util.Map<MRVMRegionsMap.Region,java.math.BigDecimal>gammaFactors(java.util.Set<MRVMLicense> bundle)Calculates the gamma factors for all regions.org.marketdesignresearch.mechlib.core.allocationlimits.AllocationLimitgetAllocationLimit()java.math.BigDecimalgetAlpha()java.util.LinkedHashSet<org.marketdesignresearch.mechlib.core.Bundle>getBestBundles(org.marketdesignresearch.mechlib.core.price.Prices prices, int maxNumberOfBundles, boolean allowNegative)java.math.BigDecimalgetBeta(MRVMRegionsMap.Region region)<T extends BiddingLanguage>
TgetValueFunction(java.lang.Class<T> clazz, RNGSupplier rngSupplier)MRVMWorldgetWorld()java.math.BigDecimalgetzHigh(MRVMRegionsMap.Region region)java.math.BigDecimalgetzLow(MRVMRegionsMap.Region region)inthashCode()java.math.BigDecimalomegaFactor(MRVMRegionsMap.Region r, java.math.BigDecimal sv)Calculates the omega factor (i.e., the regional value)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.voidsetAllocationLimit(org.marketdesignresearch.mechlib.core.allocationlimits.AllocationLimit allocationLimit)ContinuousPiecewiseLinearFunctionsvFunction(MRVMRegionsMap.Region region)java.math.BigDecimalsvFunction(MRVMRegionsMap.Region region, java.math.BigDecimal c)Calculates the sv-function [See description in paper]-
Methods inherited from class org.spectrumauctions.sats.core.model.SATSBidder
calculateValues, drawSimilarBidder, getDescription, getId, getLongId, getMipInstrumentation, getName, getPopulation, getSetup, getSetupType, getShortDescription, getStrategy, getValue, getValueFunction, getValueFunction, getWorldId, setMipInstrumentation, setStrategy, store, toString
-
-
-
-
Method Detail
-
omegaFactor
public java.math.BigDecimal omegaFactor(MRVMRegionsMap.Region r, java.math.BigDecimal sv)
Calculates the omega factor (i.e., the regional value)
-
svFunction
public java.math.BigDecimal svFunction(MRVMRegionsMap.Region region, java.math.BigDecimal c)
Calculates the sv-function [See description in paper]
-
svFunction
public ContinuousPiecewiseLinearFunction svFunction(MRVMRegionsMap.Region region)
-
gammaFactor
public abstract java.math.BigDecimal gammaFactor(MRVMRegionsMap.Region r, java.util.Set<MRVMLicense> bundle)
Calculates the gamma factor, as explained in the model writeup.
The gamma factor represents a bidder-specific discount of the the regional (omega) values.- Parameters:
r- The region for which the discount is requestedbundle- The complete bundle (not only containing the licenses of r).
-
gammaFactors
public abstract java.util.Map<MRVMRegionsMap.Region,java.math.BigDecimal> gammaFactors(java.util.Set<MRVMLicense> bundle)
Calculates the gamma factors for all regions. For explanations of the gamma factors, seegammaFactor(MRVMRegionsMap.Region, Set)- Parameters:
bundle- The bundle for which the discounts will be calculated.
-
calculateValue
public java.math.BigDecimal calculateValue(org.marketdesignresearch.mechlib.core.Bundle bundle)
Description copied from class:SATSBidderReturns the value this bidder has for a specific bundle.- Specified by:
calculateValuein classSATSBidder- Parameters:
bundle- the bundle for which the value is asked- Returns:
- bidder specific value for this bundle
-
getWorld
public MRVMWorld getWorld()
- Specified by:
getWorldin classSATSBidder- Returns:
- World to which this bidder belongs. The implementing Bidder class, overriding this method, should return a world type corresponding to the specific model.
-
getzLow
public java.math.BigDecimal getzLow(MRVMRegionsMap.Region region)
-
getzHigh
public java.math.BigDecimal getzHigh(MRVMRegionsMap.Region region)
-
getAlpha
public java.math.BigDecimal getAlpha()
-
getBeta
public java.math.BigDecimal getBeta(MRVMRegionsMap.Region region)
-
getBestBundles
public java.util.LinkedHashSet<org.marketdesignresearch.mechlib.core.Bundle> getBestBundles(org.marketdesignresearch.mechlib.core.price.Prices prices, int maxNumberOfBundles, boolean allowNegative)
-
bidderTypeSpecificDemandQueryMIPAdjustments
protected abstract void bidderTypeSpecificDemandQueryMIPAdjustments(MRVM_MIP mip)
Allows a specific bidder type (subclass) to change the demand query mip before execution. I.e. restrict demand query result to items where the bidder is interested in.- Parameters:
mip-
-
refreshReference
public void refreshReference(World world)
Description copied from class:SATSBidderTo 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.- Specified by:
refreshReferencein classSATSBidder- See Also:
SATSBidder.refreshReference(World)
-
getValueFunction
public <T extends BiddingLanguage> T getValueFunction(java.lang.Class<T> clazz, RNGSupplier rngSupplier) throws UnsupportedBiddingLanguageException
- Specified by:
getValueFunctionin classSATSBidder- Throws:
UnsupportedBiddingLanguageException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classSATSBidder
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqualin classSATSBidder
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSATSBidder
-
getAllocationLimit
public org.marketdesignresearch.mechlib.core.allocationlimits.AllocationLimit getAllocationLimit()
-
setAllocationLimit
public void setAllocationLimit(org.marketdesignresearch.mechlib.core.allocationlimits.AllocationLimit allocationLimit)
-
-