## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The furniture company wants to maximize its profit by producing the optimal number of chairs and shelves given the constraints on assembly and painting time.

Let's define the variables:
- \(x\): the number of chairs to produce
- \(y\): the number of shelves to produce

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 50x + 55y \]

The constraints based on the available time for assembly and painting are:
\[ \text{Assembly:} \quad 30x + 20y \leq 3000 \]
\[ \text{Painting:} \quad 50x + 60y \leq 4000 \]
\[ \text{Non-negativity:} \quad x \geq 0, y \geq 0 \]

## Gurobi Code

To solve this problem using Gurobi in Python, we will use the Gurobi Python interface. First, ensure you have Gurobi installed and a valid license.

```python
import gurobi

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

    # Define variables
    x = model.addVar(name="chairs", lb=0, vtype=gurobi.GRB.CONTINUOUS)
    y = model.addVar(name="shelves", lb=0, vtype=gurobi.GRB.CONTINUOUS)

    # Objective function: Maximize profit
    model.setObjective(50 * x + 55 * y, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(30 * x + 20 * y <= 3000, name="assembly_time")
    model.addConstr(50 * x + 60 * y <= 4000, name="painting_time")

    # Optimize model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal production levels: Chairs = {x.varValue}, Shelves = {y.varValue}")
        print(f"Maximum profit: ${model.objVal:.2f}")
    else:
        print("No optimal solution found.")

# Run the function
solve_furniture_production_problem()
```

This code defines a linear programming problem with the objective to maximize profit given the production of chairs and shelves under certain constraints. It then solves the problem using Gurobi and prints out the optimal production levels and the maximum achievable profit. If no optimal solution is found, it indicates that the problem is infeasible or unbounded.