Enhancement of Data Delivery Reliability and Decrease in Energy Consumption Using the Combination of Fuzzy Logic and Optimization Algorithm for WSN