Skip to content

Commit 8927907

Browse files
Merge pull request #643 from Quantum-Software-Development/FabianaCampanari-patch-1
Add files via upload
2 parents 22e88fb + 1aa5fb7 commit 8927907

File tree

1 file changed

+110
-0
lines changed

1 file changed

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

0 commit comments

Comments
 (0)