Commit e5529283 authored by Manoel Campos's avatar Manoel Campos

Documentation of package org.cloudbus.cloudsim.power.models improved.

parent f44af2e2
...@@ -10,7 +10,7 @@ package org.cloudbus.cloudsim.power.models; ...@@ -10,7 +10,7 @@ package org.cloudbus.cloudsim.power.models;
/** /**
* The PowerModel interface needs to be implemented in order to provide a model of power consumption * The PowerModel interface needs to be implemented in order to provide a model of power consumption
* depending on utilization for system components. * of hosts, depending on utilization of a critical system component, such as CPU.
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -28,13 +28,14 @@ package org.cloudbus.cloudsim.power.models; ...@@ -28,13 +28,14 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 2.0 * @since CloudSim Toolkit 2.0
*/ */
public interface PowerModel { public interface PowerModel {
/** /**
* Get power consumption by the utilization percentage according to the power model. * Gets power consumption of the Power Model, according to the utilization percentage
* of a critical resource, such as CPU.
* *
* @param utilization the utilization * @param utilization the utilization percentage (between [0 and 1]) of a resource that
* @return power consumption * is critical for power consumption.
* @throws IllegalArgumentException the illegal argument exception * @return the power consumption
* @throws IllegalArgumentException when the utilization percentage is not between [0 and 1]
*/ */
double getPower(double utilization) throws IllegalArgumentException; double getPower(double utilization) throws IllegalArgumentException;
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The Class PowerModelCubic. * Implements a power model where the power consumption is the cube of the resource usage.
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -27,14 +27,16 @@ package org.cloudbus.cloudsim.power.models; ...@@ -27,14 +27,16 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 2.0 * @since CloudSim Toolkit 2.0
*/ */
public class PowerModelCubic implements PowerModel { public class PowerModelCubic implements PowerModel {
/** The max power that can be consumed. */
/** The max power. */
private double maxPower; private double maxPower;
/** The constant. */ /** The constant that represents the power consumption
* for each fraction of resource used. */
private double constant; private double constant;
/** The static power. */ /** The static power consumption that is not dependent of resource usage.
* It is the amount of energy consumed even when the host is idle.
*/
private double staticPower; private double staticPower;
/** /**
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The Class PowerModelLinear. * Implements a power model where the power consumption is linear to resource usage.
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -25,16 +25,22 @@ package org.cloudbus.cloudsim.power.models; ...@@ -25,16 +25,22 @@ package org.cloudbus.cloudsim.power.models;
* *
* @author Anton Beloglazov * @author Anton Beloglazov
* @since CloudSim Toolkit 2.0 * @since CloudSim Toolkit 2.0
* @too the tree first attributes are being repeated among several classes.
* Thus, a better class hierarchy should be provided, such as an abstract class
* implementing the PowerModel interface.
*/ */
public class PowerModelLinear implements PowerModel { public class PowerModelLinear implements PowerModel {
/** The max power. */ /** The max power that can be consumed. */
private double maxPower; private double maxPower;
/** The constant. */ /** The constant that represents the power consumption
* for each fraction of resource used. */
private double constant; private double constant;
/** The static power. */ /** The static power consumption that is not dependent of resource usage.
* It is the amount of energy consumed even when the host is idle.
*/
private double staticPower; private double staticPower;
/** /**
......
...@@ -44,10 +44,11 @@ public abstract class PowerModelSpecPower implements PowerModel { ...@@ -44,10 +44,11 @@ public abstract class PowerModelSpecPower implements PowerModel {
} }
/** /**
* Gets the power data. * Gets the power consumption for a given utilization percentage.
* *
* @param index the index * @param index the utilization percentage in the scale from [0 to 10],
* @return the power data * where 10 means 100% of utilization.
* @return the power consumption for the given utilization percentage
*/ */
protected abstract double getPowerData(int index); protected abstract double getPowerData(int index);
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an HP ProLiant ML110 G3 (1 x [Pentium D930 3000 MHz, 2 cores], 4GB). * The power model of an HP ProLiant ML110 G3 (1 x [Pentium D930 3000 MHz, 2 cores], 4GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110127-00342.html * <a href="http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110127-00342.html">
* http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110127-00342.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerHpProLiantMl110G3PentiumD930 extends PowerModelSpecPower { public class PowerModelSpecPowerHpProLiantMl110G3PentiumD930 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 105, 112, 118, 125, 131, 137, 147, 153, 157, 164, 169 }; private final double[] power = { 105, 112, 118, 125, 131, 137, 147, 153, 157, 164, 169 };
@Override @Override
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an HP ProLiant ML110 G4 (1 x [Xeon 3040 1860 MHz, 2 cores], 4GB). * The power model of an HP ProLiant ML110 G4 (1 x [Xeon 3040 1860 MHz, 2 cores], 4GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110127-00342.html * <a href="http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110127-00342.html">
* http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110127-00342.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerHpProLiantMl110G4Xeon3040 extends PowerModelSpecPower { public class PowerModelSpecPowerHpProLiantMl110G4Xeon3040 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 86, 89.4, 92.6, 96, 99.5, 102, 106, 108, 112, 114, 117 }; private final double[] power = { 86, 89.4, 92.6, 96, 99.5, 102, 106, 108, 112, 114, 117 };
@Override @Override
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an HP ProLiant ML110 G5 (1 x [Xeon 3075 2660 MHz, 2 cores], 4GB). * The power model of an HP ProLiant ML110 G5 (1 x [Xeon 3075 2660 MHz, 2 cores], 4GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110124-00339.html * <a href="http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110124-00339.html">
* http://www.spec.org/power_ssj2008/results/res2011q1/power_ssj2008-20110124-00339.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerHpProLiantMl110G5Xeon3075 extends PowerModelSpecPower { public class PowerModelSpecPowerHpProLiantMl110G5Xeon3075 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 93.7, 97, 101, 105, 110, 116, 121, 125, 129, 133, 135 }; private final double[] power = { 93.7, 97, 101, 105, 110, 116, 121, 125, 129, 133, 135 };
@Override @Override
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an IBM server x3250 (1 x [Xeon X3470 2933 MHz, 4 cores], 8GB). * The power model of an IBM server x3250 (1 x [Xeon X3470 2933 MHz, 4 cores], 8GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2009q4/power_ssj2008-20091104-00213.html * <a href="http://www.spec.org/power_ssj2008/results/res2009q4/power_ssj2008-20091104-00213.html">
* http://www.spec.org/power_ssj2008/results/res2009q4/power_ssj2008-20091104-00213.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerIbmX3250XeonX3470 extends PowerModelSpecPower { public class PowerModelSpecPowerIbmX3250XeonX3470 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 41.6, 46.7, 52.3, 57.9, 65.4, 73, 80.7, 89.5, 99.6, 105, 113 }; private final double[] power = { 41.6, 46.7, 52.3, 57.9, 65.4, 73, 80.7, 89.5, 99.6, 105, 113 };
@Override @Override
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an IBM server x3250 (1 x [Xeon X3480 3067 MHz, 4 cores], 8GB). * The power model of an IBM server x3250 (1 x [Xeon X3480 3067 MHz, 4 cores], 8GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2010q4/power_ssj2008-20101001-00297.html * <a href="http://www.spec.org/power_ssj2008/results/res2010q4/power_ssj2008-20101001-00297.html">
* http://www.spec.org/power_ssj2008/results/res2010q4/power_ssj2008-20101001-00297.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerIbmX3250XeonX3480 extends PowerModelSpecPower { public class PowerModelSpecPowerIbmX3250XeonX3480 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 42.3, 46.7, 49.7, 55.4, 61.8, 69.3, 76.1, 87, 96.1, 106, 113 }; private final double[] power = { 42.3, 46.7, 49.7, 55.4, 61.8, 69.3, 76.1, 87, 96.1, 106, 113 };
@Override @Override
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an IBM server x3550 (2 x [Xeon X5670 2933 MHz, 6 cores], 12GB). * The power model of an IBM server x3550 (2 x [Xeon X5670 2933 MHz, 6 cores], 12GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2010q2/power_ssj2008-20100315-00239.html * <a href="http://www.spec.org/power_ssj2008/results/res2010q2/power_ssj2008-20100315-00239.html">
* http://www.spec.org/power_ssj2008/results/res2010q2/power_ssj2008-20100315-00239.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerIbmX3550XeonX5670 extends PowerModelSpecPower { public class PowerModelSpecPowerIbmX3550XeonX5670 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 66, 107, 120, 131, 143, 156, 173, 191, 211, 229, 247 }; private final double[] power = { 66, 107, 120, 131, 143, 156, 173, 191, 211, 229, 247 };
@Override @Override
......
...@@ -9,8 +9,9 @@ ...@@ -9,8 +9,9 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The power model of an IBM server x3550 (2 x [Xeon X5675 3067 MHz, 6 cores], 16GB). * The power model of an IBM server x3550 (2 x [Xeon X5675 3067 MHz, 6 cores], 16GB).<br/>
* http://www.spec.org/power_ssj2008/results/res2011q2/power_ssj2008-20110406-00368.html * <a href="http://www.spec.org/power_ssj2008/results/res2011q2/power_ssj2008-20110406-00368.html">
* http://www.spec.org/power_ssj2008/results/res2011q2/power_ssj2008-20110406-00368.html</a>
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,8 +27,10 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 3.0 * @since CloudSim Toolkit 3.0
*/ */
public class PowerModelSpecPowerIbmX3550XeonX5675 extends PowerModelSpecPower { public class PowerModelSpecPowerIbmX3550XeonX5675 extends PowerModelSpecPower {
/**
/** The power. */ * The power consumption according to the utilization percentage.
* @see #getPowerData(int)
*/
private final double[] power = { 58.4, 98, 109, 118, 128, 140, 153, 170, 189, 205, 222 }; private final double[] power = { 58.4, 98, 109, 118, 128, 140, 153, 170, 189, 205, 222 };
@Override @Override
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The Class PowerModelSqrt. * Implements a power model where the power consumption is the square root of the resource usage.
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -25,14 +25,16 @@ package org.cloudbus.cloudsim.power.models; ...@@ -25,14 +25,16 @@ package org.cloudbus.cloudsim.power.models;
* @since CloudSim Toolkit 2.0 * @since CloudSim Toolkit 2.0
*/ */
public class PowerModelSqrt implements PowerModel { public class PowerModelSqrt implements PowerModel {
/** The max power that can be consumed. */
/** The max power. */
private double maxPower; private double maxPower;
/** The constant. */ /** The constant that represents the power consumption
* for each fraction of resource used. */
private double constant; private double constant;
/** The static power. */ /** The static power consumption that is not dependent of resource usage.
* It is the amount of energy consumed even when the host is idle.
*/
private double staticPower; private double staticPower;
/** /**
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
package org.cloudbus.cloudsim.power.models; package org.cloudbus.cloudsim.power.models;
/** /**
* The Class PowerModelSquare. * Implements a power model where the power consumption is the square of the resource usage.
* *
* <br/>If you are using any algorithms, policies or workload included in the power package please cite * <br/>If you are using any algorithms, policies or workload included in the power package please cite
* the following paper:<br/> * the following paper:<br/>
...@@ -26,13 +26,16 @@ package org.cloudbus.cloudsim.power.models; ...@@ -26,13 +26,16 @@ package org.cloudbus.cloudsim.power.models;
*/ */
public class PowerModelSquare implements PowerModel { public class PowerModelSquare implements PowerModel {
/** The max power. */ /** The max power that can be consumed. */
private double maxPower; private double maxPower;
/** The constant. */ /** The constant that represents the power consumption
* for each fraction of resource used. */
private double constant; private double constant;
/** The static power. */ /** The static power consumption that is not dependent of resource usage.
* It is the amount of energy consumed even when the host is idle.
*/
private double staticPower; private double staticPower;
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment