cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus-examples/src/main/java/org/cloudsimplus/examples/autoscaling/VerticalVmRamScalingExample.java
private void createVerticalRamScalingForVm(Vm vm) {
        VerticalVmScaling verticalRamScaling = new VerticalVmScalingSimple(Ram.class, 0.1);
        /* By uncommenting the line below, you will see that instead of gradually
         * increasing or decreasing the RAM, when the scaling object detect
         * the RAM usage is above or below the defined thresholds,
         * it will automatically calculate the amount of RAM to add/remove to
         * move the VM from the over or underload condition.
        */
        //verticalRamScaling.setResourceScaling(new ResourceScalingInstantaneous());
        verticalRamScaling.setLowerThresholdFunction(this::lowerRamUtilizationThreshold);
        verticalRamScaling.setUpperThresholdFunction(this::upperRamUtilizationThreshold);
        vm.setRamVerticalScaling(verticalRamScaling);
    }
/**
     * Creates a {@link VerticalVmScaling} for the RAM of a given VM.
     *
     * @param vm the VM in which the VerticalVmScaling will be created
     * @see #createListOfScalableVms(int)
     */
Creates a  VerticalVmScaling for the RAM of a given VM.
@param vm the VM in which the VerticalVmScaling will be created
@see #createListOfScalableVms(int)
Creates a VerticalVmScaling for the RAM of a given VM . @param vm the VM in which the VerticalVmScaling will be created @see #createListOfScalableVms ( int )
private void createVerticalRamScalingForVm(Vm vm) {
        VerticalVmScaling verticalRamScaling = new VerticalVmScalingSimple(Ram.class, 0.1);
        /* By uncommenting the line below, you will see that instead of gradually
         * increasing or decreasing the RAM, when the scaling object detect
         * the RAM usage is above or below the defined thresholds,
         * it will automatically calculate the amount of RAM to add/remove to
         * move the VM from the over or underload condition.
        */
        verticalRamScaling.setLowerThresholdFunction(this::lowerRamUtilizationThreshold);
        verticalRamScaling.setUpperThresholdFunction(this::upperRamUtilizationThreshold);
        vm.setRamVerticalScaling(verticalRamScaling);
    }
private void createVerticalRamScalingForVm ( Vm vm ) { VerticalVmScaling verticalRamScaling = new VerticalVmScalingSimple ( Ram . class , 0.1 ) ; /* By uncommenting the line below, you will see that instead of gradually
         * increasing or decreasing the RAM, when the scaling object detect
         * the RAM usage is above or below the defined thresholds,
         * it will automatically calculate the amount of RAM to add/remove to
         * move the VM from the over or underload condition.
        */ verticalRamScaling . setLowerThresholdFunction ( this :: lowerRamUtilizationThreshold ) ; verticalRamScaling . setUpperThresholdFunction ( this :: upperRamUtilizationThreshold ) ; vm . setRamVerticalScaling ( verticalRamScaling ) ; }
Creates a {@link VerticalVmScaling} for the RAM of a given VM.
Creates a { @link VerticalVmScaling } for the RAM of a given VM .
//verticalRamScaling.setResourceScaling(new ResourceScalingInstantaneous());