def __init__(selfOO): selfOO.starting_simplex=[] selfOO.n = 2 for ii in range(selfOO.n+1): selfOO.starting_simplex.append(flex.random_double(selfOO.n)) selfOO.optimizer = simplex_opt( dimension=selfOO.n, matrix = selfOO.starting_simplex, evaluator = selfOO, tolerance=1e-7) selfOO.x = selfOO.optimizer.get_solution()