Fixed MHOD: first updating windows, then selecting estimates

This commit is contained in:
Anton Beloglazov 2012-11-26 15:59:11 +11:00
parent 022effa50f
commit 4668e2e7c4

View File

@ -118,13 +118,6 @@ 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)
selected_windows = estimation.select_window(
state['variances'],
state['acceptable_variances'],
window_sizes)
p = estimation.select_best_estimates(
state['estimate_windows'],
selected_windows)
state['request_windows'] = estimation.update_request_windows(
state['request_windows'],
@ -144,6 +137,14 @@ 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)
log.debug('MHOD utilization:' + str(utilization))
if len(utilization) >= learning_steps:
state_history = utilization_to_states(state_config, utilization)