## 1 Introduction
In fact, adoption of micro-grids in rural areas for providing access to electricity [7] is a subject greatly explored in scientific literature [15; 16; 17; 18; 19; 20; 21; 22; 23; 24] and that is becoming a more frequently adopted solution in development projects both financed privately or by international organizations [25; 26]. Nevertheless, projects regarding access to energy in off-grid villages usually tend to focus solely on the provision of electric energy for powering simple appliances, thus neglecting other energy needs--such as cooking, space heating and water heating--that are not traditionally satisfied by electricity and that require significantly higher amounts of energy [3; 14]. The need for appropriate modeling for the vital purposes of planning and analysis of energy systems comes naturally with the rapid development of technologies and policies [27]. In particular, developing countries request an entirely different approach with respect to industrialized regions when modeling residential energy consumption. First, the socio-economic factors that are driving residential energy use, such as income and household size, are more heterogeneous in developing countries rather than in industrialized ones. Secondly, the future demand profile is affected by different factors and, in developing countries, it is more likely to evolve due to both the ongoing household electrification process and the transition from basic to modern appliances. Thirdly, in developing countries the relationship between economic monetary data and energy data is less obvious as a result of data quality, but also due to the role of the informal economy. Current energy models rarely consider these factors [28]. Despite the abundance of tools for modeling and optimizing off-grid systems, the large majority of them do not allow for an MES perspective, and even when some non-electric energy technologies and loads are allowed, only a restricted and pre-defined set of options is available. This is also owing to the lack of adequate modeling tools allowing the comprehensive analysis of multi-energy vectors and storage options at a village scale. In fact, modeling thermal energy systems for village-scale off-grid contexts requires an increasing effort, in terms of: (i) higher temporal resolution of load curves that may include cooking, space heating, and water heating activities [29]; and (ii) higher spatial resolution and necessity to include topographic constraints for most energy conversion technologies, in the absence of centralized heat distribution networks [3]. Such barriers are exacerbated by the fact that most of these tools are released as closed-source, non-modifiable software, preventing adaptability to the context and to users' needs, as well as repeatability [30]. This is the case, for example, of the widespread tools HOMER Energy [31], DER-CAM [32], and iHOGA [33; 34]. Although these software tools are widely used, as they have the maximum combination of renewable energy systems and perform optimization and sensitivity analysis for off-grid energy systems, they still present strong limitations on control methods, load demand management, and economic planning [21]. Exploration of multi-energy isolated systems has been conducted by [PERSON] et al. [35; 36; 37], who explore energy management of autonomous \"polygeneration microgrids\", which highlight the economical convenience of adopting these kinds of integrated supply system. As a response to the lack of open-source models for off-grid energy systems optimization, [PERSON] et al. recently released the open-source MicroGridsPy, a Python-based modeling framework conceived for the optimization of hybrid electric micro-grids [16]. In this study, we expand MicroGridsPy by integrating it with a novel complementary high-resolution thermal energy system model, including thermal energy conversion technologies, storage options, and back-up systems.