## Problem Description and Formulation

The grocery store has three types of nuts: almonds, pecans, and pistachios, with quantities 1000 grams, 1200 grams, and 1100 grams, respectively. They want to sell two mixtures of these nuts: Mixture 1 (20 grams almonds, 30 grams pecans, 10 grams pistachios) and Mixture 2 (15 grams almonds, 20 grams pecans, 25 grams pistachios), with profits $10 and $12 per mixture, respectively. The goal is to determine how many of each mixture to sell in order to maximize profit.

## Mathematical Formulation

Let \(x_1\) be the number of Mixture 1 to sell and \(x_2\) be the number of Mixture 2 to sell. The optimization problem can be formulated as:

Maximize: \(10x_1 + 12x_2\)

Subject to:
- \(20x_1 + 15x_2 \leq 1000\) (almond constraint)
- \(30x_1 + 20x_2 \leq 1200\) (pecan constraint)
- \(10x_1 + 25x_2 \leq 1100\) (pistachio constraint)
- \(x_1, x_2 \geq 0\) (non-negativity constraint)

## Gurobi Code

```python
import gurobipy as gp

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

# Define variables
x1 = model.addVar(name="Mixture1", lb=0)  # Number of Mixture 1
x2 = model.addVar(name="Mixture2", lb=0)  # Number of Mixture 2

# Define objective function
model.setObjective(10*x1 + 12*x2, gp.GRB.MAXIMIZE)

# Add constraints
model.addConstr(20*x1 + 15*x2 <= 1000, name="AlmondConstraint")
model.addConstr(30*x1 + 20*x2 <= 1200, name="PecanConstraint")
model.addConstr(10*x1 + 25*x2 <= 1100, name="PistachioConstraint")

# Solve the model
model.optimize()

# Print solution
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal solution: Mixture 1 = {x1.varValue}, Mixture 2 = {x2.varValue}")
    print(f"Maximum profit: ${model.objVal:.2f}")
else:
    print("No optimal solution found")
```