public class UtilizationModelStochastic extends java.lang.Object implements UtilizationModel
| Constructor and Description |
|---|
UtilizationModelStochastic()
Instantiates a new utilization model stochastic.
|
UtilizationModelStochastic(long seed)
Instantiates a new utilization model stochastic.
|
| Modifier and Type | Method and Description |
|---|---|
protected java.util.Map<java.lang.Double,java.lang.Double> |
getHistory()
Gets the history.
|
java.util.Random |
getRandomGenerator()
Gets the random generator.
|
double |
getUtilization(double time)
Returns utilization in percents according to the time.
|
void |
loadHistory(java.lang.String filename)
Load history.
|
void |
saveHistory(java.lang.String filename)
Save history.
|
protected void |
setHistory(java.util.Map<java.lang.Double,java.lang.Double> history)
Sets the history.
|
void |
setRandomGenerator(java.util.Random randomGenerator)
Sets the random generator.
|
public UtilizationModelStochastic()
public UtilizationModelStochastic(long seed)
seed - the seedpublic double getUtilization(double time)
UtilizationModelgetUtilization in interface UtilizationModeltime - the timeprotected java.util.Map<java.lang.Double,java.lang.Double> getHistory()
protected void setHistory(java.util.Map<java.lang.Double,java.lang.Double> history)
history - the historypublic void saveHistory(java.lang.String filename)
throws java.lang.Exception
filename - the filenamejava.lang.Exception - the exceptionpublic void loadHistory(java.lang.String filename)
throws java.lang.Exception
filename - the filenamejava.lang.Exception - the exceptionpublic void setRandomGenerator(java.util.Random randomGenerator)
randomGenerator - the new random generatorpublic java.util.Random getRandomGenerator()