public abstract class Bidder<G extends Good> extends Object implements Serializable
| Modifier | Constructor and Description |
|---|---|
protected |
Bidder(BidderSetup setup,
long population,
long id,
long worldId) |
| Modifier and Type | Method and Description |
|---|---|
abstract BigDecimal |
calculateValue(Bundle<G> bundle)
Returns the value this bidder has for a specific bundle.
|
boolean |
equals(Object obj) |
long |
getId() |
long |
getPopulation() |
String |
getSetupType() |
double |
getValue(Bundle<G> bundle)
Deprecated.
|
<T extends BiddingLanguage> |
getValueFunction(Class<T> type)
Use this method to get a desired value function representation (bidding language)
for this bidder.
|
abstract <T extends BiddingLanguage> |
getValueFunction(Class<T> type,
long seed)
Use this method to get a desired value function representation (bidding language)
for this bidder.
|
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. |
protected void |
store() |
protected Bidder(BidderSetup setup, long population, long id, long worldId)
public long getId()
public String getSetupType()
BidderSetup) with which the bidder was created.@Deprecated public double getValue(Bundle<G> bundle)
bundle - the bundle for which the value is askedpublic abstract BigDecimal calculateValue(Bundle<G> bundle)
bundle - the bundle for which the value is askedpublic <T extends BiddingLanguage> T getValueFunction(Class<T> type) throws UnsupportedBiddingLanguageException
type - the type of the value functionUnsupportedBiddingLanguageException - 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.public abstract <T extends BiddingLanguage> T getValueFunction(Class<T> type, long seed) throws UnsupportedBiddingLanguageException
type - the type of the value functionUnsupportedBiddingLanguageException - 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.public long getPopulation()
public abstract World getWorld()
protected void store()
public abstract void refreshReference(World world)
public long getWorldId()
Copyright © 2017. All rights reserved.