## Problem Description and Formulation

The store sells ramen in large and small packages. The goal is to maximize profit given certain constraints:

- Cost: Large packages cost $3 each, and small packages cost $1 each.
- Budget: The store has a budget of $2000.
- Shelf Space: Large packages take 3 units of shelf space, and small packages take 1 unit. The store has 400 units of shelf space available.
- Stock Composition: At least 70% of all stock must be small packages.
- Profit: The profit per large package is $3, and per small package is $0.50.

## Decision Variables

Let \(L\) be the number of large packages and \(S\) be the number of small packages.

## Objective Function

Maximize profit \(P = 3L + 0.50S\).

## Constraints

1. **Budget Constraint**: \(3L + S \leq 2000\)
2. **Shelf Space Constraint**: \(3L + S \leq 400\)
3. **Stock Composition Constraint**: \(S \geq 0.70(L + S)\)
4. **Non-Negativity Constraints**: \(L \geq 0, S \geq 0\)

## Gurobi Code

```python
import gurobipy as gp

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

# Decision variables
L = m.addVar(name="Large_Packages", lb=0, vtype=gp.GRB.INTEGER)
S = m.addVar(name="Small_Packages", lb=0, vtype=gp.GRB.INTEGER)

# Objective function: Maximize profit
m.setObjective(3*L + 0.50*S, sense=gp.GRB.MAXIMIZE)

# Budget constraint
m.addConstr(3*L + S <= 2000, name="Budget_Constraint")

# Shelf space constraint
m.addConstr(3*L + S <= 400, name="Shelf_Space_Constraint")

# Stock composition constraint: At least 70% small packages
m.addConstr(S >= 0.70*(L + S), name="Stock_Composition_Constraint")

# Solve the model
m.optimize()

# Print the results
if m.status == gp.GRB.OPTIMAL:
    print(f"Optimal Solution: Large Packages = {L.varValue}, Small Packages = {S.varValue}")
    print(f"Max Profit: ${m.objVal:.2f}")
else:
    print("The model is infeasible.")
```