## Problem Description and Formulation

The problem described is a classic example of a linear programming problem. The goal is to maximize profit given certain constraints on resources (sewing machine and embroidery machine hours). Let's define the decision variables and the problem formally:

- **Decision Variables:**
  - \(D\): Number of dresses produced per week
  - \(S\): Number of suits produced per week

- **Objective Function (Profit):**
  - Profit per dress = $500
  - Profit per suit = $800
  - **Maximize:** \(500D + 800S\)

- **Constraints:**
  - Sewing machine hours: \(2D + S \leq 30\)
  - Embroidery machine hours: \(4D + S \leq 50\)
  - Non-negativity constraints: \(D \geq 0, S \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 as gp

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

# Define decision variables
D = model.addVar(lb=0, name="Dresses")
S = model.addVar(lb=0, name="Suits")

# Objective function: Maximize profit
model.setObjective(500*D + 800*S, gp.GRB.MAXIMIZE)

# Constraints
model.addConstr(2*D + S <= 30, name="Sewing_Constraint")
model.addConstr(4*D + S <= 50, name="Embroidery_Constraint")

# Optimize the model
model.optimize()

# Print the results
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal production: Dresses = {D.varValue}, Suits = {S.varValue}")
    print(f"Max Profit: ${model.objVal:.2f}")
else:
    print("The model is infeasible")
```