This paper introduces a hybrid strategy for an ideal operation programming of electrical frameworks through minimization of production cost and in addition better usage of renewable energy resources. The hybrid technique is the combined performance of bacterial foraging optimization algorithm (BFOA) and artificial neural network (ANN) technique. Here, the photovoltaic (PV) system, wind turbine (WT) and storage system are considered in micro gird (MG) system. The proposed control strategy is to manage the power flows between the energy sources and the grid. To achieve this point, demand response (DR), customer response, offer priority, DR magnitude, duration, and minimum cost of energy (COE) is determined. The proposed method is implemented in MATLAB/Simulink working platform and compared with the exiting methods such as, genetic algorithm (GA) and artificial bee colony algorithm (ABC) respectively. In the proposed method, the maximum generated power of PV, WT, MT and battery is 7.5kW, 9kW, 15.5kW and 4.5kW respectively. By using GA, the generated powers are 5.5kW, 7.5kW, 11kW and 3.5kW respectively. The SOC of the proposed method is analyzed and is about 80%. The proposed method has less cost effective based on their load demand.