## Problem Description and Formulation

The problem is an optimization problem where we need to maximize the objective function:

\[ 7.08 \times \text{hours worked by Mary} + 2.43 \times \text{hours worked by George} + 4.45 \times \text{hours worked by Bill} \]

subject to various constraints on the resources/attributes: computer competence rating, work quality rating, paperwork competence rating, and organization score.

## Constraints

The constraints can be summarized as follows:

### Individual Ratings

- Mary's ratings: computer competence = 15, work quality = 2, paperwork competence = 7, organization = 6.
- George's ratings: computer competence = 4, work quality = 6, paperwork competence = 12, organization = 8.
- Bill's ratings: computer competence = 12, work quality = 10, paperwork competence = 6, organization = 4.

### Combined Ratings Constraints

1. Computer competence (Mary + Bill) >= 38
2. Computer competence (Mary + George + Bill) >= 53
3. Organization score (Mary + Bill) >= 28
4. Organization score (Mary + George + Bill) >= 29
5. Computer competence (George + Bill) <= 156
6. Computer competence (Mary + George + Bill) <= 156
7. Work quality (Mary + Bill) <= 66
8. Work quality (Mary + George + Bill) <= 92
9. Paperwork competence (Mary + Bill) <= 100
10. Paperwork competence (Mary + George + Bill) <= 100
11. Organization score (George + Bill) <= 33
12. Organization score (Mary + George + Bill) <= 33

## Gurobi Code Formulation

```python
import gurobi

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

    # Define variables
    M = model.addVar(lb=0, name="Mary_hours")  # hours worked by Mary
    G = model.addVar(lb=0, name="George_hours")  # hours worked by George
    B = model.addVar(lb=0, name="Bill_hours")  # hours worked by Bill

    # Objective function
    model.setObjective(7.08 * M + 2.43 * G + 4.45 * B, gurobi.GRB.MAXIMIZE)

    # Constraints
    # Individual ratings are implicitly handled as they are constants
    # Combined ratings constraints
    model.addConstr(15 * M + 12 * B >= 38, name="comp_M_B")
    model.addConstr(15 * M + 4 * G + 12 * B >= 53, name="comp_M_G_B")
    model.addConstr(6 * M + 4 * B >= 28, name="org_M_B")
    model.addConstr(6 * M + 8 * G + 4 * B >= 29, name="org_M_G_B")
    model.addConstr(4 * G + 12 * B <= 156, name="comp_G_B")
    model.addConstr(15 * M + 4 * G + 12 * B <= 156, name="comp_M_G_B上限")
    model.addConstr(2 * M + 10 * B <= 66, name="work_M_B")
    model.addConstr(2 * M + 6 * G + 10 * B <= 92, name="work_M_G_B")
    model.addConstr(7 * M + 6 * B <= 100, name="paper_M_B")
    model.addConstr(7 * M + 12 * G + 6 * B <= 100, name="paper_M_G_B")
    model.addConstr(8 * G + 4 * B <= 33, name="org_G_B")
    model.addConstr(6 * M + 8 * G + 4 * B <= 33, name="org_M_G_B上限")

    # Solve the model
    model.optimize()

    # Print the results
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Hours worked by Mary: {M.varValue}")
        print(f"Hours worked by George: {G.varValue}")
        print(f"Hours worked by Bill: {B.varValue}")
        print(f"Objective: {model.objVal}")
    else:
        print("No optimal solution found.")

optimize_hours()
```