## Problem Description and Formulation

The tropical farmer has 200 acres of land to grow pineapples and bananas. The goal is to maximize profit given certain constraints.

### Variables
- Let \(P\) be the number of acres used to grow pineapples.
- Let \(B\) be the number of acres used to grow bananas.

### Objective Function
The profit per acre of pineapples is $200, and the profit per acre of bananas is $150. The objective is to maximize the total profit:
\[ \text{Maximize:} \quad 200P + 150B \]

### Constraints
1. **Total Land:** The farmer has 200 acres available.
\[ P + B \leq 200 \]

2. **Banana to Pineapple Ratio:** The farmer can grow at most 4 times the amount of bananas as pineapples.
\[ B \leq 4P \]

3. **Minimum Pineapples:** The farmer must grow at least 40 acres of pineapples.
\[ P \geq 40 \]

4. **Minimum Bananas:** The farmer must grow at least 60 acres of bananas.
\[ B \geq 60 \]

5. **Non-Negativity:** The acres for pineapples and bananas cannot be negative.
\[ P \geq 0, B \geq 0 \]
However, the minimum requirements already imply non-negativity for \(P\) and \(B\).

## Gurobi Code

```python
import gurobi

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

    # Variables
    P = m.addVar(lb=0, name="Pineapples")
    B = m.addVar(lb=0, name="Bananas")

    # Objective function: Maximize profit
    m.setObjective(200 * P + 150 * B, gurobi.GRB.MAXIMIZE)

    # Constraints
    m.addConstr(P + B <= 200, name="Total_Land")
    m.addConstr(B <= 4 * P, name="Banana_to_Pineapple_Ratio")
    m.addConstr(P >= 40, name="Minimum_Pineapples")
    m.addConstr(B >= 60, name="Minimum_Bananas")

    # Update model
    m.update()

    # Solve the model
    m.optimize()

    # Print solution
    if m.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal acres for Pineapples: {P.varValue}")
        print(f"Optimal acres for Bananas: {B.varValue}")
        print(f"Maximum profit: ${200 * P.varValue + 150 * B.varValue}")
    else:
        print("The model is infeasible.")

solve_farmer_problem()
```