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

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...
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...
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)
[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 –...
Solve the following linear program graphically. (Graph constraints & locate the optimal point. You may use...
Solve the following linear program graphically. (Graph constraints & locate the optimal point. You may use the solver to determine the optimal point. If do show complete work. b) Determine the optimal point coordinates. c) Computer the optimal value. d) Compute the allowable increase and decrease for each of the objective function coefficients. e) Compute the shadow prices for each of the constraints. Min 4x + 2y s.t. 2x + y >= 14 x + 2y  >= 12   x +   y >=...
Write a python program that can solve system of linear equations in three variables using input...
Write a python program that can solve system of linear equations in three variables using input function. Paste your program in a word document or notepad. Note that I am using pycharm. please use a not really complex codes, thanks
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT