This paper presents a method to model the distributed generation (DG) and proposes a novel methodology for managing DG units operation in an isolated microgrid. DG could be utilized in an islanded microgrid; this topology by decreasing the connection of the microgrid to unforeseen networks could improve network reliability and guaranteed securely power supply to the burdens. Security requirement in a specific grid could cause inattention to economic aspects of the network; in this paper to consider costs, first the system has been modeled in an accurate way. Power production, efficiency, fuel consumption and economic characteristics of each DG considered in this model. A number of notable and popular DG technologies such as wind power, photovoltaic, micro turbine, fuel cell and diesel generators are modeled and utilize to model an isolated power system. An optimal network management could be achieved only by considering economic characteristics, a novel evolutionary algorithm known as bacterial foraging algorithm (BFA) has been applied to minimize the defined cost function by considering network and customers (load) limitations. The proposed method has applied to an isolated microgrid. In comparison with pervious works it shows better results in reducing daily power generation and costs.