## 1 Introduction  
Cogeneration of useful energy in the form of electricity, heating, and cooling has led to the development of combined heat and power (CHP) systems. These systems are available in different capacities, in order to fulfill a range of industrial, commercial, and residential purposes. To improve energy security, availability, and efficiency, the possibility of developing decentralized, autonomous energy systems has been considered in numerous studies [1; 2; 3; 4]. Cogeneration plants usually emphasize on the production of electricity with the highest possible efficiency, while useful heating and cooling can be generated through heat recovery of the flue gas extracted from an electric generator (turbomachinery, fuel cells, etc.). It is also possible and desirable to generate electricity via renewable energy sources (RES), since RES-based systems typically offer production of electricity at zero emissions. A promising RES is solar photovoltaic (PV) technology, especially when applied in areas with high solar radiation [5; 6]. However, its main drawback is the mismatch between electricity supply and demand [7; 8]. Storage of electricity is possible via batteries, for example, but it can be problematic due to the high capital cost, short lifetime, limited capacity, and energy losses of energy storage devices [9; 10].  
The development of a decentralized energy system (which operates autonomously, without a connection to a central power grid) requires continuous and uninterrupted power generation and energy supply to the serviced buildings. Therefore, a RES-based system for commercial use would be very difficult to realize without an additional conventional or alternative power generator (e.g. a gas turbine, gas engine, or fuel cells). Several options have been proposed that combine PVs with natural gas-fueled systems. [PERSON] et al. [11] investigated the development of a hybrid PV-solid oxide fuel cell (SOFC)-CHP system for residential application. In this configuration, excess electricity generation from the PV was used for hydrogen generation via a solid oxide electrolyzer cell (SOEC), which operates at the opposite principle of the SOFC [12]. When power generation from the PV is unavailable, the accumulated hydrogen is used to fuel the fuel cell stack. The system is coupled to a heat recovery unit, which provides heating and cooling (via an absorption chiller unit) to the buildings. [PERSON] et al. [13] developed a novel approach that incorporated the predicted renewable energy and load consumption in the power flow management of a stand-alone hybrid RES. The system included the following components: PV, wind turbine, and fuel cell. The authors used stochastic models and propagating wind speed, solar irradiance uncertainties within the system, and developed a new fuzzy logic controller. It was concluded that the integration of power prediction and its uncertainty can improve results more effectively than a conventional optimization methodology. [PERSON] et al. [14] studied various stand-alone PV configurations using different energy storage technologies. These included PVs, fuel cells, electrolyzers, compressors, hydrogen tanks, and batteries. Based on the results of the study, it was concluded that the proposed PV-fuel cell-battery system is the most promising one, with the lowest cost and highest efficiency, in comparison to the other configurations.  
In the current research study, the authors apply a thermoeconomic optimization strategy to their previously developed PV-SOFC system [15]. The hybrid system is optimized in terms of lifecycle cost (LCC) minimization, using a genetic algorithm approach. The applied methodology aims to reduce the LCC at a level that will increase the market potential of the proposed configuration. The system modeling and optimization methodology is described and applied to the simulation model.