## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The company wants to maximize its profit by producing the optimal number of tennis rackets and badminton rackets given the constraints on molding and stringing time.

Let's define the decision variables:

- \(T\): The number of tennis rackets to be produced.
- \(B\): The number of badminton rackets to be produced.

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 20T + 17B \]

Subject to the constraints:
1. Molding time constraint: \( 12T + 10B \leq 3000 \)
2. Stringing time constraint: \( 15T + 12B \leq 3500 \)
3. Non-negativity constraints: \( T \geq 0, B \geq 0 \)

## Gurobi Code

To solve this problem using Gurobi in Python, we will use the Gurobi Python API. First, ensure you have Gurobi installed in your Python environment. You can install it via pip:
```bash
pip install gurobi
```

Here's the Gurobi code for the problem:

```python
import gurobi as gp

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

# Define the decision variables
T = model.addVar(lb=0, name="TennisRackets")
B = model.addVar(lb=0, name="BadmintonRackets")

# Objective function: Maximize profit
model.setObjective(20*T + 17*B, gp.GRB.MAXIMIZE)

# Molding time constraint
model.addConstr(12*T + 10*B <= 3000, name="MoldingConstraint")

# Stringing time constraint
model.addConstr(15*T + 12*B <= 3500, name="StringingConstraint")

# Optimize the model
model.optimize()

# Print the results
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal production levels: Tennis Rackets = {T.varValue}, Badminton Rackets = {B.varValue}")
    print(f"Maximum profit: ${20*T.varValue + 17*B.varValue:.2f}")
else:
    print("The model is infeasible or unbounded.")
```

This code defines the model, sets up the objective function and constraints, solves the optimization problem, and then prints out the optimal production levels and the maximum achievable profit. If the problem is infeasible or unbounded, it will indicate that instead.