diff --git a/petab_select/candidate_space.py b/petab_select/candidate_space.py index 3f43293b..555697a5 100644 --- a/petab_select/candidate_space.py +++ b/petab_select/candidate_space.py @@ -92,6 +92,10 @@ def __init__( previous_predecessor_model: Optional[Model] = None, method: Method = None, ): + self.method = method + if self.method is None: + self.method = self.governing_method + self.limit = LimitHandler( current=self.n_accepted, limit=limit, @@ -107,10 +111,6 @@ def __init__( if self.previous_predecessor_model is None: self.previous_predecessor_model = self.predecessor_model - self.method = method - if self.method is None: - self.method = self.governing_method - def write_summary_tsv(self, row): if self.summary_tsv is None: return