Class BaseValueModel
- java.lang.Object
-
- org.spectrumauctions.sats.core.model.DefaultModel<BMWorld,BMBidder>
-
- org.spectrumauctions.sats.core.model.bvm.bvm.BaseValueModel
-
public class BaseValueModel extends DefaultModel<BMWorld,BMBidder>
- Author:
- Michael Weiss
-
-
Constructor Summary
Constructors Constructor Description BaseValueModel()Creates a new QuickAccessor to the Base Value Model in its default configuration.BaseValueModel(int numberOfBidders)Creates a new QuickAccessor to the Base Value Model in its default configuration.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<BMBidder>createPopulation(BMWorld world, RNGSupplier populationRNG)Creates a new set ofSATSBidderinstancesBMWorldcreateWorld(RNGSupplier rngSupplier)Creates a newWorldintgetNumberOfBidders()protected voidmodifyBidderBuilder()Call this method when bidderBuilder is changed (away from default config) to ensure theBidderSetup.getSetupName()is changedprotected voidmodifyWorldBuilder()Call this method when worldBuilder is changed (away from default config) to ensure theBMWorldSetup.getSetupName()is changedvoidsetNumberOfBidders(int numberOfBidders)-
Methods inherited from class org.spectrumauctions.sats.core.model.DefaultModel
createNewPopulation, createNewPopulation, createNewWorldAndPopulation, createNewWorldAndPopulation, createNewWorldAndPopulation, createNewWorldAndPopulation, createNewWorldAndPopulation, createWorld, createWorld
-
-
-
-
Constructor Detail
-
BaseValueModel
public BaseValueModel()
Creates a new QuickAccessor to the Base Value Model in its default configuration. Note: Since the orginal model definition does not specify the number of bidders, it is recommended to useBaseValueModel(int)for construction. Otherwise, 5 bidders are created by default.
-
BaseValueModel
public BaseValueModel(int numberOfBidders)
Creates a new QuickAccessor to the Base Value Model in its default configuration.- Parameters:
numberOfBidders- specifies how many bidders there will be created in each population
-
-
Method Detail
-
createWorld
public BMWorld createWorld(RNGSupplier rngSupplier)
Description copied from class:DefaultModelCreates a newWorld- Specified by:
createWorldin classDefaultModel<BMWorld,BMBidder>- Parameters:
rngSupplier- A rng supplier for random creation of world parameters- Returns:
- a new world
-
createPopulation
public java.util.List<BMBidder> createPopulation(BMWorld world, RNGSupplier populationRNG)
Description copied from class:DefaultModelCreates a new set ofSATSBidderinstances- Specified by:
createPopulationin classDefaultModel<BMWorld,BMBidder>- Parameters:
world- theWorldfor which the bidders are createdpopulationRNG- a rng supplier for the creation of random bidder parameters- Returns:
- a new set of bidders
-
getNumberOfBidders
public int getNumberOfBidders()
- Returns:
- The number of bidders to be created
-
setNumberOfBidders
public void setNumberOfBidders(int numberOfBidders)
- Parameters:
numberOfBidders- the number of bidders to be created
-
modifyWorldBuilder
protected void modifyWorldBuilder()
Call this method when worldBuilder is changed (away from default config) to ensure theBMWorldSetup.getSetupName()is changed
-
modifyBidderBuilder
protected void modifyBidderBuilder()
Call this method when bidderBuilder is changed (away from default config) to ensure theBidderSetup.getSetupName()is changed
-
-