Searching For Figured Lathe ? Limited Offers Below
![]() |
For More Well Priced, Quality Figured Lathe Scroll Down Now
Please help me with Alg 2 - Linear Programming?
I have the variables and the objective function for this problem below … but somehow I got stuck and got confused, so I can’t figure out what the constraint are. Please help me out.
Superbats Inc. Manufactures two different quality wood baseball bats : the Wallbanger and the Dingbat. The Wallbanger takes 8hrs to trim and turn on a lathe and 2hrs to finish it. It gives the company a profit of $17 per bat. The Dingbat yields a profit of $29 but takes 5hrs to trim and turn on a lathe 5hrs to finish. The total time per day available for finishing is 50hrs; the total time per day for trimming and lathing is 80hrs. How many of each type of bat should be produce to give the company maximum profits.
For my var’s, I have X = Wallbanger and Y = Dingbat
For my Objective Function, I have P(X,Y) = 17x + 29y
…
Thanks for the help :]
You can make a maximum of 8 of either bat, as the total time for trimming and finishish is 10 hrs each, and the total amount of time is 80hrs.
So to find the maximum, I would make a variable to hold the values for x and y and the profit.
int xMax;
int yMax;
int profit;
Set the xMax to 8, the yMax to 0 and the profit to 17 * 8 + 0.
Now, do a nested loop to find the profit and see if it is more than what you have currently set.
int currentProfit;
for (int i = 1; i <= 8; i++)
{
for (int j = 0; j <= 8 - i; j++)
{
currentProfit = 17* i + 28 * j;
if (currentPriofit > profit)
{
xMax = i;
yMax = j;
profit = currentProfit;
}
}
}
Hope that helps you out in someway.
![]() |


US $9.99



















