org.lucci.madhoc.network.cost
Class ThresholdedCostModel
java.lang.Object
org.lucci.madhoc.network.cost.CostModel
org.lucci.madhoc.network.cost.ThresholdedCostModel
- All Implemented Interfaces:
- Configurable
public class ThresholdedCostModel
- extends CostModel
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ThresholdedCostModel
public ThresholdedCostModel()
configure
public void configure()
throws java.lang.Throwable
- Throws:
java.lang.Throwable
getCost
public double getCost(int numberOfBytes,
int history)
- Description copied from class:
CostModel
- Process the price for a transfer of numberOfBytes knowing that history
bytes have already been transfered by the same station.
- Specified by:
getCost
in class CostModel
- Returns:
getNumberOfBytesThreshold
public int getNumberOfBytesThreshold()
setNumberOfBytesThreshold
public void setNumberOfBytesThreshold(int numberOfBytesThreshold)
getPriceForOneSingleByteAboveThreshold
public double getPriceForOneSingleByteAboveThreshold()
setPriceForOneSingleByteAboveThreshold
public void setPriceForOneSingleByteAboveThreshold(double priceForOneSingleByteAfterThreshold)
getPriceForOneSingleByteBelowThreshold
public double getPriceForOneSingleByteBelowThreshold()
setPriceForOneSingleByteBelowThreshold
public void setPriceForOneSingleByteBelowThreshold(double priceForOneSingleByteUntilThreshold)