Class VmGroup
- All Implemented Interfaces:
Comparable<Vm>,ChangeableId,CustomerEntity,ExecDelayable,Identifiable,Lifetimed,Machine<Resource>,ResourceStatsComputer<VmResourceStats>,Startable,SubmissionDelayable,UniquelyIdentifiable,TimeZoned,Resourceful,Vm
Represents a List of Vms that form a group,
so that should be placed together at the same,
according to resource availability.
This way, such an object is not an actual Vm,
but a mock used to check if all the resources
required by all VMs inside the group are available at a single Host.
It assumes all VMs belong to the same DatacenterBroker.
- Since:
- CloudSim Plus 4.6.0
- Author:
- Manoel Campos da Silva Filho
-
Field Summary
Fields inherited from class org.cloudsimplus.vms.VmAbstract
allocatedMips, description, expectedFreePesNumber, freePesNumber, onCreationFailureListeners, onHostAllocationListeners, onHostDeallocationListeners, onMigrationFinishListeners, onMigrationStartListeners, onUpdateProcessingListeners, processor, requestedMips, resources, stateHistoryFields inherited from interface org.cloudsimplus.core.Startable
NOT_ASSIGNEDFields inherited from interface org.cloudsimplus.datacenters.TimeZoned
MAX_TIME_ZONE_OFFSET, MIN_TIME_ZONE_OFFSET -
Constructor Summary
ConstructorsConstructorDescriptionCreates a VmGroup for a List of VMs to be placed at the datacenter closest to a given timezone.Creates a VmGroup for a List of VMs.Creates a VmGroup for a List of VMs to be placed at the datacenter closest to a given timezone. -
Method Summary
Modifier and TypeMethodDescriptiondoubleComputes the relative percentage of the Bandwidth the VM is using from the Host's total capacity for the current simulation time.doublegetHostCpuUtilization(double time) Computes the relative percentage of the CPU the VM is using from the Host's total MIPS capacity for the current simulation time.doubleComputes the relative percentage of the RAM the VM is using from the Host's total Capacity for the current simulation time.final VmsetTimeZone(double timeZone) Sets the time zone offset between [TimeZoned.MIN_TIME_ZONE_OFFSETandTimeZoned.MAX_TIME_ZONE_OFFSET].intsize()doubleupdateProcessing(double currentTime, MipsShare mipsShare) Updates the processing of cloudlets running on this VM.Methods inherited from class org.cloudsimplus.vms.VmAbstract
addExpectedFreePesNumber, addOnCreationFailureListener, addOnHostAllocationListener, addOnHostDeallocationListener, addOnMigrationFinishListener, addOnMigrationStartListener, addOnUpdateProcessingListener, addStateHistoryEntry, enableUtilizationStats, getCpuPercentRequested, getCpuPercentRequested, getCpuPercentUtilization, getCpuPercentUtilization, getCurrentRequestedBw, getCurrentRequestedMips, getCurrentRequestedRam, getExpectedHostCpuUtilization, getFirstVm, getList, getMips, getPesNumber, getRam, getResource, getResources, getStateHistory, getTotalCpuMipsRequested, getTotalCpuMipsUtilization, getTotalCpuMipsUtilization, getTotalMipsCapacity, getVmCount, hasStartedSomeCloudlet, isFinished, isSubmissionDelayed, isSuitableForCloudlet, isVmList, isWorking, mutableAttributesInit, notifyOnCreationFailureListeners, notifyOnHostAllocationListeners, notifyOnHostDeallocationListeners, notifyOnUpdateProcessingListeners, onFinish, onStart, removeExpectedFreePesNumber, removeOnCreationFailureListener, removeOnHostAllocationListener, removeOnHostDeallocationListener, removeOnMigrationFinishListener, removeOnMigrationStartListener, removeOnUpdateProcessingListener, setAllocatedMips, setBw, setBwVerticalScaling, setCloudletScheduler, setCloudletsToFailed, setCreated, setDefaultBwCapacity, setDefaultRamCapacity, setDefaultStorageCapacity, setDescription, setFailed, setFreePesNumber, setGroup, setHorizontalScaling, setHost, setInMigration, setMips, setPesNumber, setPeVerticalScaling, setRam, setRamVerticalScaling, setRequestedMips, setSize, setStartTime, setStorage, setSubmissionDelay, setVmm, shutdown, updateMigrationFinishListeners, updateMigrationStartListeners, updateProcessingMethods inherited from class org.cloudsimplus.core.CustomerEntityAbstract
getCreationWaitTime, getSimulation, getUid, setCreationTime, setCreationTime, setLifeTimeMethods inherited from class org.cloudsimplus.core.ExecDelayableAbstract
isShuttingDown, setShutDownDelay, setStartupDelayMethods inherited from class org.cloudsimplus.core.StartableAbstract
getTotalExecutionTime, setFinishTimeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.cloudsimplus.core.ChangeableId
setIdMethods inherited from interface org.cloudsimplus.core.CustomerEntity
getBrokerArrivalTime, getCreationTime, getCreationWaitTime, getFinishTime, getLastTriedDatacenter, setBrokerArrivalTime, setLastTriedDatacenterMethods inherited from interface org.cloudsimplus.core.ExecDelayable
getRemainingStartupTime, getShutdownBeginTime, getShutDownDelay, getStartupCompletionTime, getStartupDelay, isShutDownDelayed, isShuttingDown, isStartupDelayed, setShutdownBeginTime, setShutDownDelayMethods inherited from interface org.cloudsimplus.core.Identifiable
getIdMethods inherited from interface org.cloudsimplus.core.Lifetimed
isLifeTimeReachedMethods inherited from interface org.cloudsimplus.core.Machine
getIdleInterval, getLastBusyTime, getSimulation, isIdleMethods inherited from interface org.cloudsimplus.core.ResourceStatsComputer
getCpuUtilizationStatsMethods inherited from interface org.cloudsimplus.core.Startable
getStartTime, hasStarted, setFinishTime, setLastBusyTimeMethods inherited from interface org.cloudsimplus.core.SubmissionDelayable
getSubmissionDelayMethods inherited from interface org.cloudsimplus.datacenters.TimeZoned
distance, validateTimeZoneMethods inherited from interface org.cloudsimplus.core.UniquelyIdentifiable
getUidMethods inherited from interface org.cloudsimplus.vms.Vm
getBootModel, getBroker, getBw, getBwVerticalScaling, getCloudletScheduler, getDescription, getExpectedFreePesNumber, getFreePesNumber, getGroup, getHorizontalScaling, getHost, getHostCpuUtilization, getLifeTime, getPeVerticalScaling, getProcessor, getRamVerticalScaling, getStorage, getTimeZone, getTotalExecutionTime, getVmm, isCreated, isFailed, isIdleEnough, isInMigration, isStartingUp, setBootModel, setBroker, setLifeTime, setStartupDelay
-
Constructor Details
-
VmGroup
-
VmGroup
Creates a VmGroup for a List of VMs to be placed at the datacenter closest to a given timezone. All VMs will be changed to the given time zone.- Parameters:
vmList- the List of VMs to create the grouptimeZone- the timezone of the Datacenter where it's expected the VMs to be placed as close as possible- See Also:
-
VmGroup
Creates a VmGroup for a List of VMs to be placed at the datacenter closest to a given timezone. All VMs will be changed to the given time zone.- Parameters:
id- the VmGroup IDvmList- the List of VMs to create the grouptimeZone- the time zone of the Datacenter where it's expected the VMs to be placed as close as possible- See Also:
-
-
Method Details
-
getHostCpuUtilization
public double getHostCpuUtilization(double time) Description copied from interface:VmComputes the relative percentage of the CPU the VM is using from the Host's total MIPS capacity for the current simulation time. If the capacity is 1000 MIPS and the VM is using 250 MIPS, it's equivalent to 25% of the Host's capacity.- Specified by:
getHostCpuUtilizationin interfaceVm- Overrides:
getHostCpuUtilizationin classVmAbstract- Parameters:
time- the time to get the relative VM CPU utilization- Returns:
- the relative VM CPU usage percent (from 0 to 1)
-
getHostRamUtilization
public double getHostRamUtilization()Description copied from interface:VmComputes the relative percentage of the RAM the VM is using from the Host's total Capacity for the current simulation time.- Specified by:
getHostRamUtilizationin interfaceVm- Overrides:
getHostRamUtilizationin classVmAbstract- Returns:
- the relative VM RAM usage percent (from 0 to 1)
-
getHostBwUtilization
public double getHostBwUtilization()Description copied from interface:VmComputes the relative percentage of the Bandwidth the VM is using from the Host's total capacity for the current simulation time.- Specified by:
getHostBwUtilizationin interfaceVm- Overrides:
getHostBwUtilizationin classVmAbstract- Returns:
- the relative VM BW usage percent (from 0 to 1)
-
setTimeZone
Description copied from interface:VmSets the time zone offset between [TimeZoned.MIN_TIME_ZONE_OFFSETandTimeZoned.MAX_TIME_ZONE_OFFSET]. That is the timezone in which the VM is expected to be placed (if there is aDatacenterwith enough capacity available at that timezone).- Specified by:
setTimeZonein interfaceTimeZoned- Specified by:
setTimeZonein interfaceVm- Overrides:
setTimeZonein classVmAbstract- Parameters:
timeZone- the new expected time zone offset- Returns:
-
size
public int size()- Returns:
- the number of VMs inside this group.
-