The non-anytime problem class.

Serves to benchmark a "budgeted" algorithm whose behavior decisively depends on a budget input parameter.

Usage:

# given: suite and observer instances, budget_list, fmin
for index in range(len(suite)):
    with ProblemNonAnytime(suite, observer, index) as problem:
        x0 = problem.initial_solution  # or whatever fmin needs as input
        for budget in sorted(budget_list):
            x = fmin(problem, x0, budget)  # minimize
            problem.delivered(x)  # prepares for next budget also
            if problem.final_target_hit:
                break

Details: This class maintains two problems - one observed and the other unobserved. It switches from unobserved to observed when p_unobserved.evaluations >= p_observed.evaluations.

Method __init__ Undocumented
Method __call__ Undocumented
Method delivered to be called with the solution returned by the solver.
Method reset prepare the problem to be run on the next budget
Method free Undocumented
Method print_progress Undocumented
Method __enter__ Undocumented
Method __exit__ Undocumented
Method final_target_hit Undocumented
Method best_observed_fvalue1 Undocumented
Method random_solution Undocumented
def __init__(self, suite, observer, index):
Undocumented
def __call__(self, x, *args, **kwargs):
Undocumented
def delivered(self, x, *args, **kwargs):

to be called with the solution returned by the solver.

The method records the delivered solution (if necessary) and prepares the problem to be run on the next budget by calling reset.

def reset(self):
prepare the problem to be run on the next budget
def free(self):
Undocumented
def print_progress(self):
Undocumented
def __enter__(self):
Undocumented
def __exit__(self, *args):
Undocumented
@property
def final_target_hit(self):
Undocumented
@property
def best_observed_fvalue1(self):
Undocumented
@property
def random_solution(self):
Undocumented
API Documentation for cocoex, generated by pydoctor at 2020-01-21 17:05:05.