Use of an optimality model to solve the immunological puzzle of concomitant infection