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
Page 1
Instructions
Page 2
Instructions
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
State 1 0
Decision 2
1 2
Next State 2 2
State 1 0
Decision 2
Next State 2 2
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 1 0
Decision 2
Action ###
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
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
State 1 0
Decision 0
1 2
Next State 2 0
State 1 0
Decision 0
Next State 2 0
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 1 0
Decision 0
Action ###
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
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
State 1 0 0
Decision 0
1 2 3
Next State 2 0 0
State 1 0 0
Decision 0
Next State 2 0 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 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 1 0 0
Decision 0
Formulas for State Variable Names
S(1): Stage 1:
S(2):
S(3):
Action ###
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
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
State 1 3 3
Decision 2 0
1 2 3
Next State 2 1 3
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 1 3 3
Decision 2 0
Formulas for State Variable Names
S(1): Job A
S(2):
S(3):
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
State 3
Decision 3
1
Next State 6
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 3
Decision 3
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
State 3
Decision 4
1
Next State 7
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 3
Decision 4
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
State 0
Decision 6
1
Next State 6
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 0
Decision 6
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
State 0
Decision 4
1
Next State 12
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 0
Decision 4
Action Bring 4
Items
1 2 3 4 5 6 7 8
Benefit 18 16.6 15 14.8 13.1 11.3 10.5 8.6
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
State 1 1
Decision 0
1 2
Next State 1 2
State 1 1
Decision 0
Next State 1 2
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 1 1
Decision 0
Action x(1,1):Go Up
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
State 1 1 0
Decision 0
1 2 3
Next State 1 2 0
State 1 1 0
Decision 0
Next State 1 2 0
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 1 1 0
Decision 0
Formulas for State Variable Names
S(1): x(1
S(2): ,1):
S(3):
Action x(1,1):Go Up
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
State 1
Decision 1
1
Next State 2
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 1
Decision 1
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
State 0 0 0 0
Decision 3
1 2 3 4
Next State 0 0 1 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 0 0 0 0
Decision 3
Formulas for State Variable Names
S(1):
S(2):
S(3):
S(4):
Action J3
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
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
State 1 0 0 0 0 0 0 0 1
Decision 5
Next State 1 0 0 0 1 0 0 0 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
Action C1-C5
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
State 6 6 1 DP1_StateForVector
Decision 2 DP1_DecForVector
1 2 3
Next State 7 14 2 DP1_NextStateVector
State 6 6 1 DP1_StateObjVector
Decision 2 DP1_DecObjVector
Next State 7 14 2 DP1_NextStateObjVector
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 6 6 1 DP1_StateNamVector
Decision 2 DP1_DecNamVector
Formulas for State Variable Names
S(1): Stage 6:
S(2): DP1_StateNames
S(3):
Action ###
DP1_Action
Items
1 2 3 4 5 6
Benefit 6 10 10 3 7 10
Maximum 2 2 2 2 2 2
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
State 1 0 0
Decision 0
1 2 3
Next State 2 0 0
State 1 0 0
Decision 0
Next State 2 0 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 1 0 0
Decision 0
Formulas for State Variable Names
S(1): Stage 1:
S(2):
S(3):
Action ###
Items
1 2 3 4 5 6
Benefit 8 6 6 3 4 8
Maximum 2 2 2 2 2 2
7 8 9 10 Slack Value
1 10 4 6 1 0
3 3 9 9 2 0