To solve the given optimization problem, we first need to translate the natural language description into a symbolic representation that can be used in Gurobi. The key elements of this problem are:

- **Decision Variables**: Let \(P\) represent the number of pies and \(T\) represent the number of tarts.
- **Objective Function**: Maximize profit, where each pie yields $8 and each tart yields $5. So, the objective function is \(8P + 5T\).
- **Constraints**:
  - Blueberry constraint: Each pie needs 5 units of blueberries, and each tart needs 3 units. The bakery only has 1000 units of blueberries. Therefore, \(5P + 3T \leq 1000\).
  - Tart to pie ratio: The bakery must make at least three times as many tarts as pies, so \(T \geq 3P\).
  - Minimum pies: The bakery must make at least 30 pies, so \(P \geq 30\).
- **Non-negativity Constraints**: Both \(P\) and \(T\) must be non-negative since the bakery cannot produce a negative number of items. However, since both are quantities of products, they should also be integers.

Given these elements, we can formulate the problem as a linear integer programming problem.

Here is how you could implement this in Gurobi using Python:

```python
from gurobipy import *

# Create a model
m = Model("Bakery_Optimization")

# Define decision variables
P = m.addVar(vtype=GRB.INTEGER, name="pies")
T = m.addVar(vtype=GRB.INTEGER, name="tarts")

# Set objective function: Maximize profit
m.setObjective(8*P + 5*T, GRB.MAXIMIZE)

# Add constraints
m.addConstr(5*P + 3*T <= 1000, "blueberry_limit")
m.addConstr(T >= 3*P, "tart_to_pie_ratio")
m.addConstr(P >= 30, "minimum_pies")

# Optimize the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Pies: {P.x}")
    print(f"Tarts: {T.x}")
    print(f"Maximum Profit: ${8*P.x + 5*T.x:.2f}")
else:
    print("No optimal solution found.")
```