## Problem Description and Formulation

Marty has $20,000 to invest in the fishing and transportation industries. The fishing industry yields a $0.3 return per dollar invested, whereas the transportation industry yields a $0.15 return per dollar invested. There are two constraints:

1. At least 40% of the money has to be used in fishing.
2. At least $5,000 has to be invested in transportation.

The goal is to maximize the total return on investment.

## Mathematical Formulation

Let \(F\) be the amount invested in the fishing industry and \(T\) be the amount invested in the transportation industry. The problem can be formulated as:

### Objective Function

Maximize the total return: \(0.3F + 0.15T\)

### Constraints

1. Total investment constraint: \(F + T \leq 20000\)
2. Fishing industry investment constraint: \(F \geq 0.4 \times 20000\)
3. Transportation industry investment constraint: \(T \geq 5000\)
4. Non-negativity constraints: \(F \geq 0, T \geq 0\)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    F = model.addVar(lb=0, name="Fishing_Investment")
    T = model.addVar(lb=0, name="Transportation_Investment")

    # Objective function: Maximize 0.3F + 0.15T
    model.setObjective(0.3 * F + 0.15 * T, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(F + T <= 20000, name="Total_Investment")
    model.addConstr(F >= 0.4 * 20000, name="Fishing_Min_Investment")
    model.addConstr(T >= 5000, name="Transportation_Min_Investment")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Investment:")
        print(f"Fishing: ${F.varValue}")
        print(f"Transportation: ${T.varValue}")
        print(f"Max Return: ${0.3 * F.varValue + 0.15 * T.varValue}")
    else:
        print("The problem is infeasible.")

solve_investment_problem()
```