cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/schedulers/vm/VmSchedulerTimeSharedOverSubscription.java
protected void redistributeMipsDueToOverSubscription() {
        // First, we calculate the scaling factor - the MIPS allocation for all VMs will be scaled proportionally
        final Map<Vm, List<Double>> mipsMapRequestedReduced = getNewTotalRequestedMipsByAllVms();

        final double scalingFactor = getVmsMipsScalingFactor(mipsMapRequestedReduced);

        getMipsMapAllocated().clear();
        for (final Entry<Vm, List<Double>> entry : mipsMapRequestedReduced.entrySet()) {
            final Vm vm = entry.getKey();
            List<Double> updatedMipsAllocation = getMipsShareToAllocate(vm, entry.getValue());
            updatedMipsAllocation = getMipsShareToAllocate(vm, updatedMipsAllocation, scalingFactor);
            getMipsMapAllocated().put(vm, updatedMipsAllocation);
        }
    }
/**
     * Redistribute the allocation of MIPs among all VMs when the total
     * MIPS requested by all of them is higher than the total available MIPS.
     * This way, it reduces the MIPS allocated to all VMs in order to
     * enable all MIPS requests to be fulfilled.
     *
     * <p>Updates the Map containing the list of allocated MIPS by all VMs,
     * reducing the amount requested according to a scaling factor.
     * This is performed when the amount of total requested MIPS by all VMs
     * is higher than the total available MIPS. The reduction
     * of the MIPS requested by all VMs enables all requests to be fulfilled.</p>
     * @see #getMipsMapAllocated()
     */
Redistribute the allocation of MIPs among all VMs when the total
MIPS requested by all of them is higher than the total available MIPS.
This way, it reduces the MIPS allocated to all VMs in order to
enable all MIPS requests to be fulfilled.

Updates the Map containing the list of allocated MIPS by all VMs,
reducing the amount requested according to a scaling factor.
This is performed when the amount of total requested MIPS by all VMs
is higher than the total available MIPS. The reduction
of the MIPS requested by all VMs enables all requests to be fulfilled.
@see #getMipsMapAllocated()
Redistribute the allocation of MIPs among all VMs when the total MIPS requested by all of them is higher than the total available MIPS . This way it reduces the MIPS allocated to all VMs in order to enable all MIPS requests to be fulfilled . Updates the Map containing the list of allocated MIPS by all VMs reducing the amount requested according to a scaling factor . This is performed when the amount of total requested MIPS by all VMs is higher than the total available MIPS . The reduction of the MIPS requested by all VMs enables all requests to be fulfilled . @see #getMipsMapAllocated ()
protected void redistributeMipsDueToOverSubscription() {
        final Map<Vm, List<Double>> mipsMapRequestedReduced = getNewTotalRequestedMipsByAllVms();
        final double scalingFactor = getVmsMipsScalingFactor(mipsMapRequestedReduced);
        getMipsMapAllocated().clear();
        for (final Entry<Vm, List<Double>> entry : mipsMapRequestedReduced.entrySet()) {
            final Vm vm = entry.getKey();
            List<Double> updatedMipsAllocation = getMipsShareToAllocate(vm, entry.getValue());
            updatedMipsAllocation = getMipsShareToAllocate(vm, updatedMipsAllocation, scalingFactor);
            getMipsMapAllocated().put(vm, updatedMipsAllocation);
        }
    }
protected void redistributeMipsDueToOverSubscription ( ) { final Map < Vm , List < Double > > mipsMapRequestedReduced = getNewTotalRequestedMipsByAllVms ( ) ; final double scalingFactor = getVmsMipsScalingFactor ( mipsMapRequestedReduced ) ; getMipsMapAllocated ( ) . clear ( ) ; for ( final Entry < Vm , List < Double > > entry : mipsMapRequestedReduced . entrySet ( ) ) { final Vm vm = entry . getKey ( ) ; List < Double > updatedMipsAllocation = getMipsShareToAllocate ( vm , entry . getValue ( ) ) ; updatedMipsAllocation = getMipsShareToAllocate ( vm , updatedMipsAllocation , scalingFactor ) ; getMipsMapAllocated ( ) . put ( vm , updatedMipsAllocation ) ; } }
Redistribute the allocation of MIPs among all VMs when the total
 MIPS requested by all of them is higher than the total available MIPS.
Redistribute the allocation of MIPs among all VMs when the total MIPS requested by all of them is higher than the total available MIPS .
// First, we calculate the scaling factor - the MIPS allocation for all VMs will be scaled proportionally