Class GSVMWorld
- java.lang.Object
-
- org.spectrumauctions.sats.core.model.World
-
- org.spectrumauctions.sats.core.model.gsvm.GSVMWorld
-
- All Implemented Interfaces:
java.io.Serializable
public final class GSVMWorld extends World
- Author:
- Fabio Isler
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description GSVMWorld(GSVMWorldSetup worldSetup, RNGSupplier rngSupplier)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<GSVMBidder>createPopulation(java.util.Collection<GSVMRegionalBidderSetup> regionalSetups, java.util.Collection<GSVMNationalBidderSetup> nationalSetups, RNGSupplier populationRNG)com.google.common.collect.ImmutableList<GSVMLicense>getLicenses()GSVMCirclegetNationalCircle()intgetNumberOfGoods()GSVMCirclegetRegionalCircle()intgetSize()booleanisLegacyGSVM()In earlier versions of SATS (earlier than 0.7.0), the original model was interpreted differently than it is today.voidrefreshFieldBackReferences()Some of the members of the World (e.g.java.util.List<GSVMBidder>restorePopulation(long populationId)Restore serializedSATSBidderinstances via population id-
Methods inherited from class org.spectrumauctions.sats.core.model.World
equals, getId, getModelName, hashCode, openNewPopulation, restorePopulation, restorePopulation, store
-
-
-
-
Constructor Detail
-
GSVMWorld
public GSVMWorld(GSVMWorldSetup worldSetup, RNGSupplier rngSupplier)
-
-
Method Detail
-
getSize
public int getSize()
-
getNationalCircle
public GSVMCircle getNationalCircle()
-
getRegionalCircle
public GSVMCircle getRegionalCircle()
-
restorePopulation
public java.util.List<GSVMBidder> restorePopulation(long populationId)
Description copied from class:WorldRestore serializedSATSBidderinstances via population id- Specified by:
restorePopulationin classWorld- Parameters:
populationId- the population id- Returns:
- the deserialized bidders
-
getLicenses
public com.google.common.collect.ImmutableList<GSVMLicense> getLicenses()
- Specified by:
getLicensesin classWorld- Returns:
- An immutable set containing all licenses.
-
getNumberOfGoods
public int getNumberOfGoods()
- Specified by:
getNumberOfGoodsin classWorld
-
refreshFieldBackReferences
public void refreshFieldBackReferences()
Description copied from class:WorldSome of the members of the World (e.g. licenses) have circular references back to the world.
As the used gsonSerializer cannot handle this yet, the circular references are not serialized and have to be restored after deserialization by calling this method.
This method will be removed in a later version and the problem be solved during deserialization.- Specified by:
refreshFieldBackReferencesin classWorld
-
createPopulation
public java.util.List<GSVMBidder> createPopulation(java.util.Collection<GSVMRegionalBidderSetup> regionalSetups, java.util.Collection<GSVMNationalBidderSetup> nationalSetups, RNGSupplier populationRNG)
-
isLegacyGSVM
public boolean isLegacyGSVM()
In earlier versions of SATS (earlier than 0.7.0), the original model was interpreted differently than it is today. Back then, when asking a bidder what her value is for bundle X, the synergy factor increased with any good in X. Now, the synergy factor only increases with goods which the bidder has a positive value for. This flag can be set to true in order to reproduce results of the old SATS versions.
-
-