The perspective of a bank in granting credits: an optimization model