## Problem Description and Formulation

The store sells two types of donuts: regular and jelly-filled. The costs and profits associated with each type are as follows:

- Regular donut: Cost = $4, Profit = $2
- Jelly-filled donut: Cost = $6, Profit = $3

The store has two main constraints:

1. **Demand Constraint:** The store can sell at most 1000 donuts in a month.
2. **Budget Constraint:** The store wants to spend at most $5000 in buying donuts from the bakery.

Let \(R\) be the number of regular donuts and \(J\) be the number of jelly-filled donuts.

## Objective Function

The objective is to maximize the total monthly profit. The profit from regular donuts is $2\(R\) and from jelly-filled donuts is $3\(J\). Therefore, the objective function can be written as:

Maximize: \(2R + 3J\)

## Constraints

1. **Demand Constraint:** \(R + J \leq 1000\)
2. **Budget Constraint:** \(4R + 6J \leq 5000\)
3. **Non-Negativity Constraints:** \(R \geq 0, J \geq 0\)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    R = model.addVar(lb=0, name="Regular_Donuts", vtype=gurobi.GRB.CONTINUOUS)
    J = model.addVar(lb=0, name="Jelly_Filled_Donuts", vtype=gurobi.GRB.CONTINUOUS)

    # Objective function: Maximize profit
    model.setObjective(2*R + 3*J, gurobi.GRB.MAXIMIZE)

    # Demand constraint
    model.addConstr(R + J <= 1000, name="Demand_Constraint")

    # Budget constraint
    model.addConstr(4*R + 6*J <= 5000, name="Budget_Constraint")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal Solution: Regular Donuts = {R.varValue}, Jelly-filled Donuts = {J.varValue}")
        print(f"Maximum Profit: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

solve_donut_problem()
```