org.cloudbus.cloudsim.utilizationmodels.UtilizationModelFull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cloudsim-plus Show documentation
Show all versions of cloudsim-plus Show documentation
CloudSim Plus: A modern, highly extensible and easier-to-use Java 8 Framework for Modeling and Simulation of Cloud Computing Infrastructures and Services
/*
* Title: CloudSim Toolkit
* Description: CloudSim (Cloud Simulation) Toolkit for Modeling and Simulation of Clouds
* Licence: GPL - http://www.gnu.org/copyleft/gpl.html
*
* Copyright (c) 2009-2012, The University of Melbourne, Australia
*/
package org.cloudbus.cloudsim.utilizationmodels;
import static org.cloudbus.cloudsim.util.Conversion.HUNDRED_PERCENT;
/**
* A {@link UtilizationModel} that according to which, a Cloudlet always utilizes
* a given allocated resource from its Vm at 100%, all the time.
* The methods {@link #getUtilization(double)} and {@link #getUtilization()}
* always return 1 any time they are called.
*
* @author Anton Beloglazov
* @since CloudSim Toolkit 2.0
*/
public class UtilizationModelFull extends UtilizationModelAbstract {
/**
* Gets the utilization percentage (in scale from [0 to 1]) of resource at a given simulation time.
*
* @param time the time to get the resource usage.
* @return Always return 1 (100% of utilization), independent of the time.
*/
@Override
protected final double getUtilizationInternal(final double time) {
return HUNDRED_PERCENT;
}
}