def add_model_ensemble(self, id, directory, simulation_type, reweight_beta=None, iteration_range=None, 
                           **platform_specific_args):
        '''Add a model ensemble. The id, directory, and iteration_range parameters
           are common to all ensemble types. The platform_specific_args argument is
           a dictionary containing options for the specific platform'''

        if not self.ensembles.has_key(id):
            self.ensembles[id] = {}

        if not self.ensembles[id].has_key("model"):
            self.ensembles[id]["model"] = []

        self.ensembles[id]["model"].append({})
        self.ensembles[id]["model"][-1] = PlatformSelector.get_ensemble(simulation_type, directory, reweight_beta, iteration_range,
                                                                        self.log_level,
                                                                        platform_specific_args)
    def add_target_ensemble(self, id, directory, simulation_type, reweight_beta=None, iteration_range=None,
                            **platform_specific_args):
        '''Add a target ensemble. The id, directory, and iteration_range parameters
           are common to all ensemble types. The platform_specific_args argument is
           a dictionary containing options for the specific platform'''

        if not self.ensembles.has_key(id):
            self.ensembles[id] = {}

        if self.ensembles[id].has_key("target"):
            print "ERROR: Duplicate target ensemble name: ", id
            sys.exit(1)
    
        self.ensembles[id]["target"] = PlatformSelector.get_ensemble(simulation_type, directory, reweight_beta, iteration_range,
                                                                     self.log_level,
                                                                     platform_specific_args)
        self.ensembles[id]["model"] = []