## Problem Description and Formulation

The film agency wants to maximize exposure for their new movie with a budget of at most $500,000. They have two media channels: social media adverts and magazine covers. Each social media advert costs $3,000 and reaches 100,000 viewers, while each magazine cover costs $6,000 and reaches 54,000 readers. The agency wants to use both media channels and has set the following constraints:

- At least 10 but at most 20 social media posts.
- At least 24 magazine covers.

## Mathematical Formulation

Let's denote:
- \(x\) as the number of social media adverts.
- \(y\) as the number of magazine covers.

The objective function to maximize exposure (\(E\)) is:
\[ E = 100,000x + 54,000y \]

Subject to:
1. Budget constraint: \( 3,000x + 6,000y \leq 500,000 \)
2. Social media posts constraints: \( 10 \leq x \leq 20 \)
3. Magazine covers constraint: \( y \geq 24 \)
4. Non-negativity constraints: \( x \geq 0, y \geq 0 \) (though the lower bounds for \(x\) and \(y\) are specified, these are more restrictive)

## Gurobi Code

```python
import gurobipy as gp

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

# Variables
x = m.addVar(10, 20, name="social_media_adverts")  # At least 10, at most 20
y = m.addVar(24, name="magazine_covers")  # At least 24

# Objective function: Maximize exposure
m.setObjective(100000*x + 54000*y, gp.GRB.MAXIMIZE)

# Budget constraint
m.addConstr(3000*x + 6000*y <= 500000, name="budget_constraint")

# Solve the model
m.optimize()

# Print the results
if m.status == gp.GRB.OPTIMAL:
    print("Optimal solution found.")
    print(f"Number of social media adverts: {x.varValue}")
    print(f"Number of magazine covers: {y.varValue}")
    print(f"Maximum exposure: {100000*x.varValue + 54000*y.varValue}")
else:
    print("No optimal solution found.")
```