## Problem Description and Formulation

The company needs to complete 100 tasks per hour with a maximum of 10 supervisors. There are two types of teams: small and large. A small team can perform 8 tasks per hour, requires 1 supervisor, and costs $5000. A large team can perform 20 tasks per hour, requires 3 supervisors, and costs $15000. The goal is to minimize the cost while meeting the requirements.

## Mathematical Formulation

Let's denote the number of small teams as \(S\) and the number of large teams as \(L\). The problem can be formulated as follows:

1. **Objective Function**: Minimize the total cost \(C = 5000S + 15000L\)
2. **Constraints**:
   - **Tasks**: \(8S + 20L \geq 100\) (to complete at least 100 tasks per hour)
   - **Supervisors**: \(S + 3L \leq 10\) (not to exceed 10 supervisors)
   - **Non-Negativity**: \(S \geq 0, L \geq 0\) and \(S, L\) are integers (since we cannot have a fraction of a team)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    S = m.addVar(vtype=gurobi.GRB.INTEGER, name="Small_Teams")
    L = m.addVar(vtype=gurobi.GRB.INTEGER, name="Large_Teams")

    # Objective function: Minimize cost
    m.setObjective(5000 * S + 15000 * L, gurobi.GRB.MINIMIZE)

    # Constraints
    m.addConstr(8 * S + 20 * L >= 100, name="Task_Requirement")
    m.addConstr(S + 3 * L <= 10, name="Supervisor_Limit")

    # Non-negativity constraints are inherently handled by defining variables as non-negative

    # Solve the model
    m.optimize()

    if m.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal Solution: Small Teams = {S.varValue}, Large Teams = {L.varValue}")
        print(f"Minimum Cost: ${m.objVal}")
    elif m.status == gurobi.GRB.INFEASIBLE:
        print("The problem is infeasible.")
    else:
        print("Failed to find an optimal solution.")

solve_team_formation()
```