## Problem Description and Formulation

The problem is a classic example of a linear programming problem. Frank has 1500 acres of land, 1000 hours of tractor time, and $25000 of capital to plant carrots and pumpkins. The goal is to maximize profit.

Let's define the variables:
- \(x\): acres of carrots
- \(y\): acres of pumpkins

The constraints are:
1. Land: \(x + y \leq 1500\)
2. Tractor time: \(15x + 20y \leq 1000\)
3. Capital: \(12x + 55y \leq 25000\)
4. Non-negativity: \(x \geq 0, y \geq 0\)

The objective function to maximize profit is:
\(P = 80x + 124y\)

## Gurobi Code

To solve this problem using Gurobi in Python, we will follow these steps:
- Import the necessary libraries
- Create a Gurobi model
- Define the variables
- Set up the objective function
- Add the constraints
- Solve the model
- Print the solution

```python
import gurobi

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

    # Define the variables
    x = model.addVar(name="carrots", lb=0)
    y = model.addVar(name="pumpkins", lb=0)

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

    # Add constraints
    model.addConstr(x + y <= 1500, name="land_constraint")
    model.addConstr(15*x + 20*y <= 1000, name="tractor_time_constraint")
    model.addConstr(12*x + 55*y <= 25000, name="capital_constraint")

    # Optimize the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal acres of carrots: {x.varValue}")
        print(f"Optimal acres of pumpkins: {y.varValue}")
        print(f"Maximal profit: {model.objVal}")
    else:
        print("The model is infeasible")

if __name__ == "__main__":
    solve_optimization_problem()
```