Question

In: Computer Science

Solve the linear program below with python. OBJECTIVE FUNCTION:: Maximize Contribution Z=40X+26Y+66Z CONSTRAINTS: Cutting Capacity =1800min....

Solve the linear program below with python.

OBJECTIVE FUNCTION::

Maximize Contribution Z=40X+26Y+66Z

CONSTRAINTS:

Cutting Capacity =1800min.

4X+8Y+4Z< or =1800

Stitching Capacity =2100 min

6X+6Y+4Z< or=2100

Pressing Capacity=1500 min.

6X+8Y+6Z< or =1500

Maximize : Z=40X+26Y+66Z

Constraints:

4X+8Y+4Z< or =1800

6X+6Y+4Z< or=2100

6X+8Y+6Z< or =1500

Solutions

Expert Solution

import numpy as np
A = np.array([[4, 8, 4], [6, 6, 4], [6, 8, 6]])#array A as a 3 by 3 array of the coefficients
b = np.array([1800, 2100, 1500])#array b as the right-hand side of the equations
r = np.linalg.solve(A, b)#Solve for the values of x, y and z using np.linalg.solve(A, b)
print("The result set is",r)
x=r[0]#storing the value of x from the result set to variable x
y=r[1]#storing the value of y from the result set to variable y
z=r[2]#storing the value of z from the result set to variable z
Z=(40*x)+(26*y)+(66*z)
print("Z is equal to ",Z)

The below photo shows the execution of this problem in jupyter notebook.


Related Solutions

For the given transportation problem, formulate a linear program with objective function and constraints. Solve using...
For the given transportation problem, formulate a linear program with objective function and constraints. Solve using the excel sleeve, provide the optimal transport cost. Imagine that we have three bakeries and three stores. the three stores require 23 dozen, 17 dozen, and 20 dozen loaves of bread, respectively, while the three bakeries can supply 18 dozen, 15 dozen, and 22 dozen loaves, respectively. The unit transportation costs are provided in the table below: Store 1 Store 2 Store 3 Bakery...
Use the simplex method to solve the linear programming problem. Maximize objective function: Z= 6x1 +...
Use the simplex method to solve the linear programming problem. Maximize objective function: Z= 6x1 + 2x2 Subject to constraints: 3x1 + 2x2 <=9 x1 + 3x2 <= 5 when x1, x2 >=0
Find the objective function and the constraints, and then solve the problem by using the simplex...
Find the objective function and the constraints, and then solve the problem by using the simplex method. A confectioner has 600 pounds of chocolate, 100 pounds of nuts, and 50 pounds of fruits in inventory with which to make three types of candy: Sweet Tooth, Sugar Dandy, and Dandy Delite. A box of Sweet Tooth uses 3 pounds of chocolate, 1 pound of nuts, and 1 pound of fruit and sells for $8. A box of Sugar Dandy requires 4...
Solve for the following Linear Programming problems. Your solutions should include: Objective Function Constraints Graph complete...
Solve for the following Linear Programming problems. Your solutions should include: Objective Function Constraints Graph complete with labels of points and lines, and shaded feasible region Corner point approach Optimal solution Maximum profit Problem 1: In 1969, the two leading dietary drinks available in the market are Bandade and Firstade. These drinks supply protein and carbohydrates lost during physical activity. Bandade provides 1 unit of protein and 3 units of carbohydrates in each liter. Firstade supplies 2 units of protein...
Solve the following linear programming problem by the graphical method. Maximize Z = 400 X1 +...
Solve the following linear programming problem by the graphical method. Maximize Z = 400 X1 + 200 x 2 Subject to : X1 + 8X2 <= 24 X1 + 2X2 <= 12 X1 >= 0 , X2 >= 0 You will need to graph each of the constraints to answer the following questions. You can draw a rough graph. a) State the coordinates of the point where the constraints interact. b) Define in words the region of feasible solutions. c)...
Exercise Solve the following linear programs graphically. Maximize            Z = X1 + 2X2 Subject to            2X1...
Exercise Solve the following linear programs graphically. Maximize            Z = X1 + 2X2 Subject to            2X1 + X2 ≥ 12                             X1 + X2 ≥ 5                            -X1 + 3X2 ≤ 3                            6X1 – X2 ≥ 12                            X1, X2 ≥ 0
Solve the following linear programming problem by solver. Maximize Z = 7 x1 + 5 x2...
Solve the following linear programming problem by solver. Maximize Z = 7 x1 + 5 x2 + 5 x3 subject to x1 + x2 + x3 <= 25 2 x1 + x2 + x3 <= 40 x1 + x2          <= 25                    x3 <= 6 x1, x2, x3 >= 0 (non-negativity conditions)
Consider the following linear program:   maximize z = x1 + 4x2 subject to: x1 + 2x2...
Consider the following linear program:   maximize z = x1 + 4x2 subject to: x1 + 2x2 <= 13 x1 - x2 <= 8 - x1 + x2 <= 2 -3 <= x1 <= 8 -5 <= x2 <= 4 Starting with x1 and x2 nonbasic at their lower bounds, perform ONE iteration of the Bounded Variables Revised Simplex Method. (Tableau or matrix form is acceptable). Show your work. Clearly identify the entering and leaving variables. After the pivot, identify the...
[6.4] Solve the following linear program by a graphical method: Maximize 3x1 + 3x2 + 21x3...
[6.4] Solve the following linear program by a graphical method: Maximize 3x1 + 3x2 + 21x3 subject to 6x1 + 9x2 + 25x3 <= 15 3x1 + 2x2 + 25x3 <= 20 x1 , x2 , x3 >= 0 (Hint: utilize the dual problem.)    
Solve using the graphical method. Choose your variables, identify the objective function and the constraints, graph the constraints, shade the feasibility region, identify all corner points, and determine the solution that optimizes the objective function
Solve using the graphical method. Choose your variables, identify the objective function and the constraints, graph the constraints, shade the feasibility region, identify all corner points, and determine the solution that optimizes the objective function. Use this information to answer the following 8-part question:A city council voted to conduct a study on inner-city community problems using sociologists and research assistants from UMUC. Allocation of time and costs per week are given in the following table:Labor hours - SociologistLabor hours –...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT