To solve this optimization problem, we need to define variables and constraints based on the given information. Let's denote:

- $L$ as the number of large packages,
- $S$ as the number of small packages.

The objective is to maximize profit. The profit from each large package is $3 (selling price - cost), and from each small package is $0.50 (selling price - cost). Therefore, the total profit can be represented as $3L + 0.5S$.

Constraints are as follows:
1. **Budget Constraint**: The store has a budget of $2000 for purchasing packages. Given that large packages cost $3 each and small packages cost $1 each, we have: $3L + S \leq 2000$.
2. **Shelf Space Constraint**: Each large package takes 3 units of shelf space, and each small package takes 1 unit. The store has 400 units available, so: $3L + S \leq 400$.
3. **Small Packages Percentage Constraint**: At least 70% of all stock should be small packages. If the total number of packages is $L + S$, then $0.7(L + S) \leq S$. This can be rearranged to $0.3S \geq 0.7L$ or $S \geq \frac{7}{3}L$.

To ensure that we are dealing with whole numbers of packages (since you cannot stock a fraction of a package), both $L$ and $S$ should be integers.

Now, let's translate this into Gurobi code in Python:

```python
from gurobipy import *

# Create a new model
m = Model("Ramen_Stocking")

# Define variables
L = m.addVar(vtype=GRB.INTEGER, name="Large_Packages")
S = m.addVar(vtype=GRB.INTEGER, name="Small_Packages")

# Set objective function: Maximize profit
m.setObjective(3*L + 0.5*S, GRB.MAXIMIZE)

# Add constraints
m.addConstr(3*L + S <= 2000, "Budget_Constraint")
m.addConstr(3*L + S <= 400, "Shelf_Space_Constraint")
m.addConstr(S >= (7/3)*L, "Small_Packages_Percentage_Constraint")

# Optimize model
m.optimize()

# Print solution
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of Large Packages: {L.x}")
    print(f"Number of Small Packages: {S.x}")
    print(f"Max Profit: {3*L.x + 0.5*S.x}")
else:
    print("No optimal solution found")
```