## Problem Description and Formulation

The company has $300,000 to invest in a 12-month commitment and can invest in two industries: paper and glass. The paper industry yields a 2% return, while the glass industry yields a 5% return. The board of directors has set two constraints:

1. A minimum of 30% of the investment must be placed in the paper industry.
2. At most 50% of the investment can be placed in the glass industry.

The goal is to maximize the return on investment.

## Mathematical Formulation

Let's denote the amount invested in the paper industry as \(x\) and the amount invested in the glass industry as \(y\).

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

Subject to the constraints:
1. \( x + y \leq 300,000 \) (total investment constraint)
2. \( x \geq 0.3 \times 300,000 \) (minimum investment in paper industry)
3. \( y \leq 0.5 \times 300,000 \) (maximum investment in glass industry)
4. \( x, y \geq 0 \) (non-negativity constraint)

## Converting to Gurobi Code

```python
import gurobi

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

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

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

    # Constraints
    model.addConstr(x + y <= 300000, name="total_investment")
    model.addConstr(x >= 0.3 * 300000, name="min_paper_investment")
    model.addConstr(y <= 0.5 * 300000, name="max_glass_investment")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal investment in paper industry: ${x.varValue:.2f}")
        print(f"Optimal investment in glass industry: ${y.varValue:.2f}")
        print(f"Max return: ${0.02*x.varValue + 0.05*y.varValue:.2f}")
    else:
        print("No optimal solution found.")

solve_investment_problem()
```