## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The goal is to maximize the profit of a pizza store by determining the optimal number of cheese and pepperoni pizzas to produce, given the available resources (flour, cheese, and sauce).

Let's define the decision variables:

* `x`: number of cheese pizzas to produce
* `y`: number of pepperoni pizzas to produce

The objective function is to maximize the profit:

* Profit per cheese pizza: $7
* Profit per pepperoni pizza: $9

The constraints are:

* Flour: 30x + 40y ≤ 3000
* Cheese: 50x + 20y ≤ 4000
* Sauce: 40x + 30y ≤ 5000
* Non-negativity: x ≥ 0, y ≥ 0

## Gurobi Code

```python
import gurobipy as gp

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

# Define the decision variables
x = m.addVar(name="cheese_pizzas", lb=0, vtype=gp.GRB.INTEGER)
y = m.addVar(name="pepperoni_pizzas", lb=0, vtype=gp.GRB.INTEGER)

# Define the objective function
m.setObjective(7 * x + 9 * y, gp.GRB.MAXIMIZE)

# Define the constraints
m.addConstr(30 * x + 40 * y <= 3000, name="flour_constraint")
m.addConstr(50 * x + 20 * y <= 4000, name="cheese_constraint")
m.addConstr(40 * x + 30 * y <= 5000, name="sauce_constraint")

# Solve the model
m.optimize()

# Print the solution
if m.status == gp.GRB.OPTIMAL:
    print(f"Optimal solution: x = {x.varValue}, y = {y.varValue}")
    print(f"Maximum profit: ${7 * x.varValue + 9 * y.varValue:.2f}")
else:
    print("No optimal solution found")
```