Homework 2: Linear Optimization
Homework 2: Linear Optimization
Q1. B&Q makes wo models of tables for its clients. Both models use the same tabletops, but
model A has 4 short (18-inch) legs and model B has 4 longer (30-inch) legs. It takes 0.1 labor
hour to cut and shape a short leg, 0.15 labor hour to do the same for a long leg, and 0.5 labor
hour to produce a table top. An additional 0.3 labor hour is needed to attach the set of legs for
either model after all parts are available.
The profit estimate is $30 for model A and $45 for model B. Plenty of top materials is
on-hand but B&Q wants to decide how to use the available 500 feet of leg stock (1 feet = 12
inches) of leg stock and 80 labor hours to maximize its profit, assuming that everything made
can be sold eventually.
Please formulate a linear programming (LP) model using five decision variables – x1 for the
number of assembled model A, x2 for the number of assembled model B, x3 for the number
of short legs produced, x4 for the number of long legs produced, and x5 for the number of
tabletops produced. Explain your balance constraints. Solve it using Gurobi and Python.
Q2. Please solve the integer programming (IP) problem using Gurobi and Python. Make sure
brief explanations for your solutions are included.
Page 1