This article presents a methodology for optimal distributed generation (DG) allocation and sizing in distribution systems, in order to minimize the electrical network losses and keep acceptable voltage profiles. The optimization problem considered equality and inequality constrains, 24 hours power load levels, operational voltage limits, conventional power flow, DG placement with binary variables and sizing of active and reactive power. The optimization problem is solved by mixed integer nonlinear programming (MINPL) using KNITRO solver.