UtilizationModelStochastic (cloudsim 3.1-SNAPSHOT API)

org.cloudbus.cloudsim

## Class UtilizationModelStochastic

- java.lang.Object
- - org.cloudbus.cloudsim.UtilizationModelStochastic

- All Implemented Interfaces:
    UtilizationModel

      public class UtilizationModelStochastic
      extends Object
      implements UtilizationModel

  The UtilizationModelStochastic class implements a model, according to which a Cloudlet generates random CPU utilization every time frame.
  Since:
    CloudSim Toolkit 2.0
  Author:
    Anton Beloglazov

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `UtilizationModelStochastic()` Instantiates a new utilization model stochastic.
    `UtilizationModelStochastic(long seed)` Instantiates a new utilization model stochastic.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected Map<Double,Double>` | `getHistory()` Gets the history.
    `Random` | `getRandomGenerator()` Gets the random generator.
    `double` | `getUtilization(double time)` Returns utilization in percents according to the time.
    `void` | `loadHistory(String filename)` Load history.
    `void` | `saveHistory(String filename)` Save history.
    `protected void` | `setHistory(Map<Double,Double> history)` Sets the history.
    `void` | `setRandomGenerator(Random randomGenerator)` Sets the random generator.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### UtilizationModelStochastic

          public UtilizationModelStochastic()

      Instantiates a new utilization model stochastic.

    - #### UtilizationModelStochastic

          public UtilizationModelStochastic(long seed)

      Instantiates a new utilization model stochastic.
      Parameters:
        `seed` - the seed

  - ### Method Detail

    - #### getUtilization

          public double getUtilization(double time)

      Description copied from interface: `UtilizationModel`
      Returns utilization in percents according to the time.
      Specified by:
        `getUtilization` in interface `UtilizationModel`
      Parameters:
        `time` - the time
      Returns:
        utilization percentage

    - #### getHistory

          protected Map<Double,Double> getHistory()

      Gets the history.
      Returns:
        the history

    - #### setHistory

          protected void setHistory(Map<Double,Double> history)

      Sets the history.
      Parameters:
        `history` - the history

    - #### saveHistory

          public void saveHistory(String filename)
                           throws Exception

      Save history.
      Parameters:
        `filename` - the filename
      Throws:
        `Exception` - the exception

    - #### loadHistory

          public void loadHistory(String filename)
                           throws Exception

      Load history.
      Parameters:
        `filename` - the filename
      Throws:
        `Exception` - the exception

    - #### setRandomGenerator

          public void setRandomGenerator(Random randomGenerator)

      Sets the random generator.
      Parameters:
        `randomGenerator` - the new random generator

    - #### getRandomGenerator

          public Random getRandomGenerator()

      Gets the random generator.
      Returns:
        the random generator

Copyright © 2013 The Cloud Computing and Distributed Systems (CLOUDS) Laboratory, The University of Melbourne. All Rights Reserved.