Branch and Bound Method solve this problem using the branch

Branch and Bound Method

solve this problem using the branch and bound method (show graphically)

A glassblower makes glass decanters and glass trays on a weekly basis. Each item requires 1 pound of glass, and the glassblower has 15 pounds of glass available every week. A glass decanter requires 4 hours of labor, a glass tray requires only 1 hour of labor, and the glassblower works 25 hours a week. The profit from a decanter is $50, and the profit from a tray is $10. The glassblower wants to determine the total number of decanters (X1) and trays (x2) that he needs to produce in order to maximize his profit.

Solution

#include <iostream>
using namespace std;

int main()
{
    int dn = 0;
    int tn = 0;
   
    int x1 = 0;
    int x2 = 0;
    int profit = 0;
   
    for(int i = 1; i <= 15; i++)
           {
               dn = i;
               tn = 15 - i;
               if((dn*4 + tn) > 25)
                   continue;
                   
               if((dn*50 + tn*10) > profit)
                   {
                   profit = dn*50 + tn*10;
                   x1 = dn;
                   x2 = tn;
                   }
           }
    cout << \"Decanters: \" << x1 <<endl << \"Trays: \" << x2 << endl;
    cout << \"Profit: \" << profit<< endl << endl;
   
    system(\"pause\");
    return 0;
}

**3 Decanter, 12 Trays, $270**

Branch and Bound Method solve this problem using the branch and bound method (show graphically) A glassblower makes glass decanters and glass trays on a weekly

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site