Providing energy to areas isolated from the electricity grid through the use of a smart integrated renewable energy system (SIRES) is based on the Agenda 2030 for Sustainable Development, specifically Goal 7, according to the United Nations (UN). This study analyzes the process of identifying the appropriate size of a SIRES considering technical and economic factors (cost of energy-COE). An optimization integer linear programming model proposed was used, and a subsequent spatial-temporal analysis of the different variables was conducted. The model comprises locally available renewable energy resources, such as biomass, biogas, wind power, solar photovoltaic, and thermal power. Furthermore, it could be used to determine the energy potential of each of the isolated villages, identifying those areas in which the SIRES could be implemented as a sustainable and economical solution. The design simulates the cost of the initial investment and energy generation in the chosen village. The study also includes the study case in the region of Valparaiso, Chile. Different scenarios were used to optimize the available resources and minimize the COE generation.