Formulate an LP in general form to determine the amount to be sold and bought each day to maximize total profit. Make sure you have defined your variables clearly.
A warehouse can store up to 100 units of a particular item. In each of the next N days we
need to determine the number of units to sell and then the number of units to buy. Selling
in each day precedes buying so that the maximum amount that can be sold is the initial
inventory at the beginning of the day. The maximum amount that can be bought is limited
by the capacity minus the amount in inventory after selling takes place. Inventory can be
held overnight in the warehouse, provided the total number of units held does not exceed the
warehouse capacity. At the beginning of day 1, before selling takes place, there are 40 units
of inventory in the warehouse. Suppose that pnand cnare the per unit selling and buying
prices, respectively, for each day n = 1, . . . , N . Formulate an LP in general form to determine
the amount to be sold and bought each day to maximize total profit. Make sure you have
defined your variables clearly.
PLEASE provide steps on how you solved so I understand why the answer is what it is
The LP formulation to maximize total profit for the warehouse problem is as follows:
Maximize:
Z = Σ(pn * xn) - Σ(cn * yn)
Subject to:
x1 + y1 + 40 <= 100
x2 + y2 + (x1 - y1) <= 100
.....................
xn + yn + (xn-1 - yn-1) <= 100 (for n = 1, 2, ..., N)
0 <= xn <= xnmax (for n = 1, 2, ..., N)
0 <= yn <= ynmax (for n = 1, 2, ..., N)
where:
xn = number of units sold on day n
yn = number of units bought on day n
pn = per unit selling price on day n
cn = per unit buying price on day n
xnmax = maximum number of units that can be sold on day n
ynmax = maximum number of units that can be bought on day n
The constraints ensure that the amount sold and bought each day do not exceed the maximum and minimum possible values and that the total inventory in the warehouse does not exceed the capacity of 100 units.
Step by step
Solved in 2 steps