## Problem Description and Formulation

The museum wants to maximize its profit from selling tickets. There are two types of tickets: guided and regular. The profit per guided ticket is $50, and the profit per regular ticket is $20. The museum has the following constraints:

1. The total number of tickets sold cannot exceed 300.
2. At least 50 tickets must be guided tickets.
3. The number of regular tickets sold must be at least three times the number of guided tickets sold.

## Mathematical Formulation

Let \(G\) be the number of guided tickets and \(R\) be the number of regular tickets. The objective is to maximize the total profit \(P = 50G + 20R\).

The constraints can be written as:

1. \(G + R \leq 300\)
2. \(G \geq 50\)
3. \(R \geq 3G\)

## Gurobi Code

```python
import gurobi

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

    # Define the variables
    G = model.addVar(lb=0, name="Guided_Tickets", vtype=gurobi.GRB.INTEGER)
    R = model.addVar(lb=0, name="Regular_Tickets", vtype=gurobi.GRB.INTEGER)

    # Objective function: Maximize profit
    model.setObjective(50*G + 20*R, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(G + R <= 300, name="Total_Tickets")
    model.addConstr(G >= 50, name="Min_Guided_Tickets")
    model.addConstr(R >= 3*G, name="Regular_vs_Guided")

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal Solution:")
        print(f"Guided Tickets: {G.varValue}")
        print(f"Regular Tickets: {R.varValue}")
        print(f"Max Profit: {model.objVal}")
    else:
        print("No optimal solution found.")

solve_museum_ticket_problem()
```