## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The sandwich store wants to maximize its profit by producing the optimal number of large and small sandwiches given the constraints on preparation and toasting time.

Let's define the decision variables:
- \(L\): the number of large sandwiches to produce
- \(S\): the number of small sandwiches to produce

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 5L + 3.5S \]

The constraints based on the given times are:
- Preparation time: \( 4L + 3S \leq 1000 \)
- Toasting time: \( 5L + 4S \leq 1200 \)
- Non-negativity: \( L \geq 0, S \geq 0 \)

## Gurobi Code

To solve this problem using Gurobi in Python, we will use the Gurobi Python interface. First, ensure you have Gurobi installed and a valid license.

```python
import gurobi

# Create a new model
model = gurobi.Model()

# Define the decision variables
L = model.addVar(lb=0, name="Large_Sandwiches")
S = model.addVar(lb=0, name="Small_Sandwiches")

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

# Preparation time constraint
model.addConstr(4*L + 3*S <= 1000, name="Preparation_Time")

# Toasting time constraint
model.addConstr(5*L + 4*S <= 1200, name="Toasting_Time")

# Optimize the model
model.optimize()

# Print the status of the optimization
print("Optimization Status:", model.status)

if model.status == gurobi.GRB.OPTIMAL:
    # Print the optimal values of L and S
    print("Optimal Number of Large Sandwiches:", L.varValue)
    print("Optimal Number of Small Sandwiches:", S.varValue)
    print("Max Profit: $", 5*L.varValue + 3.5*S.varValue)
else:
    print("The model is infeasible or unbounded.")
```