## Problem Description and Formulation

The store sells hot sauce in large and small bottles. The goal is to maximize profit given certain constraints.

- Let \(L\) be the number of large bottles.
- Let \(S\) be the number of small bottles.

### Objective Function

The profit per large bottle is $5, and the profit per small bottle is $3. The objective is to maximize the total profit \(P\):

\[P = 5L + 3S\]

### Constraints

1. **Budget Constraint**: Each large bottle costs $3, and each small bottle costs $2. The store has a budget of $1000.

\[3L + 2S \leq 1000\]

2. **Shelf Space Constraint**: Each large bottle takes 2 units of shelf space, and each small bottle takes 1 unit. The store has 500 units of shelf space available.

\[2L + S \leq 500\]

3. **Product Mix Constraint**: The store wants at least 50% of all stock to be small bottles.

\[S \geq 0.5(L + S)\]

Simplifying this constraint:

\[S \geq 0.5L + 0.5S\]

\[0.5S \geq 0.5L\]

\[S \geq L\]

4. **Non-Negativity Constraints**: The number of bottles cannot be negative.

\[L \geq 0, S \geq 0\]

## Gurobi Code

```python
import gurobipy as gp

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

# Define variables
L = model.addVar(name="Large_Bottles", lb=0, vtype=gp.GRB.INTEGER)
S = model.addVar(name="Small_Bottles", lb=0, vtype=gp.GRB.INTEGER)

# Objective function: Maximize profit
model.setObjective(5*L + 3*S, gp.GRB.MAXIMIZE)

# Budget constraint
model.addConstr(3*L + 2*S <= 1000, name="Budget_Constraint")

# Shelf space constraint
model.addConstr(2*L + S <= 500, name="Shelf_Space_Constraint")

# Product mix constraint
model.addConstr(S >= L, name="Product_Mix_Constraint")

# Solve the model
model.optimize()

# Print the results
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal solution found. Large bottles: {L.varValue}, Small bottles: {S.varValue}")
    print(f"Max Profit: {model.objVal}")
else:
    print("No optimal solution found.")
```

This Gurobi code formulates the problem as described and solves for the optimal number of large and small bottles to maximize profit under the given constraints.