## 4 Materials and Methods
### Model Formulation  
We developed a model based on the Hub Location Competitive model formulated in [46]. Our model considers that farmers can choose a buyer not only among available hubs' potential locations, but among the demand points to sell their products. In this paper, the probability of a farmer choosing the products' destination is given by the Huffs gravity model that involves population size and distance as the main factors. The original [PERSON]'s formula establishes the probability that a customer selects a market. In this context, we made the reasonable assumptions that the main criteria for market selection are size (i.e., the probability of finding buyers is greater) and distance (i.e., the greater the distance, the more costly and the less familiarity with the market). As such, and according to the [PERSON]'s formula, the probability \(y_{ij^{\prime}}\) that a seller \(i\) select a market \(j^{\prime}\) is given by Equation (1):  
\[y_{ij^{\prime}}=\frac{\frac{\frac{w_{j^{\prime}}^{i}}{d_{ij^{\prime}}^{i}}}{ \sum_{j\in I}\frac{w_{j^{\prime}}^{i}}{d_{ij}^{i}}}}{\forall h\in H;j\in J} \tag{1}\]  
where \(d_{ij^{\prime}}\) is the distance between seller \(i\) and market \(j^{\prime}\), \(w_{j^{\prime}}\) is the size of market \(j^{\prime}\) and \(\gamma\) and \(\delta\) are exponents greater or equal to 0 to be determined. In addition, we used this choice model to determine the quantities to be delivered by a hub to its potential customers. The same rationale can be applied to the hub management when choosing markets to sell their products. It means we use a double selection, one in each echelon of the supply chain. We regarded a set of production points (farmers' locations) \(i\in I\) that have to choose between sending directly to a demand point \(j\in J\) or use an available intermediary (set of hubs) \(h\in H\). The selection is made with a probability \(y_{ih}\) that depends on the distance between the farmer and the hub \(d_{ih}^{\prime}\) or the demand point \(d_{ij}\) and the population size of hub municipality \(\vartheta_{h}\) or demand point city \(w_{j}^{\prime}\). Both factors, distance and population, define corresponding sensitivity exponents \(\gamma\) and \(\delta\), respectively. With the probability variable \(y_{ih}\), we defined the quantities of each product \(k\in K\) to send to each available open hub. The other important aspect that we considered in this model is the selection of transportation vehicles. In the central Colombian case, agricultural products are transported in mainly three types of trucks: Trailer trucks (32 ton), 2-axle (16 ton) trucks, and \"turbo\" trucks (smaller 4.5 ton) trucks. According to the information of the Ministry of Transportation [57], most trucks travel around 50% loaded. For this reason, we set a minimum occupancy of 50% for the larger trucks in our model. Tables 4 and 5 show the definition of sets, parameters, and variables. The objective function is to maximize the hubs' net profit considering a gross profit \(margin_{k}\) for each product, fixed costs of operating a hub \(c_{h}\), fixed \(c_{v}\) and variable \(c_{v}\) costs of transportation, and emission costs of carbon dioxide \(c_{v}^{{}^{\prime}}\). The costs of transportation and emissions are associated with each type of vehicle \(v\in V\). Equation (2) corresponds to the objective function formulation. \[ \begin{split} Max\sum\limits_{k\in K}\sum\limits_{h\in H}\sum \limits_{j\in I}\sum\limits_{v\in V}margin_{k}s^{\prime}_{khjv}-(\sum \limits_{h\in H}c_{h}x_{h}+\sum\limits_{l\in L}\sum\limits_{h\in H}\sum\limits _{j\in I}\sum\limits_{v\in V}c_{v}tuck_{hhjl}+\sum\limits_{k\in K}\sum\limits_ {h\in H}\sum\limits_{j\in I}\sum\limits_{v\in V}c_{v}d_{hjl}s^{\prime}_{khjv} \\ +\sum\limits_{l\in L}\sum\limits_{h\in H}\sum\limits_{j\in I} \sum\limits_{v\in V}c_{v}^{{}^{\prime}}c_{v}d_{hjl}truck_{hjl})\end{split}  \tag{2}\]  
The constraints are defined as follows.