## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The goal is to maximize the profit of a food truck by determining the optimal number of egg sandwiches and ham sandwiches to produce, given the constraints on the available eggs and ham.

Let's define the decision variables:

* $x_1$: number of egg sandwiches to produce
* $x_2$: number of ham sandwiches to produce

The objective function is to maximize the profit:

* Profit per egg sandwich: $3.5
* Profit per ham sandwich: $5
* Total profit: $3.5x_1 + 5x_2$

The constraints are:

* Eggs: Each egg sandwich requires 5 eggs, and each ham sandwich requires 1 egg. The truck has 50 eggs available.
* Ham: Each egg sandwich requires 2 slices of ham, and each ham sandwich requires 4 slices of ham. The truck has 60 slices of ham available.
* Non-negativity: The number of sandwiches to produce cannot be negative.

## Mathematical Formulation

The mathematical formulation of the problem is:

Maximize: $3.5x_1 + 5x_2$

Subject to:

* $5x_1 + x_2 \leq 50$ (eggs constraint)
* $2x_1 + 4x_2 \leq 60$ (ham constraint)
* $x_1 \geq 0$ (non-negativity constraint)
* $x_2 \geq 0$ (non-negativity constraint)

## Gurobi Code

```python
import gurobi

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

    # Define the decision variables
    x1 = model.addVar(lb=0, name="egg_sandwiches")
    x2 = model.addVar(lb=0, name="ham_sandwiches")

    # Define the objective function
    model.setObjective(3.5 * x1 + 5 * x2, gurobi.GRB.MAXIMIZE)

    # Add the eggs constraint
    model.addConstr(5 * x1 + x2 <= 50, name="eggs_constraint")

    # Add the ham constraint
    model.addConstr(2 * x1 + 4 * x2 <= 60, name="ham_constraint")

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal solution found.")
        print(f"Egg sandwiches: {x1.varValue}")
        print(f"Ham sandwiches: {x2.varValue}")
        print(f"Max profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_sandwich_problem()
```