## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The goal is to maximize the total profit of Joy Bakery by determining the optimal number of batches of bagels and croissants to produce, given the constraints on the available time for the dough mixer and the commercial bake oven.

Let's define the decision variables:
- \(x\): the number of batches of bagels to produce
- \(y\): the number of batches of croissants to produce

The objective function to maximize the total profit is:
\[ \text{Maximize:} \quad 7.5x + 5y \]

The constraints based on the available machine time are:
- Dough mixer constraint: \(2x + 1.5y \leq 2500\)
- Oven constraint: \(3.5x + 2y \leq 2500\)
- Non-negativity constraints: \(x \geq 0, y \geq 0\)

## Gurobi Code

To solve this problem using Gurobi in Python, we will use the Gurobi Python API. First, ensure you have Gurobi installed in your Python environment. You can install it via pip if you have the Gurobi license and credentials set up:
```bash
pip install gurobi
```

Here is the Gurobi code for the problem:

```python
import gurobi as gp

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

# Define the decision variables
x = model.addVar(name="bagels", lb=0, vtype=gp.GRB.CONTINUOUS)  # Batches of bagels
y = model.addVar(name="croissants", lb=0, vtype=gp.GRB.CONTINUOUS)  # Batches of croissants

# Objective function: Maximize profit
model.setObjective(7.5 * x + 5 * y, gp.GRB.MAXIMIZE)

# Constraints
model.addConstr(2 * x + 1.5 * y <= 2500, name="dough_mixer_constraint")  # Dough mixer constraint
model.addConstr(3.5 * x + 2 * y <= 2500, name="oven_constraint")  # Oven constraint

# Solve the model
model.optimize()

# Print the results
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal batches of bagels: {x.varValue}")
    print(f"Optimal batches of croissants: {y.varValue}")
    print(f"Maximum profit: ${model.objVal:.2f}")
else:
    print("The model is infeasible or has an error.")
```