def reset(self, random): if self.trace == 'test': self.load_trace = load_traces(self.trace, self.cache_size, random) self.n_request = len(self.load_trace) self.min_values = np.asarray([1, 0, 0]) self.max_values = np.asarray([self.cache_size, self.cache_size, max(self.load_trace[0])]) self.req = 0
def __init__(self, trace, cache_size): self.trace = trace self.cache_size = cache_size self.load_trace = load_traces(self.trace, self.cache_size, 0) self.n_request = len(self.load_trace) self.cache_size = cache_size self.min_values = np.asarray([1, 0, 0]) self.max_values = np.asarray([self.cache_size, self.cache_size, max(self.load_trace[0])]) self.req = 0
def reset(self): self.load_trace = load_traces(self.trace, self.cache_size) self.n_request = len(self.load_trace) self.min_values = np.asarray([1, 0, 0]) self.max_values = np.asarray( [self.cache_size, self.cache_size, max(self.load_trace[0])]) self.idx = 0 self.req = 0