Class BMBidder

  • All Implemented Interfaces:
    java.io.Serializable, org.marketdesignresearch.mechlib.core.bidder.Bidder, org.marketdesignresearch.mechlib.core.bidder.valuefunction.ValueFunction, org.marketdesignresearch.mechlib.instrumentation.MipInstrumentationable

    public final class BMBidder
    extends SATSBidder
    Author:
    Michael Weiss
    See Also:
    Serialized Form
    • Method Detail

      • synergyFactor

        public java.math.BigDecimal synergyFactor​(BMBand band,
                                                  int quantity)
        Returns the synergy factor for a given band and quantity. Special Cases (rules apply in this order):
        - returns 1 for quantity 1
        - returns 0 for quantity 0
        - If no synergy factors stored for band, returns 1
        - The highest explicitely stored quantity is defined as the upper limit of items with synergies, see highestSynergyQuantity(BMBand).
        - If quantity has no specified synergy factor, the synergy factor for next lower known quantity is returned.
      • getBaseValue

        public java.math.BigDecimal getBaseValue​(BMBand band)
      • highestSynergyQuantity

        public int highestSynergyQuantity​(BMBand band)
        Returns:
        the maximal number of items within a band, for which synergies apply. For additional items in the same band, only their base value (without synergies) is added to the total value, if they are not excluded by the positiveValueThreshold.
      • getWorld

        public BMWorld getWorld()
        Specified by:
        getWorld in class SATSBidder
        Returns:
        World to which this bidder belongs. The implementing Bidder class, overriding this method, should return a world type corresponding to the specific model.
        See Also:
        SATSBidder.getWorld()
      • refreshReference

        public void refreshReference​(World world)
        Description copied from class: SATSBidder
        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.
        Specified by:
        refreshReference in class SATSBidder
        See Also:
        SATSBidder.refreshReference(World)
      • calculateValue

        public java.math.BigDecimal calculateValue​(org.marketdesignresearch.mechlib.core.Bundle bundle)
        Description copied from class: SATSBidder
        Returns the value this bidder has for a specific bundle.
        Specified by:
        calculateValue in class SATSBidder
        Parameters:
        bundle - the bundle for which the value is asked
        Returns:
        bidder specific value for this bundle
      • getBestBundles

        public java.util.LinkedHashSet<org.marketdesignresearch.mechlib.core.Bundle> getBestBundles​(org.marketdesignresearch.mechlib.core.price.Prices prices,
                                                                                                    int maxNumberOfBundles,
                                                                                                    boolean allowNegative)
      • equals

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

        protected boolean canEqual​(java.lang.Object other)
        Overrides:
        canEqual in class SATSBidder