## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to maximize profit given certain constraints on production time and minimum quantities of scarfs and toques to be produced.

### Variables
- Let \(S\) be the number of scarfs produced.
- Let \(T\) be the number of toques produced.

### Objective Function
The profit per scarf is $20, and the profit per toque is $25. The objective function to maximize profit (\(P\)) is:
\[ P = 20S + 25T \]

### Constraints
1. **Knitting Time Constraint**: The factory has 250,000 knitting minutes available. A scarf takes 20 minutes to knit, and a toque takes 30 minutes to knit. Therefore:
\[ 20S + 30T \leq 250,000 \]

2. **Minimum Scarfs Constraint**: The factory must make at least 5000 scarfs:
\[ S \geq 5000 \]

3. **Minimum Toques Constraint**: The factory must make at least 3000 toques:
\[ T \geq 3000 \]

4. **Non-Negativity Constraints**: \( S \geq 0 \) and \( T \geq 0 \). However, these are implicitly satisfied by the minimum scarfs and toques constraints.

## Gurobi Code

```python
import gurobipy as gp

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

# Variables
S = m.addVar(lb=5000, name="scarfs")  # At least 5000 scarfs
T = m.addVar(lb=3000, name="toques")  # At least 3000 toques

# Objective function: Maximize profit
m.setObjective(20*S + 25*T, gp.GRB.MAXIMIZE)

# Constraints
m.addConstr(20*S + 30*T <= 250000, name="knitting_time")

# Solve the model
m.solve()

# Output the solution
if m.status == gp.GRB.Status.OPTIMAL:
    print(f"Optimal Solution: Scarfs = {S.varValue}, Toques = {T.varValue}")
    print(f"Max Profit: ${20*S.varValue + 25*T.varValue}")
else:
    print("No optimal solution found.")
```