## Problem Description and Formulation

The problem is a classic example of a linear programming problem. The goal is to maximize the profit of a lighting company that produces two types of lightbulbs, LED and Halogen, given the constraints on the availability of two machines: a plastics machine and a wiring machine.

### Decision Variables

Let \(x\) be the number of packages of LED lightbulbs and \(y\) be the number of packages of Halogen lightbulbs.

### Objective Function

The profit per package of LED lightbulbs is $30, and the profit per package of Halogen lightbulbs is $50. The objective is to maximize the total profit \(P\), which can be represented as:
\[P = 30x + 50y\]

### Constraints

1. **Plastics Machine Constraint**: It takes 6 minutes to make a package of LED lightbulbs and 9 minutes to make a package of Halogen lightbulbs. The plastics machine is available for at most 500 minutes per day. Therefore:
\[6x + 9y \leq 500\]

2. **Wiring Machine Constraint**: It takes 12 minutes to make a package of LED lightbulbs and 10 minutes to make a package of Halogen lightbulbs. The wiring machine is available for at most 500 minutes per day. Therefore:
\[12x + 10y \leq 500\]

3. **Non-Negativity Constraints**: The number of packages of lightbulbs cannot be negative:
\[x \geq 0, y \geq 0\]

## Gurobi Code

```python
import gurobi

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

    # Define the decision variables
    x = model.addVar(name="LED", lb=0, vtype=gurobi.GRB.CONTINUOUS)  # Packages of LED lightbulbs
    y = model.addVar(name="Halogen", lb=0, vtype=gurobi.GRB.CONTINUOUS)  # Packages of Halogen lightbulbs

    # Define the objective function
    model.setObjective(30*x + 50*y, gurobi.GRB.MAXIMIZE)

    # Add constraints
    model.addConstr(6*x + 9*y <= 500, name="Plastics_Machine_Constraint")
    model.addConstr(12*x + 10*y <= 500, name="Wiring_Machine_Constraint")

    # Optimize the model
    model.optimize()

    # Print the results
    if model.status == gurobi.GRB.OPTIMAL:
        print(f"Optimal solution: LED = {x.varValue}, Halogen = {y.varValue}")
        print(f"Maximum profit: ${model.objVal:.2f}")
    else:
        print("The model is infeasible.")

solve_lightbulb_problem()
```

This code defines the optimization problem using Gurobi's Python interface, solves it, and prints out the optimal production levels for LED and Halogen lightbulbs, along with the maximum achievable profit. If the problem is infeasible, it indicates that there is no solution that satisfies all the constraints.