## Step 1: Define the symbolic variables and the objective function
Let's define the symbolic variables:
- $x_1$ = number of t-shirts
- $x_2$ = number of sweaters

The objective function to maximize profit is: $15x_1 + 20x_2$

## Step 2: Define the constraints
The constraints based on the problem description are:
1. Budget constraint: $20x_1 + 30x_2 \leq 1000$
2. T-shirt sales constraint: $20 \leq x_1 \leq 40$
3. Sweater sales constraint: $x_2 \leq 0.5x_1$
4. Non-negativity constraint: $x_1 \geq 0, x_2 \geq 0$

## 3: Convert constraints to standard form
The constraints in a standard form are:
1. $20x_1 + 30x_2 \leq 1000$
2. $x_1 \geq 20$
3. $x_1 \leq 40$
4. $x_2 \leq 0.5x_1$
5. $x_1, x_2 \geq 0$ (though $x_1, x_2 \geq 0$ is implicitly handled by the other constraints and the context of the problem)

## 4: Symbolic Representation
The symbolic representation of the problem is:
```json
{
'sym_variables': [('x1', 't-shirts'), ('x2', 'sweaters')],
'objective_function': '15*x1 + 20*x2',
'constraints': [
    '20*x1 + 30*x2 <= 1000',
    'x1 >= 20',
    'x1 <= 40',
    'x2 <= 0.5*x1'
]
}
```

## 5: Gurobi Code
Now, let's write the Gurobi code in Python to solve this problem:
```python
import gurobi

def solve_optimization_problem():
    # Create a new model
    model = gurobi.Model()

    # Define the variables
    x1 = model.addVar(lb=0, name="t-shirts")  # number of t-shirts
    x2 = model.addVar(lb=0, name="sweaters")  # number of sweaters

    # Objective function: maximize profit
    model.setObjective(15*x1 + 20*x2, gurobi.GRB.MAXIMIZE)

    # Budget constraint
    model.addConstr(20*x1 + 30*x2 <= 1000, name="budget_constraint")

    # T-shirt sales constraints
    model.addConstr(x1 >= 20, name="min_tshirts_constraint")
    model.addConstr(x1 <= 40, name="max_tshirts_constraint")

    # Sweater sales constraint
    model.addConstr(x2 <= 0.5*x1, name="sweater_tshirt_ratio_constraint")

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal solution found.")
        print(f"Number of t-shirts: {x1.varValue}")
        print(f"Number of sweaters: {x2.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_optimization_problem()
```