package org.lucci.madhoc.network.cost;
public class LinearCostModel extends CostModel
{
private double priceForOneSingleByte;
public void configure() throws Throwable
{
setPriceForOneSingleByte(getSimulation().getConfiguration().getDouble(
"price_for_one_singe_byte"));
}
public double getPriceForOneSingleByte()
{
return priceForOneSingleByte;
}
public void setPriceForOneSingleByte(double priceForOneSingleByte)
{
this.priceForOneSingleByte = priceForOneSingleByte;
}
@Override
public double getCost(int numberOfBytes, int history)
{
return getPriceForOneSingleByte() * numberOfBytes;
}
}