## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to minimize the cost of a mixture of sour drops and sour belts while satisfying certain constraints on sourness, flavoring, and the number of sour belts.

### Variables

- Let \(x\) be the number of sour drops.
- Let \(y\) be the number of sour belts.

### Objective Function

The cost of sour drops is $0.50 per unit and the cost of sour belts is $0.40 per unit. The objective function to minimize is:

\[ \text{Minimize:} \quad 0.50x + 0.40y \]

### Constraints

1. **Sourness Constraint:** Each sour drop has 2 units of sourness and each sour belt has 4 units of sourness. The mixture must contain at least 30 units of sourness.

\[ 2x + 4y \geq 30 \]

2. **Flavoring Constraint:** Each sour drop has 4 units of flavoring and each sour belt has 3 units of flavoring. The mixture must contain at least 40 units of flavoring.

\[ 4x + 3y \geq 40 \]

3. **Sour Belt Constraint:** The mixture can contain at most 5 sour belts.

\[ y \leq 5 \]

4. **Non-Negativity Constraints:** The number of sour drops and sour belts cannot be negative.

\[ x \geq 0, \quad y \geq 0 \]

## Gurobi Code

```python
import gurobi

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

    # Define variables
    x = model.addVar(lb=0, name="sour_drops")  # Number of sour drops
    y = model.addVar(lb=0, name="sour_belts")  # Number of sour belts

    # Objective function: Minimize cost
    model.setObjective(0.50 * x + 0.40 * y, gurobi.GRB.MINIMIZE)

    # Constraints
    model.addConstr(2 * x + 4 * y >= 30, name="sourness_constraint")
    model.addConstr(4 * x + 3 * y >= 40, name="flavoring_constraint")
    model.addConstr(y <= 5, name="sour_belt_limit")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: x = {x.varValue}, y = {y.varValue}")
        print(f"Minimum cost: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_candy_mixture_problem()
```