## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The diner needs to decide how many meat and veggie lunches to prepare and package to maximize profit, given the constraints on preparation and packaging time.

Let's define the decision variables:

* $M$: number of meat lunches
* $V$: number of veggie lunches

The objective function is to maximize profit:

* Profit per meat lunch: $8
* Profit per veggie lunch: $6
* Total profit: $8M + 6V

The constraints are:

* Preparation time: 5 minutes per meat lunch, 4 minutes per veggie lunch, and 500 minutes available
* Packaging time: 3 minutes per meat lunch, 5 minutes per veggie lunch, and 400 minutes available
* Non-negativity: $M \geq 0, V \geq 0$

## Mathematical Formulation

The mathematical formulation of the problem is:

Maximize: $8M + 6V$

Subject to:

* $5M + 4V \leq 500$ (preparation time constraint)
* $3M + 5V \leq 400$ (packaging time constraint)
* $M \geq 0, V \geq 0$ (non-negativity constraints)

## Gurobi Code

```python
import gurobi

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

# Define the decision variables
M = m.addVar(lb=0, name="Meat_Lunches")
V = m.addVar(lb=0, name="Veggie_Lunches")

# Define the objective function
m.setObjective(8 * M + 6 * V, gurobi.GRB.MAXIMIZE)

# Add the preparation time constraint
m.addConstr(5 * M + 4 * V <= 500, name="Preparation_Time")

# Add the packaging time constraint
m.addConstr(3 * M + 5 * V <= 400, name="Packaging_Time")

# Optimize the model
m.optimize()

# Print the solution
if m.status == gurobi.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Number of meat lunches: {M.varValue}")
    print(f"Number of veggie lunches: {V.varValue}")
    print(f"Maximum profit: {m.objVal}")
else:
    print("No optimal solution found.")
```