/** * Load an utilization history from a file. * * @param filename the filename * @throws Exception the exception */ @SuppressWarnings("unchecked") public void loadHistory(String filename) throws Exception { FileInputStream fis = new FileInputStream(filename); ObjectInputStream ois = new ObjectInputStream(fis); setHistory((Map<Double, Double>) ois.readObject()); ois.close(); }
/** * Instantiates a new utilization model stochastic. * * @param seed the seed */ public UtilizationModelStochastic(long seed) { setHistory(new HashMap<Double, Double>()); setRandomGenerator(new Random(seed)); }
/** * Instantiates a new utilization model stochastic. */ public UtilizationModelStochastic() { setHistory(new HashMap<Double, Double>()); setRandomGenerator(new Random()); }