public class ModelPower extends PowerModelCubic{ double max=1; //Maximum amount of power a host can utilize double k=0.5; // 50% of the power is utilized when a host is in idle state. ……; ……..; public double getPower(double utilization) throws IllegalArgumentException { if (utilization < 0 || utilization > 1) { throw new IllegalArgumentException("Utilization value must be between 0 and 1"); } if (utilization == 0) { return 0; } double s=k*max+(1-k)*max*utilization; // Example Power Model. return s; } }