## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The goal is to maximize the profit of a candy store by determining the optimal number of packets of lemon and cherry candies to produce, given certain constraints.

Let's define the variables:

* $L$ = number of packets of lemon candy to produce
* $C$ = number of packets of cherry candy to produce

The objective function to maximize is the total profit:

* Maximize $5L + 7C$

The constraints are:

* Time constraint: $20L + 25C \leq 3000$ (total time available)
* Lemon candy constraint: $L \leq 100$ (maximum number of lemon candy packets)
* Cherry candy constraint: $C \leq 80$ (maximum number of cherry candy packets)
* Non-negativity constraints: $L \geq 0, C \geq 0$ (cannot produce a negative number of packets)

## Gurobi Code

```python
import gurobi

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

# Define the variables
L = m.addVar(lb=0, ub=100, name="Lemon_Candy")
C = m.addVar(lb=0, ub=80, name="Cherry_Candy")

# Define the objective function
m.setObjective(5*L + 7*C, gurobi.GRB.MAXIMIZE)

# Define the constraints
m.addConstr(20*L + 25*C <= 3000, name="Time_Constraint")

# Solve the model
m.optimize()

# Print the solution
if m.status == gurobi.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Lemon Candy: {L.varValue}")
    print(f"Cherry Candy: {C.varValue}")
    print(f"Max Profit: {m.objVal}")
else:
    print("No optimal solution found.")
```

This code defines a Gurobi model, adds the variables and constraints, sets the objective function, and solves the model. If an optimal solution is found, it prints the values of the variables and the maximum profit. Otherwise, it indicates that no optimal solution was found.