The Perspective of a Bank in Granting Credits: an Optimization Model