# New Retailing Problem for an Integrated Food Supply Chain in the Baking Industry
## 4 Model Formulation
### Retailer's Total Profit per Unit Time  
The retailer's total profit per replenishment cycle is calculated as follows.  
1. Sales revenue (SR): The sales revenue per replenishment cycle is expressed as \(SR=p_{2}S(Q)\).
2. Ordering cost (OC): The retailer's ordering cost per replenishment cycle is \(OC=A/n\).
3. Purchasing cost (PC): The retailer's purchasing cost per replenishment cycle is \(PC=w^{\prime}Q\).
4. Freight cost (FC): Fixed cost of shipment F, and various transportation costs. Namely, the retailer's freight cost per replenishment is \(FC=F+rQ\).
5. Goodwill cost (GC): Goodwill cost of the retailer is \(GC=g_{r}[D-(\beta-\gamma)(p_{1}+p_{2})\)\(-S(Q)]\).
6. Marginal cost (MC): The retailer's marginal cost per replenishment cycle is \(MC=c_{r}Q\).
7. Holding cost (HC): Based on [PERSON] et al. [59], the retailer's inventory level in a replenishment cycle, the retailer's holding cost is calculated as \(HC=\frac{1}{2}\frac{Q^{2}}{D}\).  
Base on [PERSON] and [PERSON] [29], considering the relationships between retailer and manufacturer, there are three possible cases: (I) Revenue-sharing contract, (II) Buy-back contract, (III) Quantity-flexibility contract.
* Case I: Revenue-sharing contract Under a revenue-sharing contract, a retailer pays a wholesale price for each unit purchased, and a percentage of the revenue the retailer generates. Therefore, the retailer's total profit function is expressed as. \[\begin{array}{ll}TPB(Q)&=SR-OC-PC-FC-GC-MC-HC\\ &=\rho[p_{2}S(Q)-g_{r}(D-(\beta-\gamma)(p_{1}+p_{2})-S(Q))]-\frac{A}{n}-w^{ \prime}Q-(F+rQ)\\ &-\frac{1}{2}\frac{Q^{2}}{D}-c_{r}Q,\end{array}\] (5)
* Case II: Buy-back contract Under the buy-back contract, the manufacturer will buy back any unsold semi-product from the retailer at the end of period. The retailer's total profit function is expressed as. \[\begin{array}{ll}TPB(Q)&=SR-OC-PC-GC-FC-MC-HC\\ &=[p_{2}S(Q)+\beta(Q-S(Q))]-g_{r}[D-(\beta-\gamma)(p_{1}+p_{2})-S(Q)]\\ &-\frac{A}{n}-wQ-(F+rQ)-c_{r}Q-\frac{1}{2}\frac{Q^{2}}{D},\end{array}\] (6)
* Case III: Quantity-flexibility contract Under the quantity-flexibility contract, the retailer agrees to acquire \((1-\delta)Q\) units with the option to restock during the season to optimum quantity points. The agreement constraint is \(\delta\), \(0\leq\delta\leq 1\). With the different types of demand patterns: Demand is higher than the quantity agreed upon the retailer.
* Case 1: \[D-(\beta-\gamma)(p_{1}+p_{2})>(\,1-\delta)Q\]  
\[TPB(Q)\ =p_{2}S(Q)-c_{r}(1-\delta)Q-\frac{A}{n}-w(1-\delta)Q-(F+rQ)-\frac{1}{2} \frac{Q^{2}}{D},\] (7) Demand is higher that the agreed upon quantity but smaller than the optimal quantity.
* Case 2: \[(\,1-\delta)Q<D-(\beta-\gamma)(p_{1}+p_{2})<Q\]  
\[TPB(Q)=p_{2}S(Q)+w[Q-D-(\beta-\gamma)(p_{1}+p_{2})]-c_{r}Q-wQ-\frac{A}{n}-(F+ rQ)-\frac{1}{2}\frac{Q^{2}}{D},\] (8) Demand is higher than the optimum quantity.
* Case 3: \[D-(\beta-\gamma)(p_{1}+p_{2})>Q\]  
\[\begin{array}{ll}TPB(Q)=p_{2}S(Q)-g_{r}[D-(\beta-\gamma)(p_{1}+p_{2})-S(Q)] \\ &-\frac{A}{n}-wQ-(F+rQ)-\frac{1}{2}\frac{Q^{2}}{D}-c_{r}Q,\end{array} \tag{9}\]