## Problem Description and Formulation

The problem is a linear programming optimization problem. Lucy has $30,000 to invest in two industries: automotive and textile. The automotive industry earns a 10% return, while the textile industry earns an 8% return. There are two constraints:

1. The money invested in the automotive industry must be at least three times as much as the money invested in the textile industry.
2. The money invested in the automotive industry must be at most $24,000.

The goal is to maximize the total profit.

## Mathematical Formulation

Let $x$ be the amount invested in the automotive industry and $y$ be the amount invested in the textile industry.

The objective function to maximize is: $0.10x + 0.08y$

Subject to:

1. $x + y \leq 30000$ (total investment constraint)
2. $x \geq 3y$ (automotive industry investment constraint)
3. $x \leq 24000$ (automotive industry upper bound constraint)
4. $x, y \geq 0$ (non-negativity constraint)

## Gurobi Code

```python
import gurobi

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

    # Define variables
    x = model.addVar(name="automotive_investment", lb=0)
    y = model.addVar(name="textile_investment", lb=0)

    # Objective function: maximize profit
    model.setObjective(0.10 * x + 0.08 * y, gurobi.GRB.MAXIMIZE)

    # Constraints
    model.addConstr(x + y <= 30000, name="total_investment_constraint")
    model.addConstr(x >= 3 * y, name="automotive_investment_constraint")
    model.addConstr(x <= 24000, name="automotive_upper_bound_constraint")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in automotive industry: ${x.varValue:.2f}")
        print(f"Optimal investment in textile industry: ${y.varValue:.2f}")
        print(f"Maximum profit: ${0.10 * x.varValue + 0.08 * y.varValue:.2f}")
    else:
        print("No optimal solution found.")

solve_investment_problem()
```