## Problem Description and Formulation

The problem is a linear programming (LP) optimization problem. Joel wants to minimize the cost of his diet while meeting certain nutritional requirements. He has two options: chocolate protein shakes and vanilla meal replacement smoothies.

Let's define the variables:

* $x$: the number of servings of chocolate protein shakes
* $y$: the number of servings of vanilla meal replacement smoothies

The objective function is to minimize the total cost:

* Cost of chocolate protein shakes: $8 per serving
* Cost of vanilla meal replacement smoothies: $10 per serving

The constraints are:

* Protein: at least 150 units per day
* Carbs: at least 130 units per day
* Fat: no more than 50 units per day

## Mathematical Formulation

The mathematical formulation of the problem is:

Minimize: $8x + 10y$

Subject to:

* $35x + 15y \geq 150$ (protein constraint)
* $20x + 25y \geq 130$ (carbs constraint)
* $3x + 10y \leq 50$ (fat constraint)
* $x \geq 0, y \geq 0$ (non-negativity constraints)

## Gurobi Code

```python
import gurobi

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

# Define the variables
x = model.addVar(lb=0, name="chocolate_shakes")
y = model.addVar(lb=0, name="vanilla_smoothies")

# Define the objective function
model.setObjective(8*x + 10*y, gurobi.GRB.MINIMIZE)

# Define the constraints
model.addConstr(35*x + 15*y >= 150, name="protein_constraint")
model.addConstr(20*x + 25*y >= 130, name="carbs_constraint")
model.addConstr(3*x + 10*y <= 50, name="fat_constraint")

# Optimize the model
model.optimize()

# Print the solution
if model.status == gurobi.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Chocolate shakes: {x.varValue}")
    print(f"Vanilla smoothies: {y.varValue}")
    print(f"Total cost: {model.objVal}")
else:
    print("No optimal solution found.")
```