## Problem Description and Formulation

The company produces two types of cars: SUVs and sedans. The production process involves two stages: manufacturing and testing. Each SUV requires 200 minutes of manufacturing time and 120 minutes of testing time. In contrast, each sedan requires 150 minutes of manufacturing time and 100 minutes of testing time. The company has a limited amount of time available for each stage: 20,000 minutes for manufacturing and 10,000 minutes for testing. The profit per SUV is $10,000, and the profit per sedan is $9,000. The goal is to determine the optimal number of SUVs and sedans to produce in order to maximize profit.

## Mathematical Formulation

Let's denote the number of SUVs to be produced as \(S\) and the number of sedans as \(D\). The problem can be formulated as a linear programming problem:

### Objective Function

Maximize the total profit:
\[ \text{Maximize:} \quad 10000S + 9000D \]

### Constraints

1. Manufacturing time constraint:
\[ 200S + 150D \leq 20000 \]

2. Testing time constraint:
\[ 120S + 100D \leq 10000 \]

3. Non-negativity constraints:
\[ S \geq 0, D \geq 0 \]

## Gurobi Code

```python
import gurobi

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

    # Define the variables
    S = model.addVar(name="SUV", lb=0, vtype=gurobi.GRB.INTEGER)
    D = model.addVar(name="sedan", lb=0, vtype=gurobi.GRB.INTEGER)

    # Objective function: Maximize profit
    model.setObjective(10000*S + 9000*D, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(200*S + 150*D <= 20000, name="manufacturing_time")
    model.addConstr(120*S + 100*D <= 10000, name="testing_time")

    # Optimize the model
    model.optimize()

    # Print the results
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal number of SUVs: {S.varValue}")
        print(f"Optimal number of sedans: {D.varValue}")
        print(f"Maximal profit: ${model.objVal}")
    else:
        print("The problem is infeasible")

if __name__ == "__main__":
    solve_production_problem()
```