Autonomous polygeneration microgrids (APM) are a relatively new approach in covering specific needs like power, potable water and fuel for transportation, in remote areas. This approach has been proved to be technically feasible nowadays and even present itself as an economically viable investment. The initial management system built for this approach is a simple ON/OFF supervisor which can make the APM operate, but not in an optimal way. The devices cannot be operated in part load and as a consequence there is little room for optimization. A combined fuzzy cognitive maps (FCMs)–petri nets (PN) approach has been developed for the energy management of such a system. The PN is used as an activator in the fuzzy cognitive map structure so as to enable different FCMs to be activated depending on the state of the microgrid. This combination forms an integrated approach to the energy management of the microgrid. Using this approach considerable optimization in the design and operation of the microgrid is possible. A methodology for simultaneous and interactive optimization of the energy management system along with the sizing of the various devices of the actual microgrid is implemented. A software platform consisting of TRNSYS, TRNOPT and GenOPT software packages was used for simulation and optimization. Particle swarm optimization is applied both for the sizing of the system and the optimization of the FCM weights and PN parameters. Two microgrids were designed, one based on the FCM–PN energy management system (FPEMS) and one on the ON/OFF approach. The results show that FPEMS manages the energy flows more effectively throughout the year which leads to a considerable decrease in the sizing of the various components of the microgrid.