Walkthrough: Binding Data to Decisions
When you create a model, you can bind data to decisions so that the model can be performed over a range. In this supply chain example, you can add the number of aircraft on different routes to a model.
To add data to an Excel spreadsheet
-
In the Solver Foundation ribbon, click Model to display the Modeling Pane.
-
In the Excel worksheet, enter the following data.
Aircraft
Route
AC
Rte
Allocation
Boeing 777
NY-LA
0
0
10
Boeing 777
NY-SF
0
1
0
Boeing 777
NY-Dallas
0
2
0
Boeing 777
NY-Houston
0
3
0
Boeing 777
NY-Boston
0
4
0
Boeing 737
NY-LA
1
0
0
Boeing 737
NY-SF
1
1
10
Boeing 737
NY-Dallas
1
2
3
Boeing 737
NY-Houston
1
3
6
Boeing 737
NY-Boston
1
4
0
Airbus A320
NY-LA
2
0
0
Airbus A320
NY-SF
2
1
5
Airbus A320
NY-Dallas
2
2
0
Airbus A320
NY-Houston
2
3
0
Airbus A320
NY-Boston
2
4
20
Airbus A330
NY-LA
3
0
9
Airbus A330
NY-SF
3
1
0
Airbus A330
NY-Dallas
3
2
6
Airbus A330
NY-Houston
3
3
0
Airbus A330
NY-Boston
3
4
0
Unallocated
NY-LA
4
0
0
Unallocated
NY-SF
4
1
0
Unallocated
NY-Dallas
4
2
0
Unallocated
NY-Houston
4
3
0
Unallocated
NY-Boston
4
4
0
To bind data to a decision
-
Select all the data in the three rightmost columns, including the column names.
-
In the Sets tab, click New, and then click Set.
-
For the Name, type Aircraft.
-
In the Domain drop-down menu, select Any.
-
In the Sets tab, click New, and then click Set.
-
For the Name, type Routes.
-
In the Domain drop-down menu, select Any.
-
In the Decisions tab, click New, and then click Decision.
-
For the Name, type Allocation.
-
In the Domain drop-down menu, select Nonnegative Real.
-
Next to Binding, click the (…) ellipsis button.
-
The Binding Editor appears.
-
Verify that the range in the Table/Range text box is correct.
-
In the Set column, select Aircraft.
-
In the Columns column, select AC.
-
In the Set column, select Routes.
-
In the Columns column, select Rte.
-
In the Value Field drop-down, ensure that Allocation is selected.
-
Click OK.