## Problem Description and Formulation

Marty has $10,000 to invest in both the wood and bamboo industries. The goal is to maximize the average return on investment given the following constraints:

1. The investment in the wood industry must be at least four times as much as that in the bamboo industry.
2. The investment in the wood industry must not exceed $7,000.
3. The total investment is $10,000.

Let's denote:
- \(W\) as the investment in the wood industry,
- \(B\) as the investment in the bamboo industry.

The constraints can be formulated as:
1. \(W \geq 4B\)
2. \(W \leq 7000\)
3. \(W + B = 10000\)

The objective is to maximize the total return, which is \(0.07W + 0.03B\).

## Converting to a Standard Optimization Problem

To use Gurobi, we need to convert this into a standard form. The problem is a linear programming problem and can be directly implemented in Gurobi.

## Gurobi Code

```python
import gurobi

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

    # Define variables
    W = model.addVar(lb=0, ub=10000, name="Wood_Investment")
    B = model.addVar(lb=0, ub=10000, name="Bamboo_Investment")

    # Objective: Maximize 0.07W + 0.03B
    model.setObjective(0.07 * W + 0.03 * B, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(W >= 4 * B, name="Wood_Bamboo_Ratio")
    model.addConstr(W <= 7000, name="Wood_Investment_Max")
    model.addConstr(W + B == 10000, name="Total_Investment")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in wood industry: ${W.varValue:.2f}")
        print(f"Optimal investment in bamboo industry: ${B.varValue:.2f}")
        print(f"Max return: ${0.07 * W.varValue + 0.03 * B.varValue:.2f}")
    else:
        print("No optimal solution found.")

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