def optimize_batch(self, batchsize=10, returns='best', paralell=True):
        if returns not in ('best', 'all'):
            raise ValueError('returns must be either "best" or "all"')
        starts = [np.random.rand(self.m * 2) * 10 for i in range(batchsize)]
        if paralell:
            with Pool() as p:
                results = p.map(self.optimize, starts)
        else:
            results = map(self.optimize, starts)
        results = sorted(results, key=lambda x: x.stress)
        return results if returns == 'all' else results[0]