To solve this optimization problem, we first need to define the variables and constraints involved.

Let's denote:
- $S$ as the number of sleeper class tickets sold,
- $G$ as the number of general class tickets sold.

The objective is to maximize profit. The profit made per sleeper class ticket is $200, and per general class ticket is $80. Therefore, the total profit $P$ can be represented as:
\[ P = 200S + 80G \]

Now, let's define the constraints based on the problem description:

1. The train can carry at most 400 passengers:
\[ S + G \leq 400 \]

2. At least 50 sleeper class tickets are reserved:
\[ S \geq 50 \]

3. At least 1.5 times as many passengers prefer to buy general class tickets than sleeper class tickets:
\[ G \geq 1.5S \]

We aim to find the values of $S$ and $G$ that maximize $P$, subject to these constraints.

Given these definitions, we can now formulate this problem in Gurobi using Python:

```python
from gurobipy import *

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

# Define variables
S = m.addVar(vtype=GRB.CONTINUOUS, name="sleeper_class_tickets", lb=0)
G = m.addVar(vtype=GRB.CONTINUOUS, name="general_class_tickets", lb=0)

# Define the objective function: Maximize profit
m.setObjective(200*S + 80*G, GRB.MAXIMIZE)

# Add constraints
m.addConstr(S + G <= 400, "total_passengers")
m.addConstr(S >= 50, "min_sleeper_class")
m.addConstr(G >= 1.5*S, "general_vs_sleeper")

# Optimize the model
m.optimize()

# Print results
if m.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Sleeper class tickets: {S.x}")
    print(f"General class tickets: {G.x}")
    print(f"Maximum profit: ${200*S.x + 80*G.x}")
else:
    print("No optimal solution found")

```