To solve Robert's pumpkin transportation problem, we need to formulate a linear programming (LP) model that maximizes the number of pumpkins transported given the constraints on truck and van capacities, costs, and the relationship between the number of trucks and vans used.

Let's define the decision variables:
- \(T\): Number of trips made by trucks.
- \(V\): Number of trips made by vans.

The objective is to maximize the total number of pumpkins transported. Since each truck can take 40 pumpkins and each van can take 25 pumpkins, the total number of pumpkins transported can be represented as \(40T + 25V\).

The constraints are:
1. **Cost Constraint**: The total cost of transporting the pumpkins must not exceed $300. Given that each truck trip costs $15 and each van trip costs $10, we have \(15T + 10V \leq 300\).
2. **Truck-Van Constraint**: The number of trucks must not exceed the number of vans, so \(T \leq V\).
3. **Non-Negativity Constraints**: Both \(T\) and \(V\) must be non-negative since they represent the number of trips.

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

```python
from gurobipy import *

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

# Define variables
T = m.addVar(vtype=GRB.INTEGER, name="Truck_Trips")
V = m.addVar(vtype=GRB.INTEGER, name="Van_Trips")

# Set the objective
m.setObjective(40*T + 25*V, GRB.MAXIMIZE)

# Add constraints
m.addConstr(15*T + 10*V <= 300, "Cost_Constraint")
m.addConstr(T <= V, "Truck_Van_Constraint")
m.addConstr(T >= 0, "Non_Negativity_Truck")
m.addConstr(V >= 0, "Non_Negativity_Van")

# Optimize the model
m.optimize()

# Print the results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Number of truck trips: {T.x}")
    print(f"Number of van trips: {V.x}")
    print(f"Total pumpkins transported: {40*T.x + 25*V.x}")
else:
    print("No optimal solution found.")
```