public class StochasticNeedDevelopmentScheme extends NeedDevelopmentScheme
Constructor and Description |
---|
StochasticNeedDevelopmentScheme(java.util.Map<Need,java.lang.Double> needIndicatorMap) |
Modifier and Type | Method and Description |
---|---|
java.util.List<NeedEvent> |
createNeedEvents(SimulationContainer simulationContainer,
ConsumerAgent consumerAgent)
NeedEvents are created proportionally to the needIndicatorMap provided in the constructor.
|
java.util.List<NeedEvent> |
productExpiration(Product expiredProduct,
ConsumerAgent associatedConsumer,
double systemTime)
Expired products trigger needs stochastically, as long as these aren't covered.
|
sortNeedIndicatorMapByValue, sortNeedsByNeedIndicatorValue
public StochasticNeedDevelopmentScheme(java.util.Map<Need,java.lang.Double> needIndicatorMap)
public java.util.List<NeedEvent> createNeedEvents(SimulationContainer simulationContainer, ConsumerAgent consumerAgent)
createNeedEvents
in class NeedDevelopmentScheme
simulationContainer
- The container the simulation runs inconsumerAgent
- The ConsumerAgent whom the needs are associated withpublic java.util.List<NeedEvent> productExpiration(Product expiredProduct, ConsumerAgent associatedConsumer, double systemTime)
productExpiration
in class NeedDevelopmentScheme
expiredProduct
- The product whose lifetime exceededassociatedConsumer
- The ConsumerAgent who adopted the product before its expirationsystemTime
- The time of the expiration of the product