cloudsim-plus-master/cloudsim-plus-master/cloudsim-plus/src/main/java/org/cloudsimplus/faultinjection/HostFaultInjection.java
private int randomNumberOfFailedPes() {
        /*the random generator return values from [0 to 1]
         and multiplying by the number of PEs we get a number between
         0 and number of PEs*/
        return (int) (random.sample() * lastFailedHost.getWorkingPeList().size()) + 1;
    }
/**
     * Randomly generates a number of PEs which will fail for the datacenter.
     * The minimum number of PEs to fail is 1.
     *
     * @return the generated number of failed PEs for the datacenter,
     * between [1 and Number of PEs].
     */
Randomly generates a number of PEs which will fail for the datacenter.
The minimum number of PEs to fail is 1.

@return the generated number of failed PEs for the datacenter,
between [1 and Number of PEs].
Randomly generates a number of PEs which will fail for the datacenter . The minimum number of PEs to fail is 1 . @return the generated number of failed PEs for the datacenter between [ 1 and Number of PEs ] .
private int randomNumberOfFailedPes() {
        /*the random generator return values from [0 to 1]
         and multiplying by the number of PEs we get a number between
         0 and number of PEs*/
        return (int) (random.sample() * lastFailedHost.getWorkingPeList().size()) + 1;
    }
private int randomNumberOfFailedPes ( ) { /*the random generator return values from [0 to 1]
         and multiplying by the number of PEs we get a number between
         0 and number of PEs*/ return ( int ) ( random . sample ( ) * lastFailedHost . getWorkingPeList ( ) . size ( ) ) + 1 ; }
Randomly generates a number of PEs which will fail for the datacenter.
Randomly generates a number of PEs which will fail for the datacenter .