## Problem Description and Formulation

The family has $500,000 to invest in two industries: textile and telecom. The textile industry yields a 6% return, while the telecom industry yields an 8% return. The family wants to invest at least 30% of the total amount in the textile industry and no more than 50% in the telecom industry. The goal is to maximize the return on investment.

## Mathematical Formulation

Let's denote:
- \(x\) as the amount invested in the textile industry,
- \(y\) as the amount invested in the telecom industry.

The objective function to maximize the total return is:
\[ \text{Maximize:} \quad 0.06x + 0.08y \]

Subject to the constraints:
1. Total investment constraint: \( x + y \leq 500,000 \)
2. Minimum textile investment constraint: \( x \geq 0.3 \times 500,000 \)
3. Maximum telecom investment constraint: \( y \leq 0.5 \times 500,000 \)
4. Non-negativity constraints: \( x \geq 0, y \geq 0 \)

## Gurobi Code

```python
import gurobi

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

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

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

    # Constraints
    model.addConstr(x + y <= 500000, name="Total_Investment")
    model.addConstr(x >= 0.3 * 500000, name="Min_Textile_Investment")
    model.addConstr(y <= 0.5 * 500000, name="Max_Telecom_Investment")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in textile industry: ${x.varValue}")
        print(f"Optimal investment in telecom industry: ${y.varValue}")
        print(f"Max return: ${model.objVal}")
    else:
        print("No optimal solution found.")

solve_investment_problem()
```