Here's the Gurobi code to solve the optimization problem:

```python
from gurobipy import Model, GRB

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

# Create variables
hot_dogs = model.addVar(vtype=GRB.INTEGER, name="hot_dogs")
kiwis = model.addVar(vtype=GRB.INTEGER, name="kiwis")
sashimi = model.addVar(vtype=GRB.INTEGER, name="sashimi")
chicken_thighs = model.addVar(vtype=GRB.INTEGER, name="chicken_thighs")
bananas = model.addVar(vtype=GRB.INTEGER, name="bananas")

# Set objective function
model.setObjective(4 * hot_dogs + 2 * kiwis + 6 * sashimi + 8 * chicken_thighs + 2 * bananas, GRB.MAXIMIZE)

# Add carbohydrate constraints
model.addConstr(9 * hot_dogs + 13 * kiwis + 8 * sashimi + 5 * chicken_thighs + 7 * bananas <= 287, "total_carbs")
model.addConstr(9 * hot_dogs + 13 * kiwis >= 52, "carbs_hot_dogs_kiwis")
model.addConstr(9 * hot_dogs + 8 * sashimi >= 55, "carbs_hot_dogs_sashimi")
model.addConstr(13 * kiwis + 8 * sashimi + 7 * bananas >= 36, "carbs_kiwis_sashimi_bananas")
model.addConstr(9 * hot_dogs + 8 * sashimi + 5 * chicken_thighs >= 36, "carbs_hot_dogs_sashimi_chicken_thighs")
model.addConstr(13 * kiwis + 8 * sashimi + 5 * chicken_thighs >= 36, "carbs_kiwis_sashimi_chicken_thighs")
model.addConstr(9 * hot_dogs + 13 * kiwis + 7 * bananas >= 36, "carbs_hot_dogs_kiwis_bananas")
model.addConstr(9 * hot_dogs + 13 * kiwis + 5 * chicken_thighs >= 36, "carbs_hot_dogs_kiwis_chicken_thighs")
model.addConstr(9 * hot_dogs + 5 * chicken_thighs + 7 * bananas >= 36, "carbs_hot_dogs_chicken_thighs_bananas")
model.addConstr(9 * hot_dogs + 8 * sashimi + 7 * bananas >= 36, "carbs_hot_dogs_sashimi_bananas_2")
model.addConstr(13 * kiwis + 8 * sashimi + 7 * bananas >= 40, "carbs_kiwis_sashimi_bananas_2")
model.addConstr(9 * hot_dogs + 8 * sashimi + 5 * chicken_thighs >= 40, "carbs_hot_dogs_sashimi_chicken_thighs_2")
model.addConstr(13 * kiwis + 8 * sashimi + 5 * chicken_thighs >= 40, "carbs_kiwis_sashimi_chicken_thighs_2")
model.addConstr(9 * hot_dogs + 13 * kiwis + 7 * bananas >= 40, "carbs_hot_dogs_kiwis_bananas_2")
model.addConstr(9 * hot_dogs + 13 * kiwis + 5 * chicken_thighs >= 40, "carbs_hot_dogs_kiwis_chicken_thighs_2")
model.addConstr(9 * hot_dogs + 5 * chicken_thighs + 7 * bananas >= 40, "carbs_hot_dogs_chicken_thighs_bananas_2")
model.addConstr(9 * hot_dogs + 8 * sashimi + 7 * bananas >= 40, "carbs_hot_dogs_sashimi_bananas_3")


# ... (similar constraints for 31, 32, 35, 38, and 41 grams)

model.addConstr(13 * kiwis + 5 * chicken_thighs <= 241, "carbs_kiwis_chicken_thighs_max")
# ... (similar constraints for other max carb combinations)


# Add tastiness constraints
model.addConstr(15 * hot_dogs + 16 * kiwis + 17 * sashimi + 7 * chicken_thighs + 9 * bananas <= 290, "total_tastiness")
model.addConstr(15 * hot_dogs + 17 * sashimi + 9 * bananas >= 33, "tastiness_hot_dogs_sashimi_bananas")
model.addConstr(16 * kiwis + 9 * bananas <= 207, "tastiness_kiwis_bananas_max")
# ... (similar constraints for other tastiness combinations)

# Optimize model
model.optimize()

# Print results
if model.status == GRB.OPTIMAL:
    print("Optimal solution found:")
    print(f"Hot dogs: {hot_dogs.x}")
    print(f"Kiwis: {kiwis.x}")
    print(f"Sashimi: {sashimi.x}")
    print(f"Chicken thighs: {chicken_thighs.x}")
    print(f"Bananas: {bananas.x}")
    print(f"Objective value: {model.objVal}")
elif model.status == GRB.INFEASIBLE:
    print("Model is infeasible.")
else:
    print(f"Optimization terminated with status {model.status}")

```