## Problem Description and Formulation

The movie theatre has two types of passes: regular and premium. The goal is to maximize profit by determining the number of each type of pass to sell.

### Decision Variables

- $R$: Number of regular passes sold
- $P$: Number of premium passes sold

### Objective Function

The profit per regular pass is $40, and the profit per premium pass is $90. The objective is to maximize the total profit:

Maximize: $40R + 90P$

### Constraints

1. **Total Passes Sold**: The movie theatre can sell at most 500 passes.
   - $R + P \leq 500$

2. **Premium Passes Reserved**: The theatre reserves at least 100 passes to be premium.
   - $P \geq 100$

3. **Demand Preference**: At least 3 times as many people prefer to buy regular passes than premium passes.
   - $R \geq 3P$

4. **Non-Negativity**: The number of passes cannot be negative.
   - $R \geq 0, P \geq 0$

## Gurobi Code

```python
import gurobipy as gp

# Create a new model
model = gp.Model("MovieTheatrePasses")

# Decision Variables
R = model.addVar(lb=0, name="Regular_Passes")
P = model.addVar(lb=0, name="Premium_Passes")

# Objective Function: Maximize profit
model.setObjective(40*R + 90*P, gp.GRB.MAXIMIZE)

# Constraints
model.addConstr(R + P <= 500, name="Total_Passes")
model.addConstr(P >= 100, name="Premium_Reserved")
model.addConstr(R >= 3*P, name="Demand_Preference")

# Solve the model
model.solve()

# Output solution
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal Solution: Regular Passes = {R.varValue}, Premium Passes = {P.varValue}")
    print(f"Max Profit: ${40*R.varValue + 90*P.varValue}")
else:
    print("The model is infeasible.")
```