Anda di halaman 1dari 93

Instructions

Computer
Buttons and User Defined functions are linked to the Add-in with which they are created.

This causes problems when opening a file created in one computer in a second computer.
When opening a file with links, a dialog may appear asking whether links are to be re-

established.
When opening Always
a file answer
that hasno to this
been question.
created on a different computer, always have the
appropriate Add-in installed using the Add-in Command under the Tools menu or the

OR_MM Control dialog.
When an add-in is installed, the OR_MM menu item is placed on the Standard toolbar and
• the commands unique to the add-in are placed on the OR_MM menu. Select items from this
menu to initiate the add-in procedures.
For worksheets with buttons, we have included a Relink Buttons command. This command
• creates new buttons linked to the resident Add-in. If buttons don't work correctly, choose
the Relink Buttons
For worksheets command.
with user defined functions, functions already on the worksheet must be
linked to the Add-in for the new computer. Be sure the add-in that provides these functions

is installed.
If user defined functions are not working, select the Links command on the Edit menu.
• Select the Update Source command. Browse to find the Add-in to which the functions are to
be linked. Pressing the Change button causes the function commands to be update

Dynamic Programming Models


12.1 An Investment Example Add-ins Used
Invest Investment Example with graphics Teach DP-Knapsack
Invest_Details Detailed output of state space for the investment example Teach DP-Knapsack
12.3 Resource Allocation Problems
BinKnap Example 1 – Binary Knapsack Problem with weight limitation Teach DP-BinKnapsack
BinKnap2 Example 2 – Binary Knapsack with Two Constraints Teach DP-BinKnapsack
Personnel Example 3 – Personnel Assignment Problem Teach DP-General
12.4 Line Partitioning Problems
Line1 Example 4 - Line Partitioning Teach DP-Line
Expansion Example 5 – Capacity Expansion Teach DP-Line
Inventory Example 6 – Production scheduling Teach DP-Line
UnBndKnap Example 7 – Unbounded Knapsack Teach DP-UnbKnapsack

Page 1
Instructions

12.5 Path Problems


Grid Example 8 – Grid Problem Teach DP-Grid
Grid_T Example 9 – Grid Problem with Turn Penalties Teach DP-Grid
Network Example illustrating the Network data format Teach DP-Network
12.6 Sequencing Problems
Seq4 Example 10 – Job Sequencing with Tardiness Penalties Teach DP-Sequence
TSP Example 11 – Traveling Salesman Problem Teach DP-TSP

Page 2
Instructions

The name after the hyphen indicates the model type


ch DP-Knapsack
ch DP-Knapsack

ch DP-BinKnapsack
ch DP-BinKnapsack
ch DP-General

ch DP-UnbKnapsack

Page 3
Instructions

ch DP-Network

ch DP-Sequence

Page 4
Teach Dynamic Prog Name: Invest Strategy
Type:Knapsack Generation: Forward
State Var.: 2 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Max Output:Decisions
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2
State 1 0

Definitions
s1: Index of the item
s2: Amount used of resource 1

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 0
1
Decision 2
Feas. 1 1
Min 0
Max 4
Step 1
2 5
5 1

Definitions
d1: Number to bring

Forward Transition Equations


Specify the forward transition equations.

State 1 0
Decision 2

1 2
Next State 2 2

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 0
Decision 2
Next State 2 2

Backward Recursive Eq. Decision Objective


f(s) 19.5 Z(s , d, sn) 5.8 f(sn) 13.7

Initial States
Specify the logical conditions for the initial states.

1 2
State 1 0 Value
Initial 1 1 1 0
Min 1 0
Max 1 0
Step 1 1
0 1 1
1 1 1

Final States
Specify the logical conditions for the final states.

1 2
State 1 0 Value
Final 0 1 0 5
Min 9 0
Max 9 10
Step 1 1
0 1 11
11 11 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2
State 2 2
Feas. 1 1 1
Min 2 0
Max 9 10
Step 1 1
0 8 11
88 11 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 0
Decision 2

Formulas for State Variable Names


S(1): Stage 1:
S(2):

Formulas for Decision Variable Names


D(1): ###

Action ###

Optimum Solution by Forward Recovery


State Decision
Index 1 2 1 Value Action
1 1 0 2 22.3 Stage 1: Bring 2 of Item 1
2 2 2 1 16.5 Stage 2: Bring 1 of Item 2
3 3 3 1 14.7 Stage 3: Bring 1 of Item 3
4 4 4 2 13.2 Stage 4: Bring 2 of Item 4
5 5 6 1 9.4 Stage 5: Bring 1 of Item 5
6 6 7 2 8.1 Stage 6: Bring 2 of Item 6
7 7 9 1 2.2 Stage 7: Bring 1 of Item 7
8 8 10 0 0 Stage 8: Bring 0 of Item 8
9 9 10 -- 0 Final
The decisions leave the states.
Number of States 81
Number of tree entries 90
Time to Generate 3 seconds
Time to Optimize 4 seconds
Time to Recover 2 seconds
Time to Show Results 1 seconds
Total Time 10 seconds

Item Benefits
1 2 3 4 5 6 7
0 0 0 0 0 0 0 0
1 4.1 1.8 1.5 2.2 1.3 4.2 2.2
2 5.8 3 2.5 3.8 2.4 5.9 3.5
3 6.5 3.9 3.3 4.8 3.2 6.6 4.2
4 6.8 4.5 3.8 5.5 3.9 6.8 4.6
Maximum 4 4 4 4 4 4 4

Resources Required per unit


Max. 1 2 3 4 5 6 7
1 10 1 1 1 1 1 1 1
8
0
1
1.7
2.3
2.8
4

8 Slack Value
1 1 0.5
State S(1) S(2) Value D(1)
1 1 0 22.3 2
2 2 0 19 2
3 2 1 17.8 1
4 2 2 16.5 1
5 2 3 15.2 1
6 2 4 13.7 1
7 3 0 18.1 1
8 3 1 17.1 1
9 3 2 16 1
10 3 3 14.7 1
11 3 4 13.4 1
12 3 5 11.9 0
13 3 6 10.3 0
14 3 7 8.6 0
15 3 8 6.4 0
16 4 0 17.6 3
17 4 1 16.6 2
18 4 2 15.6 2
19 4 3 14.5 2
20 4 4 13.2 2
21 4 5 11.9 2
22 4 6 10.3 1
23 4 7 8.6 1
24 4 8 6.4 0
25 4 9 4.2 0
26 4 10 0 0
27 5 0 15 3
28 5 1 14.3 3
29 5 2 13.6 3
30 5 3 12.8 2
31 5 4 11.8 2
32 5 5 10.7 1
33 5 6 9.4 1
34 5 7 8.1 0
35 5 8 6.4 0
36 5 9 4.2 0
37 5 10 0 0
38 6 0 13.6 3
39 6 1 13.1 3
40 6 2 12.5 3
41 6 3 11.8 2
42 6 4 11.1 3
43 6 5 10.4 2
44 6 6 9.4 2
45 6 7 8.1 2
46 6 8 6.4 1
47 6 9 4.2 1
48 6 10 0 0
49 7 0 8.5 3
50 7 1 8 3
51 7 2 7.5 3
52 7 3 7 3
53 7 4 6.5 3
54 7 5 5.9 3
55 7 6 5.2 2
56 7 7 4.5 2
57 7 8 3.5 2
58 7 9 2.2 1
59 7 10 0 0
60 8 0 5.8 3
61 8 1 5.3 3
62 8 2 4.8 3
63 8 3 4.3 3
64 8 4 3.8 3
65 8 5 3.3 3
66 8 6 2.8 3
67 8 7 2.3 3
68 8 8 1.7 2
69 8 9 1 1
70 8 10 0 0
71 9 0 5 ***
72 9 1 4.5 ***
73 9 2 4 ***
74 9 3 3.5 ***
75 9 4 3 ***
76 9 5 2.5 ***
77 9 6 2 ***
78 9 7 1.5 ***
79 9 8 1 ***
80 9 9 0.5 ***
81 9 10 0 ***
Teach Dynamic Prog Name: BinKnap Strategy
Type:
BinKnapsack Generation:Exhaustive
State Var.: 2 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Max Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2
State 1 0

Definitions
s1: Index of the item
s2: Amount used of resource 1

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 0
1
Decision 0
Feas. 1 1
Min 0
Max 1
Step 1
0 2
2 1

Definitions
d1: Number to bring

Forward Transition Equations


Specify the forward transition equations.

State 1 0
Decision 0

1 2
Next State 2 0

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 0
Decision 0
Next State 2 0

Backward Recursive Eq. Decision Objective


f(s) 47.7 Z(s , d, sn) 0 f(sn) 47.7

Initial States
Specify the logical conditions for the initial states.

1 2
State 1 0 Value
Initial 1 1 1 0
Min 1 0
Max 1 0
Step 1 1
0 1 1
1 1 1

Final States
Specify the logical conditions for the final states.

1 2
State 1 0 Value
Final 0 1 0 0
Min 16 0
Max 16 30
Step 1 1
0 1 31
31 31 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2
State 2 0
Feas. 1 1 1
Min 2 0
Max 16 30
Step 1 1
464 15 31
465 31 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 0
Decision 0

Formulas for State Variable Names


S(1): Stage 1:
S(2):

Formulas for Decision Variable Names


D(1): ###

Action ###

Optimum Solution by Forward Recovery


State Decision
Index 1 2 1 Value Action
1 1 0 0 57 Stage 1: Bring 0 of Item 1
2 2 0 0 57 Stage 2: Bring 0 of Item 2
3 3 0 0 57 Stage 3: Bring 0 of Item 3
4 4 0 0 57 Stage 4: Bring 0 of Item 4
5 5 0 0 57 Stage 5: Bring 0 of Item 5
6 6 0 0 57 Stage 6: Bring 0 of Item 6
7 7 0 0 57 Stage 7: Bring 0 of Item 7
8 8 0 0 57 Stage 8: Bring 0 of Item 8
9 9 0 0 57 Stage 9: Bring 0 of Item 9
10 10 0 1 57 Stage 10: Bring 1 of Item 10
11 11 14 0 32 Stage 11: Bring 0 of Item 11
12 12 14 1 32 Stage 12: Bring 1 of Item 12
13 13 30 0 0 Stage 13: Bring 0 of Item 13
14 14 30 0 0 Stage 14: Bring 0 of Item 14
15 15 30 0 0 Stage 15: Bring 0 of Item 15
16 16 30 -- 0 Final
The decisions leave the states.
Number of States 466
Number of tree entries 482
Time to Generate 3 seconds
Time to Optimize 13 seconds
Time to Recover 2 seconds
Time to Show Results 0 seconds
Total Time 18 seconds

Items
1 2 3 4 5 6 7
Benefit 8 9.5 11.5 12.8 14.1 18.6 19.8
Maximum 1 1 1 1 1 1 1

Resources Required per unit


Max. 1 2 3 4 5 6 7
1 30 5 6 7 8 9 10 11
8 9 10 11 12 13 14 15
22.4 23.6 25 29.1 32 33 34.6 37.2
1 1 1 1 1 1 1 1

8 9 10 11 12 13 14 15 Slack Value
12 13 14 15 16 17 18 19 1 0
Teach Dynamic Prog Name:BinKnap2 Strategy
Type:
BinKnapsack Generation: Forward
State Var.: 3 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Max Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3
State 1 0 0

Definitions
s1: Index of the item
s2: Amount used of resource 1
s3: Amount used of resource 2

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 0 0
1
Decision 0
Feas. 1 1
Min 0
Max 1
Step 1
0 2
2 1

Definitions
d1: Number to bring

Forward Transition Equations


Specify the forward transition equations.

State 1 0 0
Decision 0

1 2 3
Next State 2 0 0

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 0 0
Decision 0
Next State 2 0 0

Backward Recursive Eq. Decision Objective


f(s) 43.6 Z(s , d, sn) 0 f(sn) 43.6

Initial States
Specify the logical conditions for the initial states.

1 2 3
State 1 0 0 Value
Initial 1 1 1 1 0
Min 1 0 0
Max 1 0 0
Step 1 1 1
0 1 1 1
1 1 1 1

Final States
Specify the logical conditions for the final states.

1 2 3
State 1 0 0 Value
Final 0 1 1 0 0
Min 16 0 0
Max 16 30 30
Step 1 1 1
0 1 31 31
961 961 31 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3
State 2 0 0
Feas. 1 1 1 1
Min 2 0 0
Max 16 30 30
Step 1 1 1
0 15 31 31
14415 961 31 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 0 0
Decision 0
Formulas for State Variable Names
S(1): Stage 1:
S(2):
S(3):

Formulas for Decision Variable Names


D(1): ###

Action ###

Optimum Solution by Forward Recovery


State Decision
Index 1 2 3 1 Value Action
1 1 0 0 0 55.8 Stage 1: Bring 0 of Item 1
2 2 0 0 0 55.8 Stage 2: Bring 0 of Item 2
3 3 0 0 0 55.8 Stage 3: Bring 0 of Item 3
4 4 0 0 0 55.8 Stage 4: Bring 0 of Item 4
5 5 0 0 0 55.8 Stage 5: Bring 0 of Item 5
6 6 0 0 1 55.8 Stage 6: Bring 1 of Item 6
7 7 10 10 0 37.2 Stage 7: Bring 0 of Item 7
8 8 10 10 0 37.2 Stage 8: Bring 0 of Item 8
9 9 10 10 0 37.2 Stage 9: Bring 0 of Item 9
10 10 10 10 0 37.2 Stage 10: Bring 0 of Item 10
11 11 10 10 0 37.2 Stage 11: Bring 0 of Item 11
12 12 10 10 0 37.2 Stage 12: Bring 0 of Item 12
13 13 10 10 0 37.2 Stage 13: Bring 0 of Item 13
14 14 10 10 0 37.2 Stage 14: Bring 0 of Item 14
15 15 10 10 1 37.2 Stage 15: Bring 1 of Item 15
16 16 29 30 -- 0 Final
The decisions leave the states.
Number of States 729
Number of tree entries 1064
Time to Generate 18 seconds
Time to Optimize 24 seconds
Time to Recover 2 seconds
Time to Show Results 0 seconds
Total Time 44 seconds

Items
1 2 3 4 5 6
Benefit 8 9.5 11.5 12.8 14.1 18.6
Maximum 1 1 1 1 1 1

Resources Required per unit


Max. 1 2 3 4 5 6
1 30 5 6 7 8 9 10
2 30 5 6 7 11 9 10
7 8 9 10 11 12 13 14 15
19.8 22.4 23.6 25 29.1 32 33 34.6 37.2
1 1 1 1 1 1 1 1 1

7 8 9 10 11 12 13 14 15 Slack Value
11 12 13 14 15 16 17 18 19 1 0
15 16 14 14 18 19 19 22 20 2 0
Slack Value
Teach Dynamic Prog Name:Personnel Strategy
Type: Gen Generation: Forward
State Var.: 3 Recursion:Backward
Solve Decision Var.: 2 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3
State 1 3 3

Definitions
s1: State 1
s2: State 2
s3: State 3

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 3 3
1 2
Decision 2 0
Feas. 1 1 1
Min 0 0
Max 2 2
Step 1 1
6 3 3
9 3 1

Definitions
d1: Decision 1
d2: Decision 2

Forward Transition Equations


Specify the forward transition equations.

State 1 3 3
Decision 2 0

1 2 3
Next State 2 1 3

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).
State 1 3 3
Decision 2 0
Next State 2 1 3

Backward Recursive Eq. Decision Objective


f(s) 176 Z(s , d, sn) 21 f(sn) 155

Initial States
Specify the logical conditions for the initial states.

1 2 3
State 1 3 3 Value
Initial 1 1 1 1 0
Min 1 3 3
Max 1 3 3
Step 1 1 1
0 1 1 1
1 1 1 1

Final States
Specify the logical conditions for the final states.

1 2 3
State 1 3 3 Value
Final 0 1 1 0 0
Min 5 0 0
Max 5 3 3
Step 1 1 1
0 1 4 4
16 16 4 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3
State 2 1 3
Feas. 1 1 1 1
Min 2 0 0
Max 5 3 3
Step 1 1 1
0 4 4 4
64 16 4 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 3 3
Decision 2 0
Formulas for State Variable Names
S(1): Job A
S(2):
S(3):

Formulas for Decision Variable Names


D(1): : Use 2 ME,
D(2): Use 0 EE.

Action Job A: Use 2 ME, Use 0 EE.

Optimum Solution by Forward Recovery


State Decision
Index 1 2 3 1 2 Value Action
1 1 3 3 2 0 140 Job A: Use 2 ME, Use 0 EE.
2 2 1 3 1 1 119 Job B: Use 1 ME, Use 1 EE.
3 3 0 2 0 2 99 Job C: Use 0 ME, Use 2 EE.
4 4 0 0 0 0 75 Job D: Use 0 ME, Use 0 EE.
5 5 0 0 -- -- 0 Final
The decisions leave the states.
Number of States 58
Number of tree entries 79
Time to Generate 3 seconds
Time to Optimize 5 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 9 seconds

ME
Job A 0 1 2
0 45 49 30
EE 1 47 15 9999
2 21 9999 9999

ME
Job B 0 1 2
0 9999 73 15
EE 1 9999 20 9999
2 27 9999 9999

ME
Job C 0 1 2
0 60 52 24
EE 1 78 9999 9999
2 54 9999 9999

ME
Job D 0 1 2
0 75 70 57
EE 1 61 57 9999
2 80 9999 9999
ME, Use 0 EE.
ME, Use 1 EE.
ME, Use 2 EE.
ME, Use 0 EE.
Teach Dynamic Prog Name: Line1 Strategy
Type: Line Generation: Exhaustive
State Var.: 1 Recursion: Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1
State 3

Definitions
s1: Node number

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 3
1
Decision 3
Feas. 1 1
Min 1
Max 7
Step 1
2 7
7 1

Definitions
d1: Segment length

Forward Transition Equations


Specify the forward transition equations.

State 3
Decision 3

1
Next State 6

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 3
Decision 3 Fixed Cost 10
Next State 6
Backward Recursive Eq. Decision Objective
f(s) 19 Z(s , d, sn) 19 f(sn) 0

Initial States
Specify the logical conditions for the initial states.

1
State 3 Value
Initial 0 0 0
Min 0
Max 0
Step 1
0 1
1 1

Final States
Specify the logical conditions for the final states.

1
State 3 Value
Final 0 0 0
Min 10
Max 10
Step 1
0 1
1 1

State Feasibility
Specify the logical conditions for state feasibility.

1
State 6
Feas. 1 1
Min 1
Max 10
Step 1
9 10
10 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 3
Decision 3

Formulas for State Variable Names


S(1): Segment 4:

Formulas for Decision Variable Names


D(1): length = 3

Action Segment 4: length = 3

Optimum Solution by Forward Recovery


State Decision
Index 1 1 Value Action
1 0 3 64 Segment 1: length = 3
2 3 3 45 Segment 4: length = 3
3 6 4 26 Segment 7: length = 4
4 10 -- 0 Final
The decisions leave the states.
Number of States 11
Number of tree entries 11
Time to Generate 0 seconds
Time to Optimize 1 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 2 seconds
Teach Dynamic Prog Name:Expansion Strategy
Type: Line Generation:Exhaustive
State Var.: 1 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1
State 3

Definitions
s1: Node number

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 3
1
Decision 4
Feas. 1 1
Min 1
Max 10
Step 1
3 10
10 1

Definitions
d1: Segment length

Forward Transition Equations


Specify the forward transition equations.

State 3
Decision 4

1
Next State 7

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 3
Decision 4
Next State 7
Backward Recursive Eq. Decision Objective
f(s) 20.732 Z(s , d, sn) 20.732 f(sn) 0

Initial States
Specify the logical conditions for the initial states.

1
State 3 Value
Initial 0 0 0
Min 0
Max 0
Step 1
0 1
1 1

Final States
Specify the logical conditions for the final states.

1
State 3 Value
Final 0 0 0
Min 20
Max 20
Step 1
0 1
1 1

State Feasibility
Specify the logical conditions for state feasibility.

1
State 7
Feas. 1 1
Min 1
Max 20
Step 1
19 20
20 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 3
Decision 4

Formulas for State Variable Names


S(1): Time 3:

Formulas for Decision Variable Names


D(1): Size 4

Action Time 3: Size 4

Optimum Solution by Forward Recovery


State Decision
Index 1 1 Value Action
1 0 6 83.73 Time 0: Size 6
2 6 6 49.73 Time 6: Size 6
3 12 4 24.359 Time 12: Size 4
4 16 4 10.995 Time 16: Size 4
5 20 -- 0 Final
The decisions leave the states.
Number of States 21
Number of tree entries 21
Time to Generate 4 seconds
Time to Optimize 1 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 6 seconds

Interest 5%

Line Data
1 15 1 2 3 4 5
2 16 Facility Cost 15 16 19 24 30
3 19
4 24
5 30
6 34
7 39
8 45
9 49
10 54
6 7 8 9 10
34 39 45 49 54
Teach Dynamic Prog Name:Inventory Strategy
Type: Line Generation:Exhaustive
State Var.: 1 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1
State 0

Definitions
s1: Production Time

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 0
1
Decision 6
Feas. 1 1
Min 1
Max 10
Step 1
5 10
10 1

Definitions
d1: Time covered

Forward Transition Equations


Specify the forward transition equations.

State 0
Decision 6

1
Next State 6

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 0
Decision 6 = INDEX(Inventory_Data, $C$47,
Next State 6 $C$46+1)
Backward Recursive Eq. Decision Objective
f(s) 555 Z(s , d, sn) 107 f(sn) 448

Initial States
Specify the logical conditions for the initial states.

1
State 0 Value
Initial 1 1 0
Min 0
Max 0
Step 1
0 1
1 1

Final States
Specify the logical conditions for the final states.

1
State 0 Value
Final 0 0 0
Min 20
Max 20
Step 1
0 1
1 1

State Feasibility
Specify the logical conditions for state feasibility.

1
State 6
Feas. 1 1
Min 1
Max 20
Step 1
19 20
20 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 0
Decision 6

Formulas for State Variable Names


S(1): Time 0:

Formulas for Decision Variable Names


D(1): Interval 6

Action Time 0: Interval 6

Optimum Solution by Forward Recovery


State Decision
Index 1 1 Value Action
1 0 6 555 Time 0: Interval 6
2 6 4 448 Time 6: Interval 4
3 10 3 344 Time 10: Interval 3
4 13 3 252 Time 13: Interval 3
5 16 4 157 Time 16: Interval 4
6 20 -- 0 Final
The decisions leave the states.
Number of States 21
Number of tree entries 21
Time to Generate 0 seconds
Time to Optimize 2 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 3 seconds

Line Data
Starting Node
Segment 0 1 2 3 4 5 6 7
Fixed 30 1 42 34 58 30 30 38 62 38
Variable 4 2 47 69 58 30 40 78 72 53
Inventory 1 3 89 69 58 42 88 90 90 65
4 89 69 72 98 102 111 104 128
5 89 85 136 114 126 127 176 160
6 107 157 154 141 144 208 212 169
7 187 177 184 161 234 248 222 249
asible decisions. 8 209 210 206 260 278 259 310 282
9 245 234 314 308 290 355 346 318
10 271 351 366 321 394 394 385 422

Period 0 1 2 3 4 5 6 7
Demand 0 3 1 7 0 0 2 8

Example
Decision State Prod. Inv Cost
0 13 25 107
6 6 15 14 104
4 10 14 6 92
3 13 14 9 95
3 16 24 31 157
4 20
80 555

Period 1 2 3 4 5 6 7 8
Demand 3 1 7 0 0 2 8 2

Period 11 12 13 14 15 16 17 18
Demand 9 4 1 8 3 3 8 6
8 9 10 11 12 13 14 15 16 17 18
42 38 66 46 34 62 42 42 62 54 50
52 83 86 51 74 77 57 82 92 79 75
106 107 92 99 92 95 105 118 122 109 x
134 114 148 120 113 151 147 153 157 x x
142 178 172 144 177 199 187 193 x x x
214 205 199 216 231 244 232 x x x x
244 235 279 276 281 294 x x x x x
277 323 345 331 336 x x x x x x
373 395 405 391 x x x x x x x
451 460 470 x x x x x x x x

8 9 10 11 12 13 14 15 16 17 18
2 3 2 9 4 1 8 3 3 8 6

9 10
3 2

19 20
5 5
19
50
x
x
x
x
x
x
x
x
x

19 20
5 5

24
Teach Dynamic Prog Name: UnbndKnap Strategy
Type: UnbKnapsack Generation: Forward
State Var.: 1 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Max Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1
State 0

Definitions
s1: State 1: Amount Used of resource 0

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 0
1
Decision 4
Feas. 1 1
Min 0
Max 10
Step 1
4 11
11 1

Definitions
d1: Index to bring

Forward Transition Equations


Specify the forward transition equations.

State 0
Decision 4

1
Next State 12

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 0
Decision 4
Next State 12
Resource Left 35
Backward Recursive Eq. Decision Objective
f(s) 49.4 Z(s , d, sn) 14.8 f(sn) 34.6

Initial States
Specify the logical conditions for the initial states.

1
State 0 Value
Initial 1 1 0
Min 0
Max 0
Step 1
0 1
1 1

Final States
Specify the logical conditions for the final states.

1
State 0 Value
Final 0 0 0
Min 35
Max 35
Step 1
0 1
1 1

State Feasibility
Specify the logical conditions for state feasibility.

1
State 12
Feas. 1 1
Min 0
Max 35
Step 1
0 36
36 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 0
Decision 4

Formulas for State Variable Names


S(1):

Formulas for Decision Variable Names


D(1): Bring 4

Action Bring 4

Optimum Solution by Forward Recovery


State Decision
Index 1 1 Value Action
1 0 4 42.7 Bring 4
2 12 4 27.9 Bring 4
3 24 5 13.1 Bring 5
4 35 -- 0 Final
The decisions leave the states.
Number of States 31
Number of tree entries 31
Time to Generate 3 seconds
Time to Optimize 3 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 7 seconds

Items
1 2 3 4 5 6 7 8
Benefit 18 16.6 15 14.8 13.1 11.3 10.5 8.6

Resources Required per unit


Max. 1 2 3 4 5 6 7 8
1 35 15 14 13 12 11 10 9 8
9 10
6.7 5.2

9 10 Slack Value
7 6 1 0
Teach Dynamic Prog Name: Grid Strategy
Type: Grid Generation:Exhaustive
State Var.: 2 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2
State 1 1

Definitions
s1: x1
s2: x2

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 1
1
Decision 0
Feas. 1 1
Min 0
Max 1
Step 1
0 2
2 1

Definitions
d1: Next Direction

Forward Transition Equations


Specify the forward transition equations.

State 1 1
Decision 0

1 2
Next State 1 2

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 1
Decision 0
Next State 1 2

Backward Recursive Eq. Decision Objective


f(s) 9 Z(s , d, sn) 0 f(sn) 9

Initial States
Specify the logical conditions for the initial states.

1 2
State 1 1 Value
Initial 1 1 1 0
Min 1 1
Max 1 1
Step 1 1
0 1 1
1 1 1

Final States
Specify the logical conditions for the final states.

1 2
State 1 1 Value
Final 0 0 0 0
Min 10 10
Max 10 10
Step 1 1
0 1 1
1 1 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2
State 1 2
Feas. 1 1 1
Min 1 1
Max 10 10
Step 1 1
99 10 10
100 10 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 1
Decision 0

Formulas for State Variable Names


S(1): x(1
S(2): ,1):

Formulas for Decision Variable Names


D(1): Go Up

Action x(1,1):Go Up

Optimum Solution by Forward Recovery


State Decision
Index 1 2 1 Value Action
1 1 1 0 9 x(1,1):Go Up
2 1 2 1 9 x(1,2):Go Right
3 2 2 0 8 x(2,2):Go Up
4 2 3 1 8 x(2,3):Go Right
5 3 3 0 7 x(3,3):Go Up
6 3 4 1 7 x(3,4):Go Right
7 4 4 0 6 x(4,4):Go Up
8 4 5 1 6 x(4,5):Go Right
9 5 5 0 5 x(5,5):Go Up
10 5 6 1 5 x(5,6):Go Right
11 6 6 0 4 x(6,6):Go Up
12 6 7 1 4 x(6,7):Go Right
13 7 7 0 3 x(7,7):Go Up
14 7 8 1 3 x(7,8):Go Right
15 8 8 0 2 x(8,8):Go Up
16 8 9 1 2 x(8,9):Go Right
17 9 9 0 1 x(9,9):Go Up
18 9 10 1 1 x(9,10):Go Right
19 10 10 -- 0 Final
The decisions leave the states.
Number of States 100
Number of tree entries 110
Time to Generate 1 seconds
Time to Optimize 4 seconds
Time to Recover 2 seconds
Time to Show Results 0 seconds
Total Time 7 seconds

Right Lengths
10 9 8 7 6 5 4 3 2
9 8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0 1
6 5 4 3 2 1 0 1 2
5 4 3 2 1 0 1 2 3
4 3 2 1 0 1 2 3 4
3 2 1 0 1 2 3 4 5
2 1 0 1 2 3 4 5 6
1 0 1 2 3 4 5 6 7
1 2 3 4 5 6 7 8

Up Lengths
9 8 7 6 5 4 3 2 1
8 7 6 5 4 3 2 1 0
7 6 5 4 3 2 1 0 1
6 5 4 3 2 1 0 1 2
5 4 3 2 1 0 1 2 3
4 3 2 1 0 1 2 3 4
3 2 1 0 1 2 3 4 5
2 1 0 1 2 3 4 5 6
1 0 1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1
0
1
2
3
4
5
6
7
8
9 x1

0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9
9 10 x1
Teach Dynamic Prog Name: Grid_T Strategy
Type: Grid Generation:Exhaustive
State Var.: 3 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3
State 1 1 0

Definitions
s1: x1
s2: x2
s3: Last Direction

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 1 0
1
Decision 0
Feas. 1 1
Min 0
Max 1
Step 1
0 2
2 1

Definitions
d1: Next Direction

Forward Transition Equations


Specify the forward transition equations.

State 1 1 0
Decision 0

1 2 3
Next State 1 2 0

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 1 0
Decision 0
Next State 1 2 0

Backward Recursive Eq. Decision Objective


f(s) 51 Z(s , d, sn) 0 f(sn) 51

Initial States
Specify the logical conditions for the initial states.

1 2 3
State 1 1 0 Value
Initial 1 1 1 1 0
Min 1 1 0
Max 1 1 1
Step 1 1 1
1 1 1 2
2 2 2 1

Final States
Specify the logical conditions for the final states.

1 2 3
State 1 1 0 Value
Final 0 0 1 0 0
Min 10 10 0
Max 10 10 1
Step 1 1 1
0 1 1 2
2 2 2 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3
State 1 2 0
Feas. 1 1 1 1
Min 1 1 0
Max 10 10 1
Step 1 1 1
199 10 10 2
200 20 2 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 1 0
Decision 0
Formulas for State Variable Names
S(1): x(1
S(2): ,1):
S(3):

Formulas for Decision Variable Names


D(1): Go Up

Action x(1,1):Go Up

Optimum Solution by Forward Recovery


State Decision
Index 1 2 3 1 Value Action
1 1 1 0 0 47 x(1,1):Go Up
2 1 2 0 0 47 x(1,2):Go Up
3 1 3 0 0 46 x(1,3):Go Up
4 1 4 0 1 44 x(1,4):Right Turn: Go Right
5 2 4 1 1 36 x(2,4):Go Right
6 3 4 1 1 34 x(3,4):Go Right
7 4 4 1 1 33 x(4,4):Go Right
8 5 4 1 1 33 x(5,4):Go Right
9 6 4 1 1 32 x(6,4):Go Right
10 7 4 1 0 30 x(7,4):Left Turn: Go Up
11 7 5 0 0 17 x(7,5):Go Up
12 7 6 0 0 15 x(7,6):Go Up
13 7 7 0 0 14 x(7,7):Go Up
14 7 8 0 0 14 x(7,8):Go Up
15 7 9 0 0 13 x(7,9):Go Up
16 7 10 0 1 11 x(7,10):Right Turn: Go Right
17 8 10 1 1 3 x(8,10):Go Right
18 9 10 1 1 1 x(9,10):Go Right
19 10 10 1 -- 0 Final
The decisions leave the states.
Number of States 200
Number of tree entries 310
Time to Generate 2 seconds
Time to Optimize 8 seconds
Time to Recover 3 seconds
Time to Show Results 0 seconds
Total Time 13 seconds

Turn penalties
Right: 5
Left: 10

Right Lengths
10 9 8 7 6 5 4 3
9 8 7 6 5 4 3 2
8 7 6 5 4 3 2 1
7 6 5 4 3 2 1 0
6 5 4 3 2 1 0 1
5 4 3 2 1 0 1 2
4 3 2 1 0 1 2 3
3 2 1 0 1 2 3 4
2 1 0 1 2 3 4 5
1 0 1 2 3 4 5 6
1 2 3 4 5 6 7

Up Lengths
9 8 7 6 5 4 3 2
8 7 6 5 4 3 2 1
7 6 5 4 3 2 1 0
6 5 4 3 2 1 0 1
5 4 3 2 1 0 1 2
4 3 2 1 0 1 2 3
3 2 1 0 1 2 3 4
2 1 0 1 2 3 4 5
1 0 1 2 3 4 5 6
1 2 3 4 5 6 7
2 1
1 0
0 1
1 2
2 3
3 4
4 5
5 6
6 7
7 8
8 9 x1

1 0 1
0 1 2
1 2 3
2 3 4
3 4 5
4 5 6
5 6 7
6 7 8
7 8 9
8 9 10 x1
Teach Dynamic Prog Name: Network Strategy
Type: Network Generation:Exhaustive
State Var.: 1 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1
State 1

Definitions
s1: Node Number

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1
1
Decision 1
Feas. 1 1
Min 1
Max 1
Step 1
0 1
1 1

Definitions
d1: Arc Number

Forward Transition Equations


Specify the forward transition equations.

State 1
Decision 1

1
Next State 2

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1
Decision 1
Next State 2
Backward Recursive Eq. Decision Objective
f(s) 22 Z(s , d, sn) 8 f(sn) 14

Initial States
Specify the logical conditions for the initial states.

1
State 1 Value
Initial 1 1 0
Min 1
Max 1
Step 1
0 1
1 1

Final States
Specify the logical conditions for the final states.

1
State 1 Value
Final 0 0 0
Min 10
Max 10
Step 1
0 1
1 1

State Feasibility
Specify the logical conditions for state feasibility.

1
State 2
Feas. 1 1
Min 1
Max 10
Step 1
9 10
10 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1
Decision 1

Formulas for State Variable Names


S(1): Node 1:

Formulas for Decision Variable Names


D(1): Arc 1

Action Node 1: Arc 1

Optimum Solution by Forward Recovery


State Decision
Index 1 1 Value Action
1 1 1 22 Node 1: Arc 1
2 2 2 14 Node 2: Arc 2
3 3 3 8 Node 3: Arc 3
4 4 5 2 Node 4: Arc 5
5 6 10 1 Node 6: Arc 10
6 10 -- 0 Final
The decisions leave the states.
Number of States 10
Number of tree entries 10
Time to Generate 1 seconds
Time to Optimize 0 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 2 seconds

Network Data
Arc Data Node Data
Arc From To Cost Node Start End
1 1 2 8 1 1 1
2 2 3 6 2 2 2
3 3 4 6 3 3 3
4 4 5 3 4 4 5
5 4 6 1 5 6 7
6 5 6 4 6 8 10
7 5 6 1 7 11 13
8 6 7 8 8 14 16
9 6 8 1 9 17 20
10 6 10 1 10 21 21
11 7 8 1
12 7 8 1
13 7 8 1
14 8 9 8
15 8 10 1
16 8 10 1
17 9 10 9
18 9 10 1
19 9 10 1
20 9 10 1
Teach Dynamic Prog Name: Seq4 Strategy
Type:Sequence Generation:Exhaustive
State Var.: 4 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3 4
State 0 0 0 0

Definitions
s1: J1
s2: J2
s3: J3
s4: J4

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 0 0 0 0
1
Decision 3
Feas. 1 1
Min 1
Max 4
Step 1
2 4
4 1

Definitions
d1: Next Job

Forward Transition Equations


Specify the forward transition equations.

State 0 0 0 0
Decision 3

1 2 3 4
Next State 0 0 1 0

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).
State 0 0 0 0
Decision 3
Next State 0 0 1 0

Backward Recursive Eq. Decision Objective


f(s) 2280 Z(s , d, sn) 0 f(sn) 2280

Initial States Finish: 7


Specify the logical conditions for tLate: 0

1 2 3 4
State 0 0 0 0 Value
Initial 1 1 1 1 1 0
Min 0 0 0 0
Max 0 0 0 0
Step 1 1 1 1
0 1 1 1 1
1 1 1 1 1

Final States
Specify the logical conditions for the final states.

1 2 3 4
State 0 0 0 0 Value
Final 0 0 0 0 0 0
Min 1 1 1 1
Max 1 1 1 1
Step 1 1 1 1
0 1 1 1 1
1 1 1 1 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3 4
State 0 0 1 0
Feas. 1 1 1 1 1
Min 0 0 0 0
Max 1 1 1 1
Step 1 1 1 1
15 2 2 2 2
16 8 4 2 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 0 0 0 0
Decision 3
Formulas for State Variable Names
S(1):
S(2):
S(3):
S(4):

Formulas for Decision Variable Names


D(1): J3

Action J3

Optimum Solution by Forward Recovery


State Decision
Index 1 2 3 4 1 Value Action
1 0 0 0 0 3 860 J3
2 0 0 1 0 1 860 J1
3 1 0 1 0 2 860 J2
4 1 1 1 0 4 420 J4
5 1 1 1 1 -- 0 Final
The decisions leave the states.
Number of States 16
Number of tree entries 30
Time to Generate 1 seconds
Time to Optimize 1 seconds
Time to Recover 1 seconds
Time to Show Results 0 seconds
Total Time 3 seconds

Job Time Due Penalty


1 5 12 80
2 9 10 40
3 7 10 100
4 10 17 30
Total 31
Teach Dynamic Prog Name: TSP Strategy
Type: TSP Generation:Exhaustive
State Var.: 9 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Min Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3 4 5 6 7 8 9
State 1 0 0 0 0 0 0 0 1

Definitions
s1: City 1
s2: City 2
s3: City 3
s4: City 4
s5: City 5
s6: City 6
s7: City 7
s8: City 8
s9: Last Visited

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 0 0 0 0 0 0 0 1
1
Decision 5
Feas. 1 1
Min 2
Max 8
Step 1
3 7
7 1

Definitions
d1: Next City

Forward Transition Equations


Specify the forward transition equations.

State 1 0 0 0 0 0 0 0 1
Decision 5

1 2 3 4 5 6 7 8 9
Next State 1 0 0 0 1 0 0 0 5

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 0 0 0 0 0 0 0 1
Decision 5
Next State 1 0 0 0 1 0 0 0 5

Backward Recursive Eq. Decision Objective


f(s) 48.212 Z(s , d, sn) 4.5177 f(sn) 43.694

Initial States x_D: 0.4


Specify the logical conditions for t y_D: 4.5

1 2 3 4 5 6 7 8 9
State 1 0 0 0 0 0 0 0 1
Initial 1 1 1 1 1 1 1 1 1
Min 1 0 0 0 0 0 0 0 1
Max 1 0 0 0 0 0 0 0 1
Step 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 1
1 1 1 1 1 1 1 1 1 1

Final States
Specify the logical conditions for the final states.

1 2 3 4 5 6 7 8 9
State 1 0 0 0 0 0 0 0 1
Final 1 0 0 0 0 0 0 0 0
Min 1 1 1 1 1 1 1 1 2
Max 1 1 1 1 1 1 1 1 8
Step 1 1 1 1 1 1 1 1 1
0 1 1 1 1 1 1 1 1 7
7 7 7 7 7 7 7 7 7 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3 4 5 6 7 8 9
State 1 0 0 0 1 0 0 0 5
Feas. 1 1 1 1 1 1 1 1 1
Min 1 0 0 0 0 0 0 0 2
Max 1 1 1 1 1 1 1 1 8
Step 1 1 1 1 1 1 1 1 1
895 1 2 2 2 2 2 2 2 7
896 896 448 224 112 56 28 14 7 1
State and Decision Variable Names
Provide formulas that determine names for state and decision variables.

State 1 0 0 0 0 0 0 0 1
Decision 5

Formulas for State Variable Names


S(1):
S(2):
S(3):
S(4):
S(5):
S(6):
S(7):
S(8):
S(9): C1-

Formulas for Decision Variable Names


D(1): C5

Action C1-C5

Optimum Solution by Forward Recovery


State
Index 1 2 3 4 5 6 7 8 9
1 1 0 0 0 0 0 0 0 1
2 1 0 0 0 1 0 0 0 5
3 1 0 0 0 1 0 0 1 8
4 1 0 1 0 1 0 0 1 3
5 1 1 1 0 1 0 0 1 2
6 1 1 1 1 1 0 0 1 4
7 1 1 1 1 1 0 1 1 7
8 1 1 1 1 1 1 1 1 6
The decisions leave the states.
Number of States 449
Number of tree entries 704
Time to Generate 6 seconds
Time to Optimize 49 seconds
Time to Recover 2 seconds
Time to Show Results 0 seconds
Total Time 57 seconds

p:
City x
1 7
2 20
3 20.6
4 9
5 6.6
6 4.2
7 4.3
8 13.9
Value
1 0

Value
0 0

x_D: 0
y_D: 0

1
Decision
1 Value Action
5 47.112 C1-C5
8 42.595 C5-C8
3 35.226 C8-C3
2 28.04 C3-C2
4 22.01 C2-C4
7 10.863 C4-C7
6 5.3925 C7-C6
-- 4.8826 Final
2
y
9.2
9.3
15.3
7.5
13.7
5.2
4.7
12.7
Teach Dynamic Programming Name: DP1 Strategy
Type:Knapsack Generation: Forward
State Var.: 3 Recursion:Backward DP1_Strategy
Solve Decision Var.: 1 Recovery: Forward
Goal: Max Output: None
Option: Run Graphics: No
DP1_Params States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3
State 6 6 1 DP1_StateVector

Definitions
s1: Index of the item
s2: Amount used of resource 1
s3: Amount used of resource 2

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 6 6 1 DP1_StateDecVector
1
Decision 2 DP1_DecVector
Feas. 1 1 DP1_DecFeas
Min 0 DP1_DecLogic
Max 2 DP1_DecMin
Step 1 DP1_DecMax
2 3 DP1_DecStep
3 1
DP1_DecInd
Definitions DP1_DecIndMax
d1: Number to bring

Forward Transition Equations


Specify the forward transition equations.

State 6 6 1 DP1_StateForVector
Decision 2 DP1_DecForVector

1 2 3
Next State 7 14 2 DP1_NextStateVector

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 6 6 1 DP1_StateObjVector
Decision 2 DP1_DecObjVector
Next State 7 14 2 DP1_NextStateObjVector

Backward Recursive Eq. Decision Objective


f(s) 43 Z(s , d, sn) 20 f(sn) 23

DP1_StateValue DP1_DecValue DP1_NextStateValue


Initial States
Specify the logical conditions for the initial states.

1 2 3 DP1_StateIniVector
State 6 6 1 Value
Initial 0 0 0 0 0 DP1_IniStateValue
Min 1 0 0 DP1_IniStateFeas
Max 1 0 0 DP1_IniStateLogic
Step 1 1 1 DP1_IniStateMin, Max, and Step
0 1 1 1 DP1_IniStateInd
1 1 1 1 DP1_IniStateIndMax

Final States
Specify the logical conditions for the final states.

1 2 3 DP1_StateFinVector
State 6 6 1 Value
Final 0 1 1 0 0 DP1_FinStateValue
Min 11 0 0 DP1_FinStateFeas
Max 11 23 8 DP1_FinStateLogic
Step 1 1 1 DP1_FinStateMin, Max, and Step
0 1 24 9 DP1_FinStateInd
216 216 9 1 DP1_FinStateIndMax

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3
State 7 14 2 DP1_FeasStateVector
Feas. 1 1 1 1 DP1_FeasStateFeas
Min 2 0 0
Max 11 23 8 DP1_FeasStateLogic
Step 1 1 1 DP1_FeasStateMin, Max, and Step
0 10 24 9 DP1_FeasStateInd
2160 216 9 1 DP1_FeasStateIndMax

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 6 6 1 DP1_StateNamVector
Decision 2 DP1_DecNamVector
Formulas for State Variable Names
S(1): Stage 6:
S(2): DP1_StateNames
S(3):

Formulas for Decision Variable Names


D(1): ### DP1_DecNames

Action ###
DP1_Action

Optimum Solution by Forward Recovery


State Decision
Index 1 2 3 1 Value Action
1 1 0 0 0 63 Stage 1: Bring 0 of Item 1
2 2 0 0 0 63 Stage 2: Bring 0 of Item 2
3 3 0 0 2 63 Stage 3: Bring 2 of Item 3
4 4 6 1 0 43 Stage 4: Bring 0 of Item 4
5 5 6 1 0 43 Stage 5: Bring 0 of Item 5
6 6 6 1 2 43 Stage 6: Bring 2 of Item 6
7 7 14 2 1 23 Stage 7: Bring 1 of Item 7
8 8 15 3 0 20 Stage 8: Bring 0 of Item 8
9 9 15 3 0 20 Stage 9: Bring 0 of Item 9
10 10 15 3 2 20 Stage 10: Bring 2 of Item 10
11 11 23 4 -- 0 Final
The decisions leave the states.
Number of States 496
Number of tree entries 691
DP1_Strategy Time to Generate 11 seconds
Time to Optimize 15 seconds
Time to Recover 2 seconds
Time to Show Results 0 seconds
Total Time 28 seconds

Items
1 2 3 4 5 6
Benefit 6 10 10 3 7 10
Maximum 2 2 2 2 2 2

Resources Required per unit


Max. 1 2 3 4 5 6
1 23 3 6 3 2 8 4
2 8 1 1 1 1 1 1

2 1.6667 3.3333 1.5 0.875 2.5


0 0 2 0 0 2
38
Obj 63
NextStateValue

x, and Step
7 8 9 10
3 6 4 10
2 2 2 2

7 8 9 10 Slack Value
1 3 4 4 1 0
1 1 1 1 2 0

3 2 1 2.5
1 0 0 2
Teach Dynamic Prog Name: DP_1 Strategy
Type:Knapsack Generation: Forward
State Var.: 3 Recursion:Backward
Solve Decision Var.: 1 Recovery: Forward
Goal: Max Output: None
Option: Run Graphics: No
States/Stop: 100 Bounds: No

State Vector
Define the state variables.

1 2 3
State 1 0 0

Definitions
s1: Index of the item
s2: Amount used of resource 1
s3: Amount used of resource 2

Decision Vector
Define the elements of the decision vector and the logical conditions for feasible decisions.

State 1 0 0
1
Decision 0
Feas. 1 1
Min 0
Max 2
Step 1
0 3
3 1

Definitions
d1: Number to bring

Forward Transition Equations


Specify the forward transition equations.

State 1 0 0
Decision 0

1 2 3
Next State 2 0 0

Decision Objective and Recursive Equations


Put formulas in the cells f(s) and Z(s, d, sn).

State 1 0 0
Decision 0
Next State 2 0 0

Backward Recursive Eq. Decision Objective


f(s) 0 Z(s , d, sn) 0 f(sn) 0

Initial States
Specify the logical conditions for the initial states.

1 2 3
State 1 0 0 Value
Initial 1 1 1 1 0
Min 1 0 0
Max 1 0 0
Step 1 1 1
0 1 1 1
1 1 1 1

Final States
Specify the logical conditions for the final states.

1 2 3
State 1 0 0 Value
Final 0 1 1 0 0
Min 11 0 0
Max 11 10 25
Step 1 1 1
0 1 11 26
286 286 26 1

State Feasibility
Specify the logical conditions for state feasibility.

1 2 3
State 2 0 0
Feas. 1 1 1 1
Min 2 0 0
Max 11 10 25
Step 1 1 1
0 10 11 26
2860 286 26 1

State and Decision Variable Names


Provide formulas that determine names for state and decision variables.

State 1 0 0
Decision 0
Formulas for State Variable Names
S(1): Stage 1:
S(2):
S(3):

Formulas for Decision Variable Names


D(1): ###

Action ###
Items
1 2 3 4 5 6
Benefit 8 6 6 3 4 8
Maximum 2 2 2 2 2 2

Resources Required per unit


Max. 1 2 3 4 5 6
1 10 5 9 8 4 10 9
2 25 1 6 5 3 7 7
7 8 9 10
1 8 9 8
2 2 2 2

7 8 9 10 Slack Value
1 10 4 6 1 0
3 3 9 9 2 0

Anda mungkin juga menyukai