# Modeling with Linear Programming

Here is the scenario;

Let's say that a wholesaler have a storage with the capacity of $75,000$ $m^3$. The stock of corn at the beginning of the year is $15.000$ $m^3$ and the working capital is $25,000$ USD. The regulation says that they cannot sell the corn bought in a particular month right away, it can only be sold in the next month. The revenue from selling the corn in a particular month can be used to purchase corn in the same month. Furthermore, they need to have at least $21,000$ $m^3$ corn at the end of March.

The estimated sales and purchase in the next 3 months are : Determine the purchases and sales policy for the next 3 months that contains the relationship between sales, purchases and stock level to maximize the working capital.

So my attempt is to choose the decision variables, which are the quantity of purchased corn, and the quantity of the corn for sale.

The parameters are the storage capacity, available working capital, initial corn stock, revenue each month, and the number of money spent each month to purchase some corn.

Is there anything missing here? I couldn't decide the constrains and determine the model. Could anyone please tell me how should I tackle this problem? I would appreciate any help!

It sounds good.

The variables are:

$r_i$=revenue in month i

$s_i$=stock in month i

$x_i$=purchased amount of corn

$y_i$=saled amount of corn

The stocks are

$15,000+x_1-y_1=s_1$

$s_1+x_2-y_2=s_2$

$s_2+x_3-y_3=s_3$

The stocks have to be smaller or equal to 75.000

$s_1\leq 75,000$

$s_2\leq 75,000$

$s_3\leq 75,000$

And additionally $s_3 \geq 21,000$

The purchased corn in month $i$ can only be sold in month $i+1$

$y_1\leq 15,000$

$y_2\leq x_1$

$y_3\leq x_2$

The balances in every month should be non-negative. Oherwise a working capital wouldn´t be necessary.

$25,000+31y_1-28x_1=b_1$

$b_1+32y_2-30x_2 =b_2$

$b_2+29.5y_3-29.0x_3=b_3$

$b_1,b_2,b_3 \geq 0$

The other variables have to be non-negative, too.

$x_i,y_i,r_i,s_i\geq 0 \ \forall \ i \in \{1,2,3 \}$

At last you have to add the obective function.

• in this case, what are the decision variables do you suggest? – FarahFai Nov 21 '14 at 12:21
• $x_i,y_i$ are the decision variables if you want. But the others are variables, too. They are not parameters. – callculus Nov 21 '14 at 12:27
• I got confused about the decision variables and parameters. So let me make things clear. The decision variables are the unknown that can be computed from what is given. Hence, in this case the decision variables are : $x_{i}$ and $y_{i}$. But what about the $r_{i}$ and $s_{i}$? are they belong to the parameter? – FarahFai Nov 21 '14 at 12:36
• No. $r_i$ and $s_i$ are variables, too. The values of these variables are calculated by the model. They depend on $x_i$ and $y_i$. For example, if $x_1=1000$ and $y_1=2000$, then $s_1$ become $14,000$. Thus $r_i$ and $s_i$ are not given. The values of the sales prices are parameters. – callculus Nov 21 '14 at 12:42
• But then how am I supposed to construct the objective function with 4 variables, to maximize the working capital? – FarahFai Nov 21 '14 at 12:48