diff --git a/README.md b/README.md index 8eab8e2..bfc2815 100644 --- a/README.md +++ b/README.md @@ -2179,7 +2179,6 @@ The [**Assignment Problem**]() aims to allocate *n* tasks to *n* agents (machine
-🏄🏄🏄🏄🏄 ## 1. [Hungarian Method]() (Step by Step): @@ -2235,10 +2234,15 @@ The [**Assignment Problem**]() aims to allocate *n* tasks to *n* agents (machine
+🏄🏄🏄🏄🏄 -## Step 1: Set Up the Excel Spreadsheet +### [Step 1](): Set Up the Excel Spreadsheet -### 1. Enter the Cost Matrix +
+ +#### [1.1](): Enter the Cost Matrix + +
| | B | C | D | |-----|------|------|------| @@ -2247,9 +2251,15 @@ The [**Assignment Problem**]() aims to allocate *n* tasks to *n* agents (machine | T2 | 1 | 3 | 2 | | T3 | 5 | 2 | 4 | +
+ - Place this table in cells **B2:D4**. -### 2. Create the Decision Variable Table +
+ +#### [1.2](): Create the Decision Variable Table + +
| | G | H | I | |-----|------|------|------| @@ -2258,20 +2268,31 @@ The [**Assignment Problem**]() aims to allocate *n* tasks to *n* agents (machine | T2 | x21 | x22 | x23 | | T3 | x31 | x32 | x33 | +
+ - Place this table in **G2:I4**. - These cells will be filled with 0 or 1 by the Solver (1 = assigned, 0 = not assigned). -### 3. Calculate the Total Cost +
+ +### [1.3](): Calculate the Total Cost In cell **K2**, enter: + ```bash =SUMPRODUCT(B2:D4, G2:I4) ``` This formula multiplies each assignment by its cost and sums the total. -### 4. Add Row and Column Sums for Constraints + +
+ + +#### [.4](): Add Row and Column Sums for Constraints + +
#### Row Sums (Each Task Assigned Once) @@ -2285,9 +2306,10 @@ This formula multiplies each assignment by its cost and sums the total. - In **H5**: `=SUM(H2:H4)` - In **I5**: `=SUM(I2:I4)` +
-## Step 2: Configure Excel Solver +### [Step 2](): Configure Excel Solver 1. **Go to**: Data > Solver 2. **Set Objective**: @@ -2304,10 +2326,13 @@ This formula multiplies each assignment by its cost and sums the total.
-## Step 3: Solution Example +### [Step 3](): Solution Example After running Solver, you should get a solution like: +
+ + | | M1 | M2 | M3 | Row Sum | |-----|----|----|----|---------| | T1 | 1 | 0 | 0 | 1 | @@ -2315,6 +2340,8 @@ After running Solver, you should get a solution like: | T3 | 0 | 1 | 0 | 1 | |Col Sum| 1| 1 | 1 | | +
+ - **Task 1 → Machine 1** (cost 2) - **Task 2 → Machine 3** (cost 2) - **Task 3 → Machine 2** (cost 2) @@ -2325,6 +2352,8 @@ After running Solver, you should get a solution like: ## Excel Table and Formula Summary +
+ | | M1 | M2 | M3 | Row Sum | |-----|------|------|------|---------| | T1 | G2 | H2 | I2 | J2 | @@ -2332,20 +2361,24 @@ After running Solver, you should get a solution like: | T3 | G4 | H4 | I4 | J4 | |Col Sum|G5 | H5 | I5 | | +
+ - **Total Cost:** `=SUMPRODUCT(B2:D4, G2:I4)` - **Row Sums:** `=SUM(G2:I2)`, etc. - **Column Sums:** `=SUM(G2:G4)`, etc.
-### [Result](): +### [Step 4]():Result **The optimal assignment is:** - Task 1 to Machine 1 (cost 2) - Task 2 to Machine 3 (cost 2) - Task 3 to Machine 2 (cost 2) -### [**Total minimum cost:** 6]() +
+ +### **Total minimum cost:** [6]()