THE PROBLEM
A refinery has 10 million barrels of type A crude and 6 million barrels of Type B crude oil. The refinery has 3 plants to produce gasoline (it produces a profit of 2 USD / barrel) and naphtha (produces a profit of 1 USD / barrel) with the following features:
$$ \begin{array}{|l|l|l|l|l|} & Input & { Input } & { Output } & { Output } \\ \hline \text { plant } & \text { A } & \text { B } & \text { Gasoline } & \text { Naphtha } \\ \hline 1 & 3 & 5 & 4 & 3 \\ \hline 2 & 1 & 1 & 1 & 1 \\ \hline 3 & 5 & 3 & 3 & 4 \\ \hline \end{array} $$
The data in the table above means that for example, if 3 barrels of crude oil type A and 5 barrels of type B crude enter plant 1, you can get 4 barrels of gasoline and 3 barrels of naphtha.
MY SOLUTION:
My approach (which is faulty) does not take into account the proportion of raw materials A and B that get into the 3 plants for its processing (no idea how to do it). Certainly, I was not able to establish the appropriate relation between input and output, consequently, my decision variable does not take into account the proportions that need to be combined to get material into the plants to get the output of the 2 final products.
Thank you for any correction and guide about how to solve this problem
My approach goes as follows:
SETS:
$P=\{1,2,3\}$ is the set of Plants.
$TC=\{A,B\}$ is the set of Crude Types.
$Pro=\{Gasoline, Naphtha\}$ is the set of Products afer processing in each plant.
$Profit=\{Gasoline=2, Naphtha=1\}$ profit for each barrel of each type of Product. PARAMETERS:
$ic_{tc}^{p} \in \mathbb{R}^+$ input coefficient for each crude type $tc$, $\forall tc \in TC$ for plant $p$, $\forall p \in P$
$oc_{pro}^{p,tc} \in \mathbb{R}^+$ is the output coefficient for each type of Product $pro$, $\forall pro \in Pro$ for plant $p$, $\forall p \in P$, for each crude type $tc \in TC$
$Stored_{tc}=\{ 10e^6, 6e^6 \} \in \mathbb{Z}^+$ Barrels inventory of Crude Type $tc$, $ \forall tc \in TC$
$Profit_{pro} \in \mathbb{Z}^+$ is the Profit for each Product $pro$, $\forall pro \in Pro$
DECISION VARIABLE
\begin{align} x_{tc,p}\in \mathbb{Z}^+ , \; \forall tc \in TC,\; \forall p \in P \end{align} Number of crude barrel $tc \in TC$ that is processed at plant $p \in P$
OBJECTIVE FUNCTION \begin{align} \ &\textit{Maximize the profit}\\ & \max \sum_{pro \in PRO \\ p \in P} x_{tc,p} oc_{pro}^{p,tc} Profit_{pro} , \; \\ \textit{S.t:}\\ \\ &* \textit{Relation of input and output:}\\ & \sum_{tc \in TC} x_{tc,p} ce_{tc}^{p} = \sum_{pro \in PRO} y_{pro,p}, \forall p \in P, \tag 1\\ &* \textit{Processing each crude type throughout each plant cannot be greater than the inventory of each crude types}\\ & \sum_{p \in P} x_{A,p} \leq Stored_{A},\tag 2\\ & \sum_{p \in P} x_{B,p} \leq Stored_{B},\tag 3\\ &* \textit{Non-negativity of decision variable}\\ & x_{tc,p} \geq 0, \; \forall tc \in TC, \forall p \in P. \tag 4 \end{align}