## Problem Description and Formulation

The tropical farmer has 100 acres of land to grow guavas and mangos. The goal is to maximize profit given certain constraints:

1. The farmer prefers to grow more mangos than guavas but can grow at most 2 times the amount of mangos as guavas.
2. He must grow at least 20 acres of guavas and at least 40 acres of mangos.
3. The profit per acre of guavas is $300, and the profit per acre of mangos is $500.

Let's denote:
- \(G\) as the acres of guavas,
- \(M\) as the acres of mangos.

The constraints can be formulated as:
1. \(G + M \leq 100\) (total acres constraint)
2. \(M \leq 2G\) (mangos vs guavas constraint)
3. \(G \geq 20\) (minimum guavas constraint)
4. \(M \geq 40\) (minimum mangos constraint)
5. \(G, M \geq 0\) and are integers (non-negativity and integrality constraint)

The objective function to maximize profit is:
\[ \text{Maximize:} \quad 300G + 500M \]

## Gurobi Code

```python
import gurobipy as gp

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

# Define variables
G = m.addVar(lb=20, name="Guavas")  # At least 20 acres of guavas
M = m.addVar(lb=40, name="Mangos")  # At least 40 acres of mangos

# Objective function: Maximize profit
m.setObjective(300*G + 500*M, gp.GRB.MAXIMIZE)

# Constraints
m.addConstr(G + M <= 100, name="Total_Acres")  # Total acres constraint
m.addConstr(M <= 2*G, name="Mangos_vs_Guavas")  # Mangos vs guavas constraint

# Solve the model
m.optimize()

# Print solution
if m.status == gp.GRB.OPTIMAL:
    print(f"Optimal acres of Guavas: {G.varValue}")
    print(f"Optimal acres of Mangos: {M.varValue}")
    print(f"Max Profit: ${300*G.varValue + 500*M.varValue}")
else:
    print("The model is infeasible")
```