This paper deals with the modeling of the Food Bank (FB) network in the conditions of uncertainty in the demand of charities and the capacity of donating food. The importance of creating a FB network, along with providing quality food, led to consider the two objective functions of minimizing the costs of the total FB network and maximizing the minimum freshness of the food basket. The simultaneous optimization of the above two objective functions is aimed at making correct routing-inventory and allocation decisions. In this paper, food items in food baskets with high shelf-life and low shelf-life are considered. The results of solving the sample problems by combining the operators of two Genetic Algorithm (GA) and Salp Swarm Algorithm (SSA) showed that with the increase in the freshness of the food baskets, the costs of the FB network have increased. Also, the sensitivity analysis showed that the increase in uncertainty in the network leads to an increase in the cost of FB network and a decrease in the freshness of the food basket. The comparison of the results between the algorithms also showed that the efficiency of HGSSA is much higher than GA and SSA and the problem solving time by these methods is extremely lower. The use of HGSSA has increased the rate of achieving effective solutions by 14.06%.