## 2 Mathematical Formulation  
This section presents the mathematical formulation employed to define the optimization problem addressed in this study. First, a graphical representation of the MG components is provided. Then, the mathematical models of the objective functions (the minimization of operating costs, power losses, or \(CO_{2}\) emissions, as applicable) are introduced. Additionally, the technical constraints associated with the system components are detailed, with the purpose of providing realistic and feasible solutions.  
Figure 1 presents a simplified schematic of the MG architecture, illustrating the intelligent operation of the WTs considered in this study. The diagram depicts a representative AC MG with five nodes. This grid incorporates WTs equipped with their corresponding power electronic converters, which enable the injection and control of both active and reactive power, as well as loads, distribution lines, and conventional generators, allowing for grid-connected and islanded operation. This configuration facilitates the visualization of the main components involved in our intelligent energy management strategy and its corresponding mathematical model, as it considers the steady-state operation of the MG. This includes the main grid or the diesel generator at the reference node (i.e., the slack node), the loads, and the WTs, as well as the most relevant operational constraints (i.e., voltage and current limits, generation capacities, and converter ratings). The figure identifies the system's key variables and their interactions within an optimized operation framework aimed at minimizing three fundamental objective functions: operating costs, energy losses, and \(CO_{2}\) emissions. These functions are modeled independently to allow for flexible selection by the system operator, and they are analyzed in the context of an intelligent generator management strategy that ensures efficient operation within the permitted technical limits.  
The three objective functions adopted in this study represent essential performance criteria from economic, technical, and environmental perspectives. Rather than applyinga multi-objective optimization scheme with weighted aggregation, the proposed methodology follows a flexible single-objective formulation in which each objective is independently defined and optimized. This design allows microgrid operators to prioritize specific goals--such as cost minimization, energy efficiency improvement, or CO\({}_{2}\) emissions reduction--based on real-time operational needs or strategic requirements. Such flexibility reflects practical microgrid operation, where priorities may shift over time due to varying constraints, regulations, or energy policies [35].  
This formulation enhances the practical applicability of the proposed approach, enabling tailored decision-making in both grid-connected and islanded modes. Additionally, it guarantees a technically sound and efficient dispatch of both active and reactive power from wind-based distributed generation in alignment with the selected operational criterion. The objective functions and constraints used to formulate the optimization problem are described in the following sections.