## 2 Minlp Formulation
### Set of Constraints  
The set of constraints on the optimal location and sizing of power sources in DC distribution networks are as follows: power balance at each node, voltage regulation bounds, and device and element capacities. Each one of these constraints is described below:  
\[p_{i}^{s}+p_{i}^{dg}-p_{i}^{d}=v_{i}\sum_{j\in\mathcal{N}}G_{ij}v_{i}v_{j},\ \forall i\in\mathcal{N} \tag{2}\]  
\[p_{km}=g_{km}v_{k}\left(v_{k}-v_{m}\right),\ \forall km\in\mathcal{L} \tag{3}\]  
\[p_{km}^{\min}\leq p_{km}\leq p_{km}^{\max},\ \forall km\in\mathcal{L} \tag{4}\]  
\[v^{\min}\leq v_{i}\leq v^{\max},\ \forall i\in\mathcal{N} \tag{5}\]  
\[\sum_{i\in\mathcal{N}}y_{i}\leq N_{gd}^{\max}, \tag{6}\]  
\[0\leq p_{i}^{dg}\leq y_{i}p_{i}^{\max},\ \forall i\in\mathcal{N} \tag{7}\]  
\[0\leq p_{i}^{s}\leq p_{i}^{s,\max},\ \forall i\in\mathcal{N} \tag{8}\]  
\[y_{i}\in\left\{0,1\right\},\ \forall i\in\mathcal{N} \tag{9}\]  
where \(p_{i}^{s}\) represents the power injected by the slack node connected at node \(i\), \(p_{i}^{dg}\) represents the amount of power generated by the distributed source connected at node \(i\), and \(p_{i}^{d}\) represents the total power consumption at the same node. \(p_{km}\) represents the total power flow on the line that connects nodes \(k\) and \(m\), which has a conductive parameter \(g_{km}\). \(p_{km}^{\max}\) and \(p_{km}^{\min}\) represent the maximum and minimum power flow bounds allowed in the line that connects nodes \(k\) and \(m\), respectively. \(v^{\min}\) and \(v^{\max}\) represent the minimum and maximum voltage bounds allowed for the voltage variables in all the nodes. \(y_{i}\) stands for the binary variable that defines whether a DG is located \((y_{i}=1)\) or not \((y_{i}=0)\) at node \(i\). \(N_{gd}^{\max}\) represents the total number of DGs available for installation in the DC network. \(p_{i}^{\max}\) and \(p_{i}^{s,\max}\) represent the maximum capabilities of power injection of the DG and the slack source connected at node \(i\), respectively. The complete mathematical formulation presented from (1) to (9) is completely described below: Equation (1) defines the objective function value that corresponds to a technical measure related to the minimization of grid power losses. Equation (2) defines the power balance equilibrium at each node of the network. In Equation (3), the power flow at each line of the network is calculated as a function of the voltage difference between the sending and receiving nodes of the line and its conductance. Equations (4) and (5) are box-type constraints that bound the power flows of all the lines and voltage profiles in all the nodes. The inequality constraint (6) determines the availability of distributed generators inside the DC grid. Equation (7) determines the power generation capabilities of a DG connected at node \(i\); the inequality constraint (8) defines the lower and upper bounds of the power injection in a slack source, and Equation (9) presents the binary nature of the decision variable regarding the location (or not) of a DG in the DC network. **Remark 2**. : _The optimal location and sizing of distributed generators in DC networks is indeed a nonlinear, non-convex optimization problem due to the following:_ (i) _the presence of binary variables associated with the location problem, and_ (ii) _the power balance and line power flow constraints that contain products between voltages, i.e., nonlinear quadratic equality constraints._  
Due to the binary and nonlinear constraints of the model (1)-(9), this model corresponds with an MINLP formulation, with the main characteristics presented in Figure 1.  
Note that from the mathematical structure depicted in Figure 1, the main complication of the model is given by the power balance and power flow constraints (2) and (3), as these are nonlinear equality constraints; however, as these only contain products among variables, it is possible to make them into a convex formulation via semidefinite programming.