Electrification of villages from the main grid leads to large investments and losses, and this forms the basis of decentralized Hybrid Energy System. In order to evaluate the techno-economic performance of hybrid energy system for remote rural area electrification, a mixed integer linear mathematical programming model (time-series) has been developed to determine the optimal operation, optimal configuration including the assessment of the economic penetration levels of photovoltaic array area, and cost optimization for a hybrid energy generation system consisting of small/micro hydro based power generation, biogas based power generation, biomass (fuelwood) based power generation, photovoltaic array, a battery bank and a fossil fuel generator. An optimum control algorithm written in C++, based on combined dispatch strategy, allowing easy handling of the models and data of hybrid energy system components is presented. A special feature of the proposed model is that a cost constant (cost/unit) for each of the proposed resource is introduced in the cost objective function in such a way that resources with lesser unit cost share the greater of the total energy demand in an attempt to optimize the objective function. To demonstrate the use of model and algorithm, a case study for a rural remote area is also presented.