## Problem Description and Formulation

The office chair company produces two types of chairs: leather and mesh. There are two teams, A and B, responsible for making the leather and mesh chairs, respectively. Team A can produce at most 20 leather chairs per day, and Team B can produce at most 30 mesh chairs per day. A separate team is responsible for quality checking both types of chairs, with a capacity of 30 chairs per day, regardless of type.

The profit per leather chair is $150, and the profit per mesh chair is $100. The goal is to determine the optimal number of leather and mesh chairs to produce daily in order to maximize profit.

## Mathematical Formulation

Let \(L\) be the number of leather chairs produced and \(M\) be the number of mesh chairs produced.

The constraints are:
1. \(L \leq 20\) (Team A's production limit)
2. \(M \leq 30\) (Team B's production limit)
3. \(L + M \leq 30\) (Quality checking team's capacity limit)
4. \(L \geq 0\) and \(M \geq 0\) (Non-negativity constraints, as the number of chairs cannot be negative)

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 150L + 100M \]

## Gurobi Code

```python
import gurobi

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

    # Define variables
    L = model.addVar(lb=0, ub=20, name="Leather_Chairs")
    M = model.addVar(lb=0, ub=30, name="Mesh_Chairs")

    # Objective function: Maximize profit
    model.setObjective(150*L + 100*M, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(L <= 20, name="Leather_Production_Limit")
    model.addConstr(M <= 30, name="Mesh_Production_Limit")
    model.addConstr(L + M <= 30, name="Quality_Checking_Capacity")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal number of leather chairs: {L.varValue}")
        print(f"Optimal number of mesh chairs: {M.varValue}")
        print(f"Maximal profit: ${model.objVal:.2f}")
    else:
        print("The problem is infeasible.")

solve_chair_production()
```