## Step 1: Define the optimization problem
The problem is to minimize the objective function: $5.87 \times \text{lanyards} + 8.98 \times \text{scissors} + 1.13 \times \text{red highlighters} + 9.47 \times \text{manila envelopes}$.

## Step 2: List all the constraints
1. $\text{lanyards} \times 4 + \text{scissors} \times 30 + \text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \leq 782$
2. $\text{lanyards} \times 24 + \text{scissors} \times 28 + \text{red highlighters} \times 10 + \text{manila envelopes} \times 4 \leq 401$
3. $\text{lanyards} \times 25 + \text{scissors} \times 10 + \text{red highlighters} \times 7 + \text{manila envelopes} \times 21 \leq 315$
4. $\text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \geq 81$
5. $\text{lanyards} \times 4 + \text{red highlighters} \times 27 \geq 94$
6. $\text{scissors} \times 30 + \text{manila envelopes} \times 24 \geq 141$
7. $\text{lanyards} \times 4 + \text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \geq 192$
8. $\text{scissors} \times 30 + \text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \geq 192$
9. $\text{lanyards} \times 4 + \text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \geq 155$
10. $\text{scissors} \times 30 + \text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \geq 155$
11. $\text{lanyards} \times 4 + \text{scissors} \times 30 + \text{red highlighters} \times 27 + \text{manila envelopes} \times 24 \geq 155$
12. $\text{red highlighters} \times 10 + \text{manila envelopes} \times 4 \geq 53$
13. $\text{scissors} \times 28 + \text{red highlighters} \times 10 \geq 40$
14. $\text{lanyards} \times 24 + \text{red highlighters} \times 10 \geq 37$
15. $\text{lanyards} \times 24 + \text{manila envelopes} \times 4 \geq 33$
16. $\text{scissors} \times 28 + \text{manila envelopes} \times 4 \geq 87$
17. $\text{lanyards} \times 24 + \text{red highlighters} \times 10 + \text{manila envelopes} \times 4 \geq 63$
18. $\text{lanyards} \times 24 + \text{scissors} \times 28 + \text{red highlighters} \times 10 + \text{manila envelopes} \times 4 \geq 63$
19. $\text{red highlighters} \times 7 + \text{manila envelopes} \times 21 \geq 27$
20. $\text{lanyards} \times 25 + \text{manila envelopes} \times 21 \geq 53$
21. $\text{lanyards} \times 25 + \text{red highlighters} \times 7 \geq 36$
22. $\text{scissors} \times 10 + \text{red highlighters} \times 7 \geq 39$
23. $\text{lanyards} \times 25 + \text{scissors} \times 10 \geq 49$
24. $\text{lanyards} \times 25 + \text{scissors} \times 10 + \text{red highlighters} \times 7 + \text{manila envelopes} \times 21 \geq 49$
25. $6 \times \text{scissors} - 9 \times \text{red highlighters} \geq 0$
26. $-10 \times \text{red highlighters} + 5 \times \text{manila envelopes} \geq 0$
27. $\text{lanyards} \times 25 + \text{scissors} \times 10 + \text{manila envelopes} \times 21 \leq 109$
28. $\text{lanyards} \times 25 + \text{red highlighters} \times 7 + \text{manila envelopes} \times 21 \leq 151$

## Step 3: Define the variables and their constraints
- $\text{lanyards}, \text{scissors}, \text{red highlighters}, \text{manila envelopes}$ are integer variables.

## 4: Implement the optimization problem using Gurobi
```python
import gurobi as gp

# Create a new model
m = gp.Model("optimization_problem")

# Define the variables
lanyards = m.addVar(name="lanyards", vtype=gp.GRB.INTEGER)
scissors = m.addVar(name="scissors", vtype=gp.GRB.INTEGER)
red_highlighters = m.addVar(name="red_highlighters", vtype=gp.GRB.INTEGER)
manila_envelopes = m.addVar(name="manila_envelopes", vtype=gp.GRB.INTEGER)

# Define the objective function
m.setObjective(5.87 * lanyards + 8.98 * scissors + 1.13 * red_highlighters + 9.47 * manila_envelopes, gp.GRB.MINIMIZE)

# Add constraints
m.addConstr(4 * lanyards + 30 * scissors + 27 * red_highlighters + 24 * manila_envelopes <= 782, "storage_space")
m.addConstr(24 * lanyards + 28 * scissors + 10 * red_highlighters + 4 * manila_envelopes <= 401, "workplace_safety_impact")
m.addConstr(25 * lanyards + 10 * scissors + 7 * red_highlighters + 21 * manila_envelopes <= 315, "dollar_cost")

m.addConstr(27 * red_highlighters + 24 * manila_envelopes >= 81, "red_highlighters_manila_envelopes_storage")
m.addConstr(4 * lanyards + 27 * red_highlighters >= 94, "lanyards_red_highlighters_storage")
m.addConstr(30 * scissors + 24 * manila_envelopes >= 141, "scissors_manila_envelopes_storage")
m.addConstr(4 * lanyards + 27 * red_highlighters + 24 * manila_envelopes >= 192, "total_storage_1")
m.addConstr(30 * scissors + 27 * red_highlighters + 24 * manila_envelopes >= 192, "total_storage_2")
m.addConstr(4 * lanyards + 27 * red_highlighters + 24 * manila_envelopes >= 155, "total_storage_3")
m.addConstr(30 * scissors + 27 * red_highlighters + 24 * manila_envelopes >= 155, "total_storage_4")
m.addConstr(4 * lanyards + 30 * scissors + 27 * red_highlighters + 24 * manila_envelopes >= 155, "total_storage_5")

m.addConstr(10 * red_highlighters + 4 * manila_envelopes >= 53, "red_highlighters_manila_envelopes_safety")
m.addConstr(28 * scissors + 10 * red_highlighters >= 40, "scissors_red_highlighters_safety")
m.addConstr(24 * lanyards + 10 * red_highlighters >= 37, "lanyards_red_highlighters_safety")
m.addConstr(24 * lanyards + 4 * manila_envelopes >= 33, "lanyards_manila_envelopes_safety")
m.addConstr(28 * scissors + 4 * manila_envelopes >= 87, "scissors_manila_envelopes_safety")
m.addConstr(24 * lanyards + 10 * red_highlighters + 4 * manila_envelopes >= 63, "total_safety_1")
m.addConstr(24 * lanyards + 28 * scissors + 10 * red_highlighters + 4 * manila_envelopes >= 63, "total_safety_2")

m.addConstr(7 * red_highlighters + 21 * manila_envelopes >= 27, "red_highlighters_manila_envelopes_cost")
m.addConstr(25 * lanyards + 21 * manila_envelopes >= 53, "lanyards_manila_envelopes_cost")
m.addConstr(25 * lanyards + 7 * red_highlighters >= 36, "lanyards_red_highlighters_cost")
m.addConstr(10 * scissors + 7 * red_highlighters >= 39, "scissors_red_highlighters_cost")
m.addConstr(25 * lanyards + 10 * scissors >= 49, "lanyards_scissors_cost")
m.addConstr(25 * lanyards + 10 * scissors + 7 * red_highlighters + 21 * manila_envelopes >= 49, "total_cost")

m.addConstr(6 * scissors - 9 * red_highlighters >= 0, "scissors_red_highlighters_constraint")
m.addConstr(-10 * red_highlighters + 5 * manila_envelopes >= 0, "red_highlighters_manila_envelopes_constraint")

m.addConstr(25 * lanyards + 10 * scissors + 21 * manila_envelopes <= 109, "lanyards_scissors_manila_envelopes_cost_limit")
m.addConstr(25 * lanyards + 7 * red_highlighters + 21 * manila_envelopes <= 151, "lanyards_red_highlighters_manila_envelopes_cost_limit")

# Solve the model
m.optimize()

# Print the solution
if m.status == gp.GRB.OPTIMAL:
    print("Objective: ", m.objVal)
    print("Lanyards: ", lanyards.varValue)
    print("Scissors: ", scissors.varValue)
    print("Red Highlighters: ", red_highlighters.varValue)
    print("Manila Envelopes: ", manila_envelopes.varValue)
else:
    print("No optimal solution found")
```