**6. Conclusions**

The presented framework for optimal allocation and power management of DGs emphasizes the importance of the resolution of the input data that needs to be considered during the optimization process. The proposed estimation of the controllable DG output by the ANN significantly decreases the number of the decision variables in the optimization problem, especially in the case of the high input data resolution. The results obtained for the case study indicate that knowing the hourly input data can be used to successfully tune the optimal model, which can be used later with increased input data resolution (15 min data).

This research study, compared to the existing literature, investigates the problem of the optimal allocation and power management of DG, makes contributions considering all three aspects of the problem detected in the Introduction section (load and DGs variable profile, co-simulation approach, and simultaneous consideration of the optimal allocation and power management of DGs). As stated in the Introduction section, there are a few research papers that consider these three problem aspects, simultaneously. Only (considering here the reviewed literature) in [20] did the authors apply variable profiles of load and DG production, external software for the calculation of the objective values, and variable DG power factor (optimized for optimal allocation determined in advance) to manage the DG output. Unlike the existing literature on the topic, the research presented here dealt with simultaneous optimization of the DG allocation and power management, considering the yearly (with hourly resolution) load and DG production profiles, using a co-simulation approach. Besides this, the research proposed the application of ANN to manage DG outputs, which significantly decreases the number of decision variables that appear when yearly profiles are used.

The presented solution framework shows that it is possible to optimize the allocation and variable power outputs of DGs simultaneously in the case of high resolution input data. The high resolution of input data over a long time span (a year) produces a very high number of decision variables that need to be optimized. The demonstrated application of the ANN makes it possible to significantly decrease the number of decision variables with simultaneous consideration of the optimal allocation and power management of the DGs. For successful optimization of the DG power factor management, additional investigations of the procedures are required, which will be included in the optimization process simultaneously with the here-applied problem aspects.

**Author Contributions:** Conceptualization, M.B. and T.V.; methodology, T.V., M.B. and T.B.; software, V.J.Š., M.B. and T.V.; validation, T.V. and V.J.Š.; formal analysis, T.B. and V.J.Š.; writing—original draft preparation, M.B.; writing—review and editing V.J.Š., T.V., T.B. and M.B.; project administration, M.B. and funding acquisition, M.B. All authors have read and agreed to the published version of the manuscript.

**Funding:** This work was supported in part by the Croatian Science Foundation under the project number UIP-05-2017-8572.

**Data Availability Statement:** The data used and obtained in this study are available on https://drive. google.com/drive/folders/1QUFNBe1DykyVcmEboLFENeoW3bhfPGrx?usp=sharing (accessed on 12 March 2021).

**Conflicts of Interest:** The authors declare no conflict of interest. The founders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.