## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to maximize profit by determining the optimal number of couches and beds to stock in a furniture store, given certain constraints.

### Decision Variables

- Let \(C\) be the number of couches to stock.
- Let \(B\) be the number of beds to stock.

### Objective Function

The objective is to maximize profit. Given that the profit per couch sold is $200 and the profit per bed sold is $400, the objective function can be written as:

\[ \text{Maximize:} \quad 200C + 400B \]

### Constraints

1. **Space Constraint:** Each couch takes 15 sq ft of space, and each bed takes 20 sq ft of space. The store has 300 sq ft of space available.

\[ 15C + 20B \leq 300 \]

2. **Bed Percentage Constraint:** The store ensures that a minimum of 50% of all items in stock are beds.

\[ B \geq 0.5(C + B) \]

Simplifying this constraint:

\[ B \geq 0.5C + 0.5B \]

\[ 0.5B \geq 0.5C \]

\[ B \geq C \]

3. **Capital Constraint:** The store wants to spend at most $8000, with each couch costing $300 and each bed costing $600.

\[ 300C + 600B \leq 8000 \]

4. **Non-Negativity Constraints:** The number of couches and beds cannot be negative.

\[ C \geq 0, B \geq 0 \]

## Gurobi Code

```python
import gurobipy as gp

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

# Decision Variables
C = model.addVar(lb=0, name="Couches")  # Number of couches
B = model.addVar(lb=0, name="Beds")    # Number of beds

# Objective Function: Maximize profit
model.setObjective(200*C + 400*B, gp.GRB.MAXIMIZE)

# Constraints
model.addConstr(15*C + 20*B <= 300, name="Space_Constraint")
model.addConstr(B >= C, name="Bed_Percentage_Constraint")
model.addConstr(300*C + 600*B <= 8000, name="Capital_Constraint")

# Solve the model
model.optimize()

# Print solution
if model.status == gp.GRB.OPTIMAL:
    print(f"Optimal solution found.")
    print(f"Couches: {C.varValue}")
    print(f"Beds: {B.varValue}")
    print(f"Max Profit: {model.objVal}")
else:
    print("No optimal solution found.")
```