## Problem Description and Formulation

The company produces two types of phones: large size and small size. The production process involves two stages: manufacturing and testing. The goal is to maximize profit given the constraints on manufacturing and testing time.

### Variables
- Let \(L\) be the number of large size phones produced.
- Let \(S\) be the number of small size phones produced.

### Objective Function
The profit per large phone is $400, and the profit per small phone is $300. The objective is to maximize the total profit \(P\):
\[ P = 400L + 300S \]

### Constraints
1. **Manufacturing Time Constraint**: Large size phones take 20 minutes, and small size phones take 15 minutes. The company has 1500 minutes available on the manufacturing belt:
\[ 20L + 15S \leq 1500 \]

2. **Testing Time Constraint**: Large size phones take 12 minutes, and small size phones take 10 minutes. The company has 1000 minutes available for testing:
\[ 12L + 10S \leq 1000 \]

3. **Non-Negativity Constraint**: The number of phones cannot be negative:
\[ L \geq 0, S \geq 0 \]
\[ L \in \mathbb{Z}, S \in \mathbb{Z} \] (Assuming phones are produced in whole numbers)

## Gurobi Code

To solve this linear programming problem using Gurobi in Python, we can use the following code:

```python
import gurobi

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

    # Define variables
    L = model.addVar(name="Large_Phones", vtype=gurobi.GRB.INTEGER, lb=0)
    S = model.addVar(name="Small_Phones", vtype=gurobi.GRB.INTEGER, lb=0)

    # Objective function: Maximize profit
    model.setObjective(400*L + 300*S, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(20*L + 15*S <= 1500, name="Manufacturing_Time")
    model.addConstr(12*L + 10*S <= 1000, name="Testing_Time")

    # Optimize model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: Large phones = {L.varValue}, Small phones = {S.varValue}")
        print(f"Max Profit: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_phone_production_problem()
```

This code defines the problem in Gurobi, solving for the optimal number of large and small phones to produce in order to maximize profit, given the constraints on manufacturing and testing time. The solution will indicate how many of each type of phone the company should produce.