Tested the MHOD algorithm using the generated test case data
This commit is contained in:
parent
2a99a92207
commit
76b9bb4b1b
@ -125,6 +125,19 @@ def mhod(state_config, otf, window_sizes, bruteforce_step, learning_steps,
|
||||
total_time = len(utilization)
|
||||
state_vector = build_state_vector(state_config, utilization)
|
||||
current_state = get_current_state(state_vector)
|
||||
state['state_history'].append(current_state)
|
||||
|
||||
selected_windows = estimation.select_window(
|
||||
state['variances'],
|
||||
state['acceptable_variances'],
|
||||
window_sizes)
|
||||
p = estimation.select_best_estimates(
|
||||
state['estimate_windows'],
|
||||
selected_windows)
|
||||
|
||||
# These two are saved for testing purposes
|
||||
state['selected_windows'] = selected_windows
|
||||
state['p'] = p
|
||||
|
||||
state['request_windows'] = estimation.update_request_windows(
|
||||
state['request_windows'],
|
||||
@ -144,22 +157,9 @@ def mhod(state_config, otf, window_sizes, bruteforce_step, learning_steps,
|
||||
state['previous_state'])
|
||||
state['previous_state'] = current_state
|
||||
|
||||
selected_windows = estimation.select_window(
|
||||
state['variances'],
|
||||
state['acceptable_variances'],
|
||||
window_sizes)
|
||||
p = estimation.select_best_estimates(
|
||||
state['estimate_windows'],
|
||||
selected_windows)
|
||||
|
||||
# These two are saved for testing purposes
|
||||
state['selected_windows'] = selected_windows
|
||||
state['p'] = p
|
||||
|
||||
log.debug('MHOD utilization:' + str(utilization))
|
||||
if len(utilization) >= learning_steps:
|
||||
#state_history = utilization_to_states(state_config, utilization)
|
||||
state['state_history'].append(current_state)
|
||||
time_in_states = total_time
|
||||
time_in_state_n = get_time_in_state_n(state_config, state['state_history'])
|
||||
# These two are saved for testing purposes
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
x
Reference in New Issue
Block a user