Dynamic stability and optimal control of SISqIqRS epidemic network