A bivariate optimal replacement policy for a system subject to a generalized failure and repair process. (4th July 2018)