Skip to content

Commit aae8950

Browse files
Merge pull request #647 from Quantum-Software-Development/FabianaCampanari-patch-1
Add files via upload
2 parents 4684983 + 620f3c4 commit aae8950

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed
Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
2+
# Exer. 5b - Factory Task Assignment Using Excel Solver
3+
4+
### Problem Statement
5+
6+
In a factory there are 4 different cutting machines. 4 tasks must be processed daily. Tasks can be performed on any of the machines. The table below represents the processing times, in hours, of each task on each of the machines. Designate a machine for each task in such a way as to minimize the total time spent.
7+
8+
9+
---
10+
11+
## Step 1: Input the Cost Matrix in Excel
12+
Enter the processing times (hours) in a 4x4 grid.
13+
14+
| Machine \ Task | Task 1 | Task 2 | Task 3 | Task 4 |
15+
|----------------|--------|--------|--------|--------|
16+
| **Machine 1** | 5 | 24 | 13 | 7 |
17+
| **Machine 2** | 10 | 25 | 3 | 23 |
18+
| **Machine 3** | 28 | 9 | 8 | 5 |
19+
| **Machine 4** | 10 | 17 | 15 | 3 |
20+
21+
---
22+
23+
## Step 2: Create the Assignment Matrix
24+
Add a 4x4 grid for binary decision variables (0 or 1).
25+
26+
| Machine \ Task | Task 1 | Task 2 | Task 3 | Task 4 |
27+
|----------------|--------|--------|--------|--------|
28+
| **Machine 1** | 0 | 0 | 0 | 0 |
29+
| **Machine 2** | 0 | 0 | 0 | 0 |
30+
| **Machine 3** | 0 | 0 | 0 | 0 |
31+
| **Machine 4** | 0 | 0 | 0 | 0 |
32+
33+
---
34+
35+
## Step 3: Define Formulas
36+
37+
### **Objective Function (Total Time)**
38+
In cell `B10`, calculate the total time using:
39+
```
40+
41+
=SUMPRODUCT(B2:E5, B8:E11)
42+
43+
```
44+
45+
### **Constraints**
46+
- **Each machine assigned to one task**:
47+
In cells `F8:F11` (row sums):
48+
```
49+
50+
=SUM(B8:E8) // For Machine 1
51+
52+
```
53+
- **Each task assigned to one machine**:
54+
In cells `B12:E12` (column sums):
55+
```
56+
57+
=SUM(B8:B11) // For Task 1
58+
59+
```
60+
61+
---
62+
63+
## Step 4: Configure Excel Solver
64+
65+
1. **Open Solver**:
66+
Go to `Data` > `Solver`.
67+
68+
2. **Set Parameters**:
69+
- **Objective**: `B10` (Minimize).
70+
- **Variables**: `B8:E11` (Assignment matrix).
71+
- **Constraints**:
72+
- `B8:E11 = binary` (binary variables).
73+
- `F8:F11 = 1` (each machine assigned once).
74+
- `B12:E12 = 1` (each task assigned once).
75+
76+
3. **Solve**:
77+
Click `Solve` and select `Keep Solver Solution`.
78+
79+
---
80+
81+
## Step 5: Optimal Assignment
82+
83+
| Machine \ Task | Task 1 | Task 2 | Task 3 | Task 4 |
84+
|----------------|--------|--------|--------|--------|
85+
| **Machine 1** | 0 | 0 | 0 | 1 |
86+
| **Machine 2** | 0 | 0 | 1 | 0 |
87+
| **Machine 3** | 0 | 1 | 0 | 0 |
88+
| **Machine 4** | 1 | 0 | 0 | 0 |
89+
90+
**Total Time**:
91+
- Machine 1 → Task 4: 7
92+
- Machine 2 → Task 3: 3
93+
- Machine 3 → Task 2: 9
94+
- Machine 4 → Task 1: 10
95+
**Total = 7 + 3 + 9 + 10 = 19**
96+
97+
---
98+
99+
## Final Excel Setup
100+
101+
| | B | C | D | E | F |
102+
|----------|---------|---------|---------|---------|---------|
103+
| **8** | 0 | 0 | 0 | 1 | `=SUM(B8:E8)` → 1 |
104+
| **9** | 0 | 0 | 1 | 0 | `=SUM(B9:E9)` → 1 |
105+
| **10** | 0 | 1 | 0 | 0 | `=SUM(B10:E10)` → 1 |
106+
| **11** | 1 | 0 | 0 | 0 | `=SUM(B11:E11)` → 1 |
107+
| **12** | 1 | 1 | 1 | 1 | |
108+

0 commit comments

Comments
 (0)