## Problem Description and Formulation

The problem is a linear programming optimization problem. The goal is to maximize the return on investment for a woman who has $300,000 to invest in four companies: chocolate, coffee, peanut butter, and maple syrup. The return on investment for each company is given as follows:

- Chocolate company: 5%
- Coffee company: 10%
- Peanut butter company: 7%
- Maple syrup company: 6%

There are restrictions on the investments:

1. The amount invested in the chocolate company cannot exceed the amount invested in the maple syrup company.
2. The amount invested in the coffee company cannot exceed the amount invested in the peanut butter company.
3. At most 20% of her money can be invested in the maple syrup company.

## Symbolic Representation

Let's denote the amount invested in each company as follows:

- \(x_c\): Amount invested in the chocolate company
- \(x_{co}\): Amount invested in the coffee company
- \(x_{pb}\): Amount invested in the peanut butter company
- \(x_{ms}\): Amount invested in the maple syrup company

The objective function to maximize the total return on investment is:

\[ \text{Maximize:} \quad 0.05x_c + 0.10x_{co} + 0.07x_{pb} + 0.06x_{ms} \]

Subject to:

1. \( x_c \leq x_{ms} \)
2. \( x_{co} \leq x_{pb} \)
3. \( x_{ms} \leq 0.20 \times 300,000 \)
4. \( x_c + x_{co} + x_{pb} + x_{ms} \leq 300,000 \)
5. \( x_c, x_{co}, x_{pb}, x_{ms} \geq 0 \)

## Gurobi Code

```python
import gurobi

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

    # Define the variables
    x_c = model.addVar(name="chocolate", lb=0)
    x_co = model.addVar(name="coffee", lb=0)
    x_pb = model.addVar(name="peanut_butter", lb=0)
    x_ms = model.addVar(name="maple_syrup", lb=0)

    # Objective function
    model.setObjective(0.05 * x_c + 0.10 * x_co + 0.07 * x_pb + 0.06 * x_ms, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x_c <= x_ms, name="chocolate_maple_syrup_constraint")
    model.addConstr(x_co <= x_pb, name="coffee_peanut_butter_constraint")
    model.addConstr(x_ms <= 0.20 * 300000, name="maple_syrup_limit_constraint")
    model.addConstr(x_c + x_co + x_pb + x_ms <= 300000, name="total_investment_constraint")

    # Optimize the model
    model.optimize()

    # Print the results
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal investment amounts:")
        print(f"Chocolate: ${x_c.x:.2f}")
        print(f"Coffee: ${x_co.x:.2f}")
        print(f"Peanut Butter: ${x_pb.x:.2f}")
        print(f"Maple Syrup: ${x_ms.x:.2f}")
        print(f"Total return: ${model.objVal:.2f}")
    else:
        print("The model is infeasible.")

solve_investment_problem()
```