```json
{
  "sym_variables": [
    ("x0", "milligrams of vitamin A"),
    ("x1", "milligrams of vitamin D"),
    ("x2", "milligrams of vitamin B4"),
    ("x3", "milligrams of vitamin B7"),
    ("x4", "grams of carbohydrates")
  ],
  "objective_function": "6*x0 + 4*x1 + 1*x2 + 4*x3 + 5*x4",
  "constraints": [
    "4*x0 + 5*x3 <= 207",
    "4*x0 + 8*x4 <= 261",
    "14*x1 + 5*x3 <= 72",
    "4*x0 + 14*x1 <= 169",
    "14*x1 + 2*x2 <= 248",
    "4*x0 + 14*x1 + 5*x3 <= 269",
    "4*x0 + 14*x1 + 2*x2 <= 150",
    "4*x0 + 14*x1 + 2*x2 + 5*x3 + 8*x4 <= 150",
    "7*x0 + 8*x1 <= 217",
    "8*x1 + 12*x4 <= 170",
    "9*x3 + 12*x4 <= 202",
    "7*x0 + 9*x3 <= 148",
    "7*x0 + 8*x1 + 5*x2 <= 114",
    "7*x0 + 8*x1 + 9*x3 <= 148",
    "7*x0 + 8*x1 + 12*x4 <= 87",
    "7*x0 + 5*x2 + 9*x3 <= 242",
    "8*x1 + 5*x2 + 9*x3 <= 254",
    "8*x1 + 5*x2 + 12*x4 <= 247",
    "7*x0 + 8*x1 + 5*x2 + 9*x3 + 12*x4 <= 247"
  ]
}
```

```python
import gurobipy as gp

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

    # Create variables
    x = m.addVars(5, lb=0, vtype=[gp.GRB.CONTINUOUS, gp.GRB.CONTINUOUS, gp.GRB.CONTINUOUS, gp.GRB.CONTINUOUS, gp.GRB.CONTINUOUS], name=["x0", "x1", "x2", "x3", "x4"])


    # Set objective function
    m.setObjective(6*x[0] + 4*x[1] + 1*x[2] + 4*x[3] + 5*x[4], gp.GRB.MAXIMIZE)

    # Add constraints
    m.addConstr(4*x[0] + 5*x[3] <= 207, "c0")
    m.addConstr(4*x[0] + 8*x[4] <= 261, "c1")
    m.addConstr(14*x[1] + 5*x[3] <= 72, "c2")
    m.addConstr(4*x[0] + 14*x[1] <= 169, "c3")
    m.addConstr(14*x[1] + 2*x[2] <= 248, "c4")
    m.addConstr(4*x[0] + 14*x[1] + 5*x[3] <= 269, "c5")
    m.addConstr(4*x[0] + 14*x[1] + 2*x[2] <= 150, "c6")
    m.addConstr(4*x[0] + 14*x[1] + 2*x[2] + 5*x[3] + 8*x[4] <= 150, "c7")
    m.addConstr(7*x[0] + 8*x[1] <= 217, "c8")
    m.addConstr(8*x[1] + 12*x[4] <= 170, "c9")
    m.addConstr(9*x[3] + 12*x[4] <= 202, "c10")
    m.addConstr(7*x[0] + 9*x[3] <= 148, "c11")
    m.addConstr(7*x[0] + 8*x[1] + 5*x[2] <= 114, "c12")
    m.addConstr(7*x[0] + 8*x[1] + 9*x[3] <= 148, "c13")
    m.addConstr(7*x[0] + 8*x[1] + 12*x[4] <= 87, "c14")
    m.addConstr(7*x[0] + 5*x[2] + 9*x[3] <= 242, "c15")
    m.addConstr(8*x[1] + 5*x[2] + 9*x[3] <= 254, "c16")
    m.addConstr(8*x[1] + 5*x[2] + 12*x[4] <= 247, "c17")
    m.addConstr(7*x[0] + 8*x[1] + 5*x[2] + 9*x[3] + 12*x[4] <= 247, "c18")


    # Optimize model
    m.optimize()

    if m.status == gp.GRB.OPTIMAL:
        for v in m.getVars():
            print('%s %g' % (v.varName, v.x))
        print('Obj: %g' % m.objVal)
    elif m.status == gp.GRB.INFEASIBLE:
        print('The model is infeasible.')
    else:
        print('Optimization ended with status %d' % m.status)


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

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