## Problem Description and Formulation

The problem is to maximize the average return of Cautious Asset Investment's portfolio, given the following constraints:

- Total investment: $150,000
- Two assets: money market fund with a 2% return and foreign bonds with a 10.2% return
- Minimum investment in money market fund: 40% of the total investment
- Maximum investment in foreign bonds: 40% of the total investment

## Symbolic Representation

Let's denote:
- \(x_1\) as the investment in the money market fund
- \(x_2\) as the investment in foreign bonds

The objective is to maximize the average return:
\[ \text{Maximize:} \quad 0.02x_1 + 0.102x_2 \]

Subject to:
1. Total investment constraint: \( x_1 + x_2 = 150,000 \)
2. Minimum investment in money market fund: \( x_1 \geq 0.4 \times 150,000 \)
3. Maximum investment in foreign bonds: \( x_2 \leq 0.4 \times 150,000 \)
4. Non-negativity constraints: \( x_1, x_2 \geq 0 \)

## Gurobi Code

```python
import gurobipy as gp

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

# Define variables
x1 = m.addVar(name="money_market_fund", lb=0)
x2 = m.addVar(name="foreign_bonds", lb=0)

# Objective function: Maximize average return
m.setObjective(0.02*x1 + 0.102*x2, gp.GRB.MAXIMIZE)

# Total investment constraint
m.addConstr(x1 + x2 == 150000, name="total_investment")

# Minimum investment in money market fund
m.addConstr(x1 >= 0.4 * 150000, name="min_money_market_fund")

# Maximum investment in foreign bonds
m.addConstr(x2 <= 0.4 * 150000, name="max_foreign_bonds")

# Solve the model
m.solve()

# Print the solution
if m.status == gp.GRB.OPTIMAL:
    print("Optimal Solution:")
    print(f"Investment in money market fund: ${x1.varValue:.2f}")
    print(f"Investment in foreign bonds: ${x2.varValue:.2f}")
    print(f"Optimal return: ${0.02*x1.varValue + 0.102*x2.varValue:.2f}")
else:
    print("No optimal solution found.")
```