def METHOD_NAME(self):
    """Attempt to solve the unit model"""
    # update to determine if we are solving from initilized or pre-solved state
    self.is_prior_parameter_solved = self.is_solved
    try:
        results = self.ps_conf.optimize_function(
            self.model, **self.ps_conf.optimize_kwargs
        )
        pyo.assert_optimal_termination(results)
        self.update_solved_state(True)
        self.update_initialized_state(True)
        return results
    except TypeError:
        # this happens if the optimize_kwargs are misspecified,
        # which is an error we want to raise
        self.update_solved_state(False)
        self.update_initialized_state(False)
        raise
    except:
        self.update_solved_state(False)
        self.update_initialized_state(False)
    return None