Skip to content

Commit 74c73e1

Browse files
Update README.md
Signed-off-by: Fabiana 🚀 Campanari <113218619+FabianaCampanari@users.noreply.github.com>
1 parent c3272e7 commit 74c73e1

File tree

1 file changed

+10
-71
lines changed

1 file changed

+10
-71
lines changed

README.md

Lines changed: 10 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,106 +1485,45 @@ u_1 = 0, leading to v_1 = 12, u_2 = 6, v_2 = 18, u_3 = -3, and v_3 = 37.
14851485

14861486
The **Assignment Problem** aims to allocate *n* tasks to *n* agents (machines, workers) at minimum cost, ensuring each task and agent is assigned exactly once.
14871487

1488-
### Mathematical Formulation
1489-
**Variables**: \( x_{ij} \) binary:
1490-
1491-
1492-
<br><br><br><br><br><br><br><br><br> 🚛
1493-
1494-
1495-
## [Exercise 2](): Assignment Problem - Mathematical Model and Solution by Hungarian Method
1496-
1497-
<br>
1488+
1489+
### [Problem Statement]():
14981490

1499-
### Problem Description
1491+
**Three tasks must be assigned to three machines. Each task can be performed on any machine, but with different costs. Assign each task to one machine, and each machine to one task, minimizing the total cost.**
15001492

1501-
Designate 4 workers to perform 4 tasks such that the total time to complete all tasks is minimized. The table below shows the time (cost) for each worker to perform each task.
1493+
### Cost Matrix
15021494

1503-
| Worker \ Task | Task 1 | Task 2 | Task 3 | Task 4 |
1504-
|---------------|---------|---------|---------|---------|
1505-
| Worker 1 | 9 | 2 | 7 | 8 |
1506-
| Worker 2 | 6 | 4 | 3 | 7 |
1507-
| Worker 3 | 5 | 8 | 1 | 8 |
1508-
| Worker 4 | 7 | 6 | 9 | 4
1495+
| | Machine 1 | Machine 2 | Machine 3 |
1496+
|---------|-----------|-----------|-----------|
1497+
| Task 1 | 2 | 4 | 3 |
1498+
| Task 2 | 1 | 3 | 2 |
1499+
| Task 3 | 5 | 2 | 4 |
15091500

15101501

15111502
<br>
15121503

1513-
### [Mathematical Model]():
1514-
1515-
#### Decision Variables
1516-
1517-
$
1518-
\[
1519-
x_{ij} =
1520-
\begin{cases}
1521-
1 & \text{if worker } i \text{ is assigned to task } j \\
1522-
0 & \text{otherwise}
1523-
\end{cases}
1524-
\]
1525-
$
1526-
15271504

1528-
```latex
1529-
\[
1530-
x_{ij} =
1531-
\begin{cases}
1532-
1 & \text{if worker } i \text{ is assigned to task } j \\
1533-
0 & \text{otherwise}
1534-
\end{cases}
1535-
\]
1536-
```
15371505

1538-
#### [Where](): $\( i, j \in \{1, 2, 3, 4\} \$.
15391506

1540-
<br>
15411507

1542-
### [Objective Function]():
15431508

1544-
#### Minimize the total time:
15451509

15461510

1547-
$
1548-
\[
1549-
\text{Minimize } Z = \sum_{i=1}^4 \sum_{j=1}^4 c_{ij} x_{ij}
1550-
\]
1551-
$
15521511

1553-
```latex
1554-
\[
1555-
x_{ij} =
1556-
\begin{cases}
1557-
1 & \text{if worker } i \text{ is assigned to task } j \\
1558-
0 & \text{otherwise}
1559-
\end{cases}
1560-
\]
1561-
```
15621512

1563-
#### [Where](): $\( c_{ij} \)$ is the time worker $\( i \)$ takes to complete task $\( j \)$.
15641513

1565-
<br>
15661514

1567-
### [Constraints]():
15681515

1569-
#### 1. Each worker is assigned exactly one task:
15701516

1571-
\[
1572-
\sum_{j=1}^4 x_{ij} = 1 \quad \forall i = 1,2,3,4
1573-
\]
15741517

1575-
2. Each task is assigned to exactly one worker:
15761518

1577-
\[
1578-
\sum_{i=1}^4 x_{ij} = 1 \quad \forall j = 1,2,3,4
1579-
\]
15801519

15811520

15821521

15831522

15841523

15851524

15861525

1587-
<br><br>
1526+
<br>
15881527

15891528

15901529

0 commit comments

Comments
 (0)