```json
{
  "sym_variables": [
    ("x0", "lanyards"),
    ("x1", "postage stamps"),
    ("x2", "cans of coffee")
  ],
  "objective_function": "7.8 * x0 + 3.65 * x1 + 4.87 * x2",
  "constraints": [
    "17 * x0 + 6 * x2 >= 20",
    "5 * x1 + 6 * x2 >= 12",
    "17 * x0 + 5 * x1 + 6 * x2 >= 20",
    "17 * x0 + 5 * x1 + 6 * x2 >= 20",
    "12 * x0 + 8 * x2 >= 54",
    "11 * x1 + 8 * x2 >= 52",
    "12 * x0 + 11 * x1 + 8 * x2 >= 52",
    "1 * x0 - 3 * x1 >= 0",
    "17 * x0 + 5 * x1 + 6 * x2 <= 39",
    "12 * x0 + 8 * x2 <= 151",
    "12 * x0 + 11 * x1 <= 65",
    "11 * x1 + 8 * x2 <= 101",
    "x0 integer",
    "x1 integer",
    "x2 integer"
  ]
}
```

```python
import gurobipy as gp

try:
    # Create a new model
    model = gp.Model("optimization_problem")

    # Create variables
    lanyards = model.addVar(vtype=gp.GRB.INTEGER, name="lanyards")
    postage_stamps = model.addVar(vtype=gp.GRB.INTEGER, name="postage_stamps")
    cans_of_coffee = model.addVar(vtype=gp.GRB.INTEGER, name="cans_of_coffee")

    # Set objective function
    model.setObjective(7.8 * lanyards + 3.65 * postage_stamps + 4.87 * cans_of_coffee, gp.GRB.MINIMIZE)

    # Add constraints
    model.addConstr(17 * lanyards + 6 * cans_of_coffee >= 20, "c1")
    model.addConstr(5 * postage_stamps + 6 * cans_of_coffee >= 12, "c2")
    model.addConstr(17 * lanyards + 5 * postage_stamps + 6 * cans_of_coffee >= 20, "c3")
    model.addConstr(12 * lanyards + 8 * cans_of_coffee >= 54, "c4")
    model.addConstr(11 * postage_stamps + 8 * cans_of_coffee >= 52, "c5")
    model.addConstr(12 * lanyards + 11 * postage_stamps + 8 * cans_of_coffee >= 52, "c6")
    model.addConstr(1 * lanyards - 3 * postage_stamps >= 0, "c7")
    model.addConstr(17 * lanyards + 5 * postage_stamps + 6 * cans_of_coffee <= 39, "c8")
    model.addConstr(12 * lanyards + 8 * cans_of_coffee <= 151, "c9")
    model.addConstr(12 * lanyards + 11 * postage_stamps <= 65, "c10")
    model.addConstr(11 * postage_stamps + 8 * cans_of_coffee <= 101, "c11")


    # Optimize model
    model.optimize()

    if model.status == gp.GRB.OPTIMAL:
        print('Obj: %g' % model.objVal)
        print('lanyards:', lanyards.x)
        print('postage_stamps:', postage_stamps.x)
        print('cans_of_coffee:', cans_of_coffee.x)
    elif model.status == gp.GRB.INFEASIBLE:
        print('The model is infeasible.')
    else:
        print('Optimization ended with status %d' % model.status)


except gp.GurobiError as e:
    print('Error code ' + str(e.errno) + ': ' + str(e))

except AttributeError:
    print('Encountered an attribute error')
```
