The need for energy has been aggressively increasing since the industrial revolution. An exponential growth of industrial and residential power use is encountered with the technological revolution. Cogenerated and self produced energy is a solution that allows the reuse of heat produced, decreases transmission investments, and reduces carbon emissions and decreases dependency on energy resource owners. The mass production sites, health centers, big residential sites and more can use the system. In this chapter, the focus is given to industrial autoproducers. Power market balance is based on the day-ahead declarations; therefore, the production is to be planned in detail to avoid penalties. A recurrent Artificial Neural Network model is constructed in order to predict the day ahead energy supply. The model considers energy resource price, demand from multiple sites, production cost, the amount of energy imported from the grid and the amount of energy exported to the grid. In order to achieve the energy production rate with the least error rate possible, an energy demand forecasting model is constructed for a paper producing company, using a Nonlinear Autoregressive Exogenous Model (NARX) network implemented in Matlab. Three parameters of the forecasting model are tuned using the Particle Swarm Optimization (PSO) algorithm: the number of layers, the number of nodes in hidden layers and the number of delays in the network. Error level is measured using the Minimum Absolute Percentage Error between the predictions and the actual output. Results indicate that NARX is an appropriate tool for forecasting energy demand and the algorithm yields better results when the system parameters are tuned.