## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to maximize profit by determining the number of bottom deck seats and top deck seats to allocate on a double-decker bus.

### Decision Variables

- $x$: Number of bottom deck seats
- $y$: Number of top deck seats

### Objective Function

The profit made on each bottom deck seat ticket is $25, and on each top deck seat ticket is $35. The objective is to maximize the total profit:

Maximize: $25x + 35y$

### Constraints

1. The bus can carry at most 50 passengers:
   - $x + y \leq 50$

2. The bus factory reserves at least 10 seats as bottom deck seats:
   - $x \geq 10$

3. A minimum of 2 times as many passengers prefer to travel on top deck seats than on bottom deck seats:
   - $y \geq 2x$

4. Non-negativity constraints:
   - $x \geq 0$
   - $y \geq 0$

Since $x$ and $y$ represent the number of seats, they must be integers. However, for the purpose of this linear programming problem, we will first solve it without the integer constraint and then consider how to adjust for integer solutions if necessary.

## Gurobi Code

```python
import gurobi

def solve_bus_seating_problem():
    # Create a new model
    model = gurobi.Model()

    # Decision variables
    x = model.addVar(lb=0, name="bottom_deck_seats", vtype=gurobi.GRB.INTEGER)
    y = model.addVar(lb=0, name="top_deck_seats", vtype=gurobi.GRB.INTEGER)

    # Objective function: Maximize profit
    model.setObjective(25 * x + 35 * y, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x + y <= 50, name="total_passengers")
    model.addConstr(x >= 10, name="min_bottom_deck_seats")
    model.addConstr(y >= 2 * x, name="top_deck_preference")

    # Solve the model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: bottom deck seats = {x.varValue}, top deck seats = {y.varValue}")
        print(f"Max Profit: ${25 * x.varValue + 35 * y.varValue}")
    else:
        print("No optimal solution found")

solve_bus_seating_problem()
```

This code sets up the optimization problem with Gurobi, solves it, and prints out the optimal number of seats for each deck and the maximum profit achievable. Note that the `vtype=gurobi.GRB.INTEGER` argument ensures that $x$ and $y$ are treated as integer variables, which is crucial for this problem since fractional seats do not make sense.