The future smart energy systems are projected to be decentralized power networks, each consisting of various types of renewable power generators that serve a small group of energy users. Interaction between different power networks through energy trading over a marketplace provides the chance to fully utilize the capacity of each power generator type. As a result of this interaction, the power generation and distribution levels can be decided for each time slot in order to achieve a maximal utility. In this paper, an electricity trade model is introduced for decentralized power networks to deal with the utility maximization problem. In the proposed model, multiple power networks can trade among each other and thus each of them can achieve a utility increase from making use of its comparative advantage on power generation during a certain period of time. The model is studied from several special scenarios to a more general scenario and an efficient solution is presented for each scenario. Experimental result validates the accuracy and efficiency of the presented solutions.