cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudbus/cloudsim/schedulers/cloudlet/CloudletSchedulerCompletelyFair.java
private int waitingCloudletsComparator(CloudletExecutionInfo c1, CloudletExecutionInfo c2){
        final double vRuntimeDiff = c1.getVirtualRuntime() - c2.getVirtualRuntime();
        final int priorityDiff = c1.getCloudlet().getPriority() - c2.getCloudlet().getPriority();

        if (vRuntimeDiff != 0) {
            return MathUtil.doubleToInt(vRuntimeDiff);
        }

        final int idDiff = c1.getCloudletId() - c2.getCloudletId();
        return priorityDiff == 0 ? idDiff : priorityDiff;
    }
/**
     * A comparator used to ascendingly sort Cloudlets into the waiting list
     * based on their virtual runtime (vruntime or VRT). By this way, the Cloudlets in the beginning
     * of such a list will be that ones which have run the least and have to be
     * prioritized when getting Cloudlets from this list to add to the execution
     * list.
     *
     * @param c1 first Cloudlet to compare
     * @param c2 second Cloudlet to compare
     * @return a negative value if c1 is lower than c2, zero if they are equals,
     * a positive value if c1 is greater than c2
     */
A comparator used to ascendingly sort Cloudlets into the waiting list
based on their virtual runtime (vruntime or VRT). By this way, the Cloudlets in the beginning
of such a list will be that ones which have run the least and have to be
prioritized when getting Cloudlets from this list to add to the execution
list.

@param c1 first Cloudlet to compare
@param c2 second Cloudlet to compare
@return a negative value if c1 is lower than c2, zero if they are equals,
a positive value if c1 is greater than c2
A comparator used to ascendingly sort Cloudlets into the waiting list based on their virtual runtime ( vruntime or VRT ) . By this way the Cloudlets in the beginning of such a list will be that ones which have run the least and have to be prioritized when getting Cloudlets from this list to add to the execution list . @param c1 first Cloudlet to compare @param c2 second Cloudlet to compare @return a negative value if c1 is lower than c2 zero if they are equals a positive value if c1 is greater than c2
private int waitingCloudletsComparator(CloudletExecutionInfo c1, CloudletExecutionInfo c2){
        final double vRuntimeDiff = c1.getVirtualRuntime() - c2.getVirtualRuntime();
        final int priorityDiff = c1.getCloudlet().getPriority() - c2.getCloudlet().getPriority();
        if (vRuntimeDiff != 0) {
            return MathUtil.doubleToInt(vRuntimeDiff);
        }
        final int idDiff = c1.getCloudletId() - c2.getCloudletId();
        return priorityDiff == 0 ? idDiff : priorityDiff;
    }
private int waitingCloudletsComparator ( CloudletExecutionInfo c1 , CloudletExecutionInfo c2 ) { final double vRuntimeDiff = c1 . getVirtualRuntime ( ) - c2 . getVirtualRuntime ( ) ; final int priorityDiff = c1 . getCloudlet ( ) . getPriority ( ) - c2 . getCloudlet ( ) . getPriority ( ) ; if ( vRuntimeDiff != 0 ) { return MathUtil . doubleToInt ( vRuntimeDiff ) ; } final int idDiff = c1 . getCloudletId ( ) - c2 . getCloudletId ( ) ; return priorityDiff == 0 ? idDiff : priorityDiff ; }
A comparator used to ascendingly sort Cloudlets into the waiting list
 based on their virtual runtime (vruntime or VRT).
A comparator used to ascendingly sort Cloudlets into the waiting list based on their virtual runtime ( vruntime or VRT ) .