Runs the optimization using the previously loaded elements.

def run(self):
        """
        Runs the optimization using the previously loaded elements.
        """

        space = self._get_space()
        obj_func = self._get_obj(space)
        model = self._get_model()
        acq = self._get_acquisition(model, space)
        acq_eval = self._get_acq_evaluator(acq)
                
        from ..experiment_design import initial_design
        X_init = initial_design(self.config['initialization']['type'], space, self.config['initialization']['num-eval'])

        from ..methods import ModularBayesianOptimization
        bo = ModularBayesianOptimization(model, space, obj_func, acq, acq_eval, X_init)
                
        bo.run_optimization(max_iter = self.config['resources']['maximum-iterations'], max_time = self.config['resources']['max-run-time'] if self.config['resources']['max-run-time']!="NA" else np.inf,
                              eps = self.config['resources']['tolerance'], verbosity=True)        
        return bo