## Problem Description and Formulation

The town has $100,000 to invest in two industries: mining and logging, with a 12-month commitment. The goal is to maximize the return on investment (ROI) under the following constraints:

1. The town must invest a minimum of 30% in the mining industry.
2. The town can invest at most 55% in the logging industry.
3. The total investment is $100,000.

The returns on investment for the mining and logging industries are 9% and 5%, respectively.

## Mathematical Formulation

Let \(x\) be the amount invested in the mining industry and \(y\) be the amount invested in the logging industry. The problem can be formulated as:

Maximize: \(0.09x + 0.05y\)

Subject to:

1. \(x + y = 100,000\)
2. \(x \geq 0.30 \times 100,000\)
3. \(y \leq 0.55 \times 100,000\)
4. \(x, y \geq 0\)

## Gurobi Code

```python
import gurobi

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

    # Define the variables
    x = model.addVar(name="mining_investment", lb=0)
    y = model.addVar(name="logging_investment", lb=0)

    # Objective function: Maximize 0.09x + 0.05y
    model.setObjective(0.09 * x + 0.05 * y, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x + y == 100000, name="total_investment")
    model.addConstr(x >= 0.30 * 100000, name="min_mining_investment")
    model.addConstr(y <= 0.55 * 100000, name="max_logging_investment")

    # Optimize the model
    model.optimize()

    # Print the results
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in mining: ${x.varValue:.2f}")
        print(f"Optimal investment in logging: ${y.varValue:.2f}")
        print(f"Max return: ${0.09 * x.varValue + 0.05 * y.varValue:.2f}")
    else:
        print("The model is infeasible.")

solve_investment_problem()
```