ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 <...

16
ENGM 631 Optimization Using Solver

Transcript of ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 <...

Page 1: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

ENGM 631 Optimization

Using Solver

Page 2: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Sec. 3.1Alt. Model

Max Z = 3X1 + 5X2

s.t.

X1 < 8,000

X2 < 6,000

3X1 + 4X2 < 36,000

X1 > 0

X2 > 0

Page 3: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

To Add the solver Add-in, click on File/Options

Page 4: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

In the options dialogue box, click on Add-ins

Page 5: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Highlight Solver, click ok

Page 6: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

In Excel, give some thought to your layout

Page 7: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Enter parameters and logical equations

Page 8: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

When ready to solve, enter solverClick on data/solver

Page 9: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Enter Cell where Profit is calculated

Page 10: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Enter Cells where variables are located

Page 11: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Click Add Constraints button

Page 12: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Enter Constraints, one at a time, then click add

Page 13: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Once objective, variables, and constraints are all added, click on solve button

Page 14: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Solver will find the optimal solution

Solution

Page 15: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Solver will find the optimal solution

Values for X1 and X2

Page 16: ENGM 631 Optimization Using Solver. Sec. 3.1Alt. Model Max Z = 3X 1 + 5X 2 s.t. X 1 < 8,000 X 2 < 6,000 3X 1 + 4X 2 < 36,000 X 1 > 0 X 2 > 0.

Solver will find the optimal solution

How much of right hand side did we actually use?