```json
{
  "sym_variables": [
    ("x0", "green beans"),
    ("x1", "bananas"),
    ("x2", "protein bars"),
    ("x3", "black beans"),
    ("x4", "tomatoes"),
    ("x5", "hamburgers"),
    ("x6", "lemons")
  ],
  "objective_function": "5.9*x0 + 9.51*x1 + 8.36*x2 + 1.1*x3 + 5.61*x4 + 7.01*x5 + 2.68*x6",
  "constraints": [
    "4*x0 + 15*x1 + 3*x2 + 7*x3 + 8*x4 + 2*x5 + 22*x6 <= 647",
    "17*x0 + 19*x1 + 10*x2 + 13*x3 + 2*x4 + 22*x5 + 7*x6 <= 324",
    "9*x0 + 2*x1 + 11*x2 + 1*x3 + 24*x4 + 12*x5 + 19*x6 <= 425",
    "4*x0 + 8*x4 >= 88",
    "17*x0 + 22*x5 >= 16",
    "10*x2 + 2*x4 >= 33",
    "13*x3 + 2*x4 >= 46",
    "17*x0 + 10*x2 >= 36",
    "19*x1 + 2*x4 >= 24",
    "2*x4 + 22*x5 >= 34",
    "10*x2 + 22*x5 >= 20",
    "17*x0 + 2*x4 >= 44",
    "17*x0 + 19*x1 >= 18",
    "13*x3 + 22*x5 >= 19",
    "17*x0 + 7*x6 >= 25",
    "10*x2 + 7*x6 >= 36",
    "19*x1 + 13*x3 >= 38",
    "19*x1 + 22*x5 >= 33",
    "13*x3 + 7*x6 >= 18",
    "17*x0 + 19*x1 + 7*x6 >= 33",
    "10*x2 + 13*x3 + 7*x6 >= 33",
    "17*x0 + 10*x2 + 13*x3 >= 33",
    "19*x1 + 22*x5 + 7*x6 >= 33",
    "17*x0 + 2*x4 + 7*x6 >= 33",
    "17*x0 + 13*x3 + 22*x5 >= 33",
    "10*x2 + 13*x3 + 2*x4 >= 33",
    "19*x1 + 10*x2 + 22*x5 >= 33",
    "10*x2 + 2*x4 + 7*x6 >= 33",
    "19*x1 + 13*x3 + 7*x6 >= 33",
    "19*x1 + 13*x3 + 2*x4 >= 33",
    "19*x1 + 2*x4 + 22*x5 >= 33",
    "13*x3 + 22*x5 + 7*x6 >= 33",
    "17*x0 + 19*x1 + 2*x4 >= 33",
    "10*x2 + 13*x3 + 22*x5 >= 33",
    "17*x0 + 10*x2 + 7*x6 >= 33",
    "17*x0 + 13*x3 + 2*x4 >= 33",
    "17*x0 + 13*x3 + 7*x6 >= 33",
    "17*x0 + 10*x2 + 22*x5 >= 33",
    "10*x2 + 22*x5 + 7*x6 >= 33",
    "19*x1 + 10*x2 + 2*x4 >= 33",
    "17*x0 + 22*x5 + 7*x6 >= 33",
    "13*x3 + 2*x4 + 22*x5 >= 33",
    "4*x0 + 22*x6 <= 323",
    "3*x2 + 22*x6 <= 530",
    "3*x2 + 2*x5 <= 217",
    "4*x0 + 3*x2 <= 310",
    "15*x1 + 2*x5 <= 194",
    "4*x0 + 7*x3 <= 536",
    "15*x1 + 8*x4 <= 626",
    "15*x1 + 22*x6 <= 218",
    "7*x3 + 22*x6 <= 543",
    "3*x2 + 8*x4 <= 509",
    "15*x1 + 7*x3 <= 98",
    "4*x0 + 15*x1 <= 431",
    "8*x4 + 2*x5 <= 346",
    "4*x0 + 2*x5 <= 478",
    "3*x2 + 7*x3 <= 272",
    "15*x1 + 3*x2 <= 108",
    "7*x3 + 2*x5 <= 115",
    "8*x4 + 22*x6 <= 146",
    "x6 % 1 == 0"
  ]
}
```

```python
from gurobipy import Model, GRB

# Create a new model
model = Model("optimization_problem")

# Create variables
variables = {
    'green beans': model.addVar(vtype=GRB.CONTINUOUS, name='green_beans'),
    'bananas': model.addVar(vtype=GRB.CONTINUOUS, name='bananas'),
    'protein bars': model.addVar(vtype=GRB.CONTINUOUS, name='protein_bars'),
    'black beans': model.addVar(vtype=GRB.CONTINUOUS, name='black_beans'),
    'tomatoes': model.addVar(vtype=GRB.CONTINUOUS, name='tomatoes'),
    'hamburgers': model.addVar(vtype=GRB.CONTINUOUS, name='hamburgers'),
    'lemons': model.addVar(vtype=GRB.INTEGER, name='lemons')
}


# Set objective function
model.setObjective(5.9 * variables['green beans'] + 9.51 * variables['bananas'] + 8.36 * variables['protein bars'] + 1.1 * variables['black beans'] + 5.61 * variables['tomatoes'] + 7.01 * variables['hamburgers'] + 2.68 * variables['lemons'], GRB.MAXIMIZE)

# Add constraints based on the provided resources/attributes
resources = {
    'r0': {'upper_bound': 647, 'values': [4, 15, 3, 7, 8, 2, 22]},
    'r1': {'upper_bound': 324, 'values': [17, 19, 10, 13, 2, 22, 7]},
    'r2': {'upper_bound': 425, 'values': [9, 2, 11, 1, 24, 12, 19]}
}

for resource, data in resources.items():
    model.addConstr(sum(data['values'][i] * list(variables.values())[i] for i in range(len(variables))) <= data['upper_bound'], name=resource)


# Add additional constraints from the problem description
# ... (add all your constraints here as shown in the JSON representation)

# Example:
model.addConstr(4 * variables['green beans'] + 8 * variables['tomatoes'] >= 88)
# ... (add the rest of your constraints)


# Optimize model
model.optimize()

# Print results
if model.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    for var in model.getVars():
        print(f"{var.varName}: {var.x}")
    print(f"Objective value: {model.objVal}")
elif model.status == GRB.INFEASIBLE:
    print("Model is infeasible.")
else:
    print(f"Optimization ended with status {model.status}")

```
