## Problem Description and Formulation

Andrew, a berry farmer, operates two farms: a local farm and a foreign farm. He has a contract with a local store to supply 12 kg of raspberries, 10 kg of bilberries, and 20 kg of strawberries. The local farm costs $200 to operate per day and can harvest and deliver 2.5 kg of raspberries, 3 kg of bilberries, and 2 kg of strawberries daily. The foreign farm costs $500 to operate per day and can harvest and deliver 5 kg of raspberries, 4 kg of bilberries, and 4 kg of strawberries daily.

## Decision Variables

Let \(x_l\) be the number of days to operate the local farm and \(x_f\) be the number of days to operate the foreign farm.

## Objective Function

The objective is to minimize the total operating cost:
\[ \text{Minimize:} \quad 200x_l + 500x_f \]

## Constraints

1. **Raspberries**: \( 2.5x_l + 5x_f \geq 12 \)
2. **Bilberries**: \( 3x_l + 4x_f \geq 10 \)
3. **Strawberries**: \( 2x_l + 4x_f \geq 20 \)
4. **Non-negativity**: \( x_l \geq 0, x_f \geq 0 \)

## Gurobi Code

```python
import gurobi

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

    # Define decision variables
    x_l = model.addVar(name="local_farm_days", lb=0, vtype=gurobi.GRB.CONTINUOUS)
    x_f = model.addVar(name="foreign_farm_days", lb=0, vtype=gurobi.GRB.CONTINUOUS)

    # Objective function: minimize cost
    model.setObjective(200 * x_l + 500 * x_f, gurobi.GRB.MINIMIZE)

    # Constraints
    model.addConstr(2.5 * x_l + 5 * x_f >= 12, name="raspberries_constraint")
    model.addConstr(3 * x_l + 4 * x_f >= 10, name="bilberries_constraint")
    model.addConstr(2 * x_l + 4 * x_f >= 20, name="strawberries_constraint")

    # Solve the model
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal cost: ${model.objval:.2f}")
        print(f"Operate local farm for {x_l.varValue:.2f} days")
        print(f"Operate foreign farm for {x_f.varValue:.2f} days")
    else:
        print("No optimal solution found")

solve_berry_farm_problem()
```