Endogenous separation

Dears,I'm struggling with endogenous separation. Do you know how can I write an endogenous separation that applies when it reaches a given threshold value, namely ρt=F(at_bar)=at_bar where pt is the endogenous separation and at_bar is the cutoff value endogenously determined by the model? Moreover at is the productivity of the worker that follows a Markov process and when at<at_bar then pt takes place. Can you help me? Thank you very much