```json
{
  "sym_variables": [
    ("x0", "grams of carbohydrates"),
    ("x1", "milligrams of vitamin B9"),
    ("x2", "milligrams of iron"),
    ("x3", "milligrams of calcium"),
    ("x4", "milligrams of potassium"),
    ("x5", "grams of protein")
  ],
  "objective_function": "7.84*x0**2 + 6.33*x1**2 + 8.31*x1*x3 + 6.11*x0 + 4.45*x1 + 8.97*x2",
  "constraints": [
    "12*x0 + 4*x4 + 14*x5 >= 16",
    "12*x0**2 + 7*x1**2 + 4*x4**2 >= 16",
    "7*x1 + 16*x2 + 9*x3 >= 16",
    "7*x1**2 + 9*x3**2 + 14*x5**2 >= 16",
    "12*x0 + 16*x2 + 7*x1 >= 16",
    "12*x0 + 16*x2 + 14*x5 >= 16",
    "7*x1 + 4*x4 + 14*x5 >= 16",
    "12*x0**2 + 9*x3**2 + 4*x4**2 >= 16",
    "12*x0 + 16*x2 + 9*x3 >= 16",
    "16*x2**2 + 9*x3**2 + 4*x4**2 >= 16",
    "7*x1**2 + 16*x2**2 + 14*x5**2 >= 16",
    "7*x1 + 16*x2 + 4*x4 >= 16",
    "16*x2 + 9*x3 + 14*x5 >= 16",
    "12*x0**2 + 16*x2**2 + 4*x4**2 >= 16",
    "9*x3 + 4*x4 + 14*x5 >= 16",
    "7*x1**2 + 9*x3**2 + 4*x4**2 >= 16",
    "12*x0**2 + 4*x4**2 + 14*x5**2 >= 27",
    "12*x0 + 7*x1 + 4*x4 >= 27",
    "7*x1 + 16*x2 + 9*x3 >= 27",
    "7*x1**2 + 9*x3**2 + 14*x5**2 >= 27",
    "12*x0**2 + 7*x1**2 + 16*x2**2 >= 27",
    "12*x0 + 16*x2 + 14*x5 >= 27",
    "7*x1 + 4*x4 + 14*x5 >= 27",
    "12*x0 + 9*x3 + 4*x4 >= 27",
    "12*x0 + 16*x2 + 9*x3 >= 27",
    "16*x2 + 9*x3 + 4*x4 >= 27",
    "7*x1 + 16*x2 + 14*x5 >= 27",
    "7*x1 + 16*x2 + 4*x4 >= 27",
    "16*x2 + 9*x3 + 14*x5 >= 27",
    "12*x0 + 16*x2 + 4*x4 >= 27",
    "9*x3 + 4*x4 + 14*x5 >= 27",
    "7*x1**2 + 9*x3**2 + 4*x4**2 >= 27",
    "12*x0 + 4*x4 + 14*x5 >= 20",
    "12*x0**2 + 7*x1**2 + 4*x4**2 >= 20",
    "7*x1**2 + 16*x2**2 + 9*x3**2 >= 20",
    "7*x1 + 9*x3 + 14*x5 >= 20",
    "12*x0 + 7*x1 + 16*x2 >= 20",
    "12*x0 + 16*x2 + 14*x5 >= 20",
    "7*x1 + 4*x4 + 14*x5 >= 20",
    "12*x0 + 9*x3 + 4*x4 >= 20",
    "12*x0 + 16*x2 + 9*x3 >= 20",
    "16*x2 + 9*x3 + 4*x4 >= 20",
    "7*x1**2 + 16*x2**2 + 14*x5**2 >= 20",
    "7*x1 + 16*x2 + 4*x4 >= 20",
    "16*x2 + 9*x3 + 14*x5 >= 20",
    "12*x0**2 + 16*x2**2 + 4*x4**2 >= 20",
    "9*x3 + 4*x4 + 14*x5 >= 20",
    "7*x1**2 + 9*x3**2 + 4*x4**2 >= 20",
    "12*x0**2 + 4*x4**2 + 14*x5**2 >= 29",
    "12*x0 + 7*x1 + 4*x4 >= 29",
    "7*x1**2 + 16*x2**2 + 9*x3**2 >= 29",
    "7*x1**2 + 9*x3**2 + 14*x5**2 >= 29",
    "12*x0 + 7*x1 + 16*x2 >= 29",
    "12*x0**2 + 16*x2**2 + 14*x5**2 >= 29",
    "7*x1**2 + 4*x4**2 + 14*x5**2 >= 29",
    "12*x0**2 + 9*x3**2 + 4*x4**2 >= 29",
    "12*x0 + 16*x2 + 9*x3 >= 29",
    "16*x2**2 + 9*x3**2 + 4*x4**2 >= 29",
    "7*x1**2 + 16*x2**2 + 14*x5**2 >= 29",
    "7*x1 + 16*x2 + 4*x4 >= 29",
    "16*x2**2 + 9*x3**2 + 14*x5**2 >= 29",
    "12*x0**2 + 16*x2**2 + 4*x4**2 >= 29",
    "9*x3**2 + 4*x4**2 + 14*x5**2 >= 29",
    "7*x1 + 9*x3 + 4*x4 >= 29",
    "12*x0 + 4*x4 + 14*x5 >= 31",
    "12*x0 + 7*x1 + 4*x4 >= 31",
    "7*x1 + 16*x2 + 9*x3 >= 31",
    "7*x1 + 9*x3 + 14*x5 >= 31",
    "12*x0 + 7*x1 + 16*x2 >= 31",
    "12*x0**2 + 16*x2**2 + 14*x5**2 >= 31",
    "7*x1 + 4*x4 + 14*x5 >= 31",
    "12*x0**2 + 9*x3**2 + 4*x4**2 >= 31",
    "12*x0 + 16*x2 + 9*x3 >= 31",
    "16*x2 + 9*x3 + 4*x4 >= 31",
    "7*x1**2 + 16*x2**2 + 14*x5**2 >= 31",
    "7*x1 + 16*x2 + 4*x4 >= 31",
    "16*x2 + 9*x3 + 14*x5 >= 31",
    "12*x0**2 + 16*x2**2 + 4*x4**2 >= 31",
    "9*x3 + 4*x4 + 14*x5 >= 31",
    "7*x1 + 9*x3 + 4*x4 >= 31",
    "12*x0 + 4*x4 + 14*x5 >= 32",
    "12*x0**2 + 7*x1**2 + 4*x4**2 >= 32",
    "7*x1**2 + 16*x2**2 + 9*x3**2 >= 32",
    "7*x1 + 9*x3 + 14*x5 >= 32",
    "12*x0**2 + 7*x1**2 + 16*x2**2 >= 32",
    "12*x0**2 + 16*x2**2 + 14*x5**2 >= 32",
    "7*x1 + 4*x4 + 14*x5 >= 32",
    "12*x0 + 9*x3 + 4*x4 >= 32",
    "12*x0**2 + 16*x2**2 + 9*x3**2 >= 32",
    "16*x2 + 9*x3 + 4*x4 >= 32",
    "7*x1 + 16*x2 + 14*x5 >= 32",
    "7*x1**2 + 16*x2**2 + 4*x4**2 >= 32",
    "16*x2 + 9*x3 + 14*x5 >= 32",
    "12*x0 + 16*x2 + 4*x4 >= 32",
    "9*x3**2 + 4*x4**2 + 14*x5**2 >= 32",
    "7*x1 + 9*x3 + 4*x4 >= 32",
    "12*x0 + 4*x4 + 14*x5 >= 22",
    "12*x0 + 7*x1 + 4*x4 >= 22",
    "7*x1**2 + 16*x2**2 + 9*x3**2 >= 22",
    "7*x1 + 9*x3 + 14*x5 >= 22",
    "12*x0**2 + 7*x1**2 + 16*x2**2 >= 22",
    "12*x0 + 16*x2 + 14*x5 >= 22",
    "7*x1**2 + 4*x4**2 + 14*x5**2 >= 22",
    "12*x0**2 + 9*x3**2 + 4*x4**2 >= 22",
    "12*x0 + 16*x2 + 9*x3 >= 22",
    "16*x2**2 + 9*x3**2 + 4*x4**2 >= 22",
    "7*x1 + 16*x2 + 14*x5 >= 22",
    "7*x1 + 16*x2 + 4*x4 >= 22",
    "16*x2 + 9*x3 + 14*x5 >= 22",
    "12*x0 + 16*x2 + 4*x4 >= 22",
    "9*x3 + 4*x4 + 14*x5 >= 22",
    "7*x1 + 9*x3 + 4*x4 >= 22",
    "11*x0 + 8*x4 >= 56",
    "7*x2 + 10*x3 >= 44",
    "11*x0**2 + 10*x3**2 >= 40",
    "11*x0 + 10*x3 + 8*x4 >= 48",
    "8*x1**2 + 7*x2**2 + 3*x5**2 >= 48",
    "7*x2**2 + 10*x3**2 + 8*x4**2 >= 48",
    "11*x0 + 8*x1 + 3*x5 >= 48",
    "8*x1 + 8*x4 + 3*x5 >= 48",
    "8*x1 + 7*x2 + 10*x3 >= 48",
    "11*x0 + 10*x3 + 8*x4 >= 41",
    "8*x1 + 7*x2 + 3*x5 >= 41",
    "7*x2 + 10*x3 + 8*x4 >= 41",
    "11*x0 + 8*x1 + 3*x5 >= 41",
    "8*x1**2 + 8*x4**2 + 3*x5**2 >= 41",
    "8*x1 + 7*x2 + 10*x3 >= 41",
    "11*x0 + 10*x3 + 8*x4 >= 46",
    "8*x1 + 7*x2 + 3*x5 >= 46",
    "7*x2**2 + 10*x3**2 + 8*x4**2 >= 46",
    "11*x0 + 8*x1 + 3*x5 >= 46",
    "8*x1 + 8*x4 + 3*x5 >= 46",
    "8*x1 + 7*x2 + 10*x3 >= 46",
    "11*x0**2 + 10*x3**2 + 8*x4**2 >= 44",
    "8*x1 + 7*x2 + 3*x5 >= 44",
    "7*x2 + 10*x3 + 8*x4 >= 44",
    "11*x0 + 8*x1 + 3*x5 >= 44",
    "8*x1 + 8*x4 + 3*x5 >= 44",
    "8*x1 + 7*x2 + 10*x3 >= 44",
    "11*x0 + 10*x3 + 8*x4 >= 53",
    "8*x1 + 7*x2 + 3*x5 >= 53",
    "7*x2**2 + 10*x3**2 + 8*x4**2 >= 53",
    "11*x0 + 8*x1 + 3*x5 >= 53",
    "8*x1 + 8*x4 + 3*x5 >= 53",
    "8*x1 + 7*x2 + 10*x3 >= 53",
    "11*x0 + 10*x3 + 8*x4 >= 53",
    "8*x1 + 7*x2 + 3*x5 >= 53",
    "7*x2 + 10*x3 + 8*x4 >= 53",
    "11*x0 + 8*x1 + 3*x5 >= 53",
    "8*x1**2 + 8*x4**2 + 3*x5**2 >= 53",
    "8*x1 + 7*x2 + 10*x3 >= 53",
    "16*x2 + 9*x3 <= 103",
    "16*x2**2 + 14*x5**2 <= 192",
    "12*x0 + 7*x1 <= 54",
    "9*x3**2 + 14*x5**2 <= 169",
    "12*x0 + 4*x4 <= 43",
    "7*x1**2 + 14*x5**2 <= 178",
    "4*x4 + 14*x5 <= 165",
    "7*x1 + 4*x4 <= 71",
    "12*x0 + 16*x2 <= 84",
    "16*x2 + 4*x4 <= 85",
    "12*x0 + 9*x3 <= 176",
    "7*x1 + 9*x3 <= 111",
    "16*x2 + 9*x3 + 14*x5 <= 79",
    "7*x1 + 16*x2 + 9*x3 <= 101",
    "7*x1 + 9*x3 + 4*x4 <= 95",
    "12*x0 + 16*x2 + 4*x4 <= 137",
    "12*x0 + 7*x1 + 14*x5 <= 156",
    "16*x2 + 4*x4 + 14*x5 <= 70",
    "12*x0 + 16*x2 + 9*x3 <= 40",
    "7*x1**2 + 9*x3**2 + 14*x5**2 <= 185",
    "7*x1 + 16*x2 + 4*x4 <= 95",
    "12*x0 + 7*x1 + 16*x2 + 9*x3 + 4*x4 + 14*x5 <= 95",
    "11*x0 + 7*x2 <= 163",
    "11*x0 + 3*x5 <= 232",
    "7*x2**2 + 10*x3**2 <= 261",
    "8*x1 + 7*x2 <= 215",
    "11*x0 + 8*x4 <= 104",
    "8*x1 + 8*x4 <= 106",
    "11*x0 + 8*x4 + 3*x5 <= 155",
    "11*x0 + 10*x3 + 3*x5 <= 61",
    "7*x2**2 + 8*x4**2 + 3*x5**2 <= 91",
    "11*x0 + 8*x1 + 8*x4 <= 258",
    "11*x0 + 7*x2 + 10*x3 <= 277",
    "11*x0**2 + 7*x2**2 + 8*x4**2 <= 257",
    "11*x0 + 10*x3 + 8*x4 <= 325",
    "11*x0**2 + 8*x1**2 + 3*x5**2 <= 263",
    "11*x0 + 8*x1 + 10*x3 <= 292",
    "7*x2 + 10*x3 + 3*x5 <= 217",
    "8*x1 + 7*x2 + 10*x3 <= 339",
    "11*x0 + 8*x1 + 7*x2 + 10*x3 + 8*x4 + 3*x5 <= 339"
  ]
}
```

```python
import gurobipy as gp

# Create a new model
m = gp.Model("nutrition_optimization")

# Create variables
carbohydrates = m.addVar(lb=0, name="carbohydrates")
vitamin_b9 = m.addVar(lb=0, name="vitamin_b9")
iron = m.addVar(lb=0, name="iron")
calcium = m.addVar(lb=0, name="calcium")
potassium = m.addVar(lb=0, name="potassium")
protein = m.addVar(lb=0, name="protein")


# Set objective function
m.setObjective(7.84*carbohydrates**2 + 6.33*vitamin_b9**2 + 8.31*vitamin_b9*calcium + 6.11*carbohydrates + 4.45*vitamin_b9 + 8.97*iron, gp.GRB.MAXIMIZE)

# Add constraints - Cognitive Performance Index
m.addConstr(12*carbohydrates + 4*potassium + 14*protein >= 16)
m.addConstr(12*carbohydrates**2 + 7*vitamin_b9**2 + 4*potassium**2 >= 16)
# ... (All other cognitive performance index constraints as derived in the JSON)

# Add constraints - Muscle Growth Index
m.addConstr(11 * carbohydrates + 8 * potassium >= 56)
m.addConstr(7 * iron + 10 * calcium >= 44)
# ... (All other muscle growth index constraints as derived in the JSON)


# Add resource constraints
m.addConstr(12*carbohydrates + 7*vitamin_b9 + 16*iron + 9*calcium + 4*potassium + 14*protein <= 194, "r0")  # Cognitive performance
m.addConstr(11*carbohydrates + 8*vitamin_b9 + 7*iron + 10*calcium + 8*potassium + 3*protein <= 346, "r1")  # Muscle growth


# Optimize model
m.optimize()

# Print results
if m.status == gp.GRB.OPTIMAL:
    print('Obj: %g' % m.objVal)
    print('Carbohydrates: %g' % carbohydrates.x)
    print('Vitamin B9: %g' % vitamin_b9.x)
    print('Iron: %g' % iron.x)
    print('Calcium: %g' % calcium.x)
    print('Potassium: %g' % potassium.x)
    print('Protein: %g' % protein.x)
elif m.status == gp.GRB.INFEASIBLE:
    print('Model is infeasible')
else:
    print('Optimization ended with status %d' % m.status)

```