## Problem Description and Formulation

The problem is an optimization problem with a given objective function and constraints. The goal is to minimize the objective function subject to the provided constraints.

### Objective Function

The objective function to minimize is:
\[ 7 \times \text{milligrams of vitamin B1} + 5 \times (\text{milligrams of calcium}) + 8 \times \text{milligrams of vitamin B3} + 8 \times \text{milligrams of vitamin B5} \]

### Constraints

The constraints are as follows:

1. Cognitive performance index of milligrams of vitamin B1 = 8.
2. Digestive support index of milligrams of vitamin B1 = 1.
3. Cognitive performance index of milligrams of calcium = 3.
4. Digestive support index of milligrams of calcium = 8.
5. Cognitive performance index of milligrams of vitamin B3 = 11.
6. Digestive support index of milligrams of vitamin B3 = 3.
7. Cognitive performance index of milligrams of vitamin B5 = 11.
8. Digestive support index of milligrams of vitamin B5 = 5.
9. Total cognitive performance index from milligrams of vitamin B3 and vitamin B5 ≥ 16.
10. Total cognitive performance index from milligrams of vitamin B1 and vitamin B5 ≥ 24.
11. Total cognitive performance index from all vitamins ≥ 24.
12. Total digestive support index from milligrams of calcium and vitamin B3 ≥ 16.
13. Total digestive support index from all vitamins ≥ 16.
14. -8 × milligrams of calcium + 10 × milligrams of vitamin B5 ≥ 0.
15. -3 × milligrams of vitamin B3 + 6 × milligrams of vitamin B5 ≥ 0.
16. -6 × milligrams of calcium + 4 × milligrams of vitamin B3 + 6 × milligrams of vitamin B5 ≥ 0.
17. Total cognitive performance index from milligrams of vitamin B1, vitamin B3, and vitamin B5 ≤ 98.
18. Total digestive support index from milligrams of vitamin B1 and calcium ≤ 23.
19. Total digestive support index from milligrams of calcium and vitamin B5 ≤ 27.
20. Total digestive support index from milligrams of vitamin B3 and vitamin B5 ≤ 40.
21. Total digestive support index from milligrams of vitamin B1 and vitamin B5 ≤ 48.

### Variable Definitions

- \(x_0\): milligrams of vitamin B1 (continuous)
- \(x_1\): milligrams of calcium (integer)
- \(x_2\): milligrams of vitamin B3 (continuous)
- \(x_3\): milligrams of vitamin B5 (continuous)

## Gurobi Code Formulation

```python
import gurobi

def optimize_vitamins():
    # Create a new model
    model = gurobi.Model()

    # Define variables
    x0 = model.addVar(lb=-gurobi.GRB.INFINITY, ub=gurobi.GRB.INFINITY, name="vitamin_B1")  # continuous
    x1 = model.addVar(lb=0, ub=gurobi.GRB.INFINITY, type=gurobi.GRB.INTEGER, name="calcium")  # integer
    x2 = model.addVar(lb=-gurobi.GRB.INFINITY, ub=gurobi.GRB.INFINITY, name="vitamin_B3")  # continuous
    x3 = model.addVar(lb=-gurobi.GRB.INFINITY, ub=gurobi.GRB.INFINITY, name="vitamin_B5")  # continuous

    # Objective function
    model.setObjective(7 * x0 + 5 * x1 + 8 * x2 + 8 * x3, gurobi.GRB.MINIMIZE)

    # Constraints
    # Cognitive performance index constraints
    model.addConstr(8 * x0 + 3 * x1 + 11 * x2 + 11 * x3 >= 24, name="cognitive_total")
    model.addConstr(11 * x2 + 11 * x3 >= 16, name="cognitive_B3_B5")
    model.addConstr(8 * x0 + 11 * x3 >= 24, name="cognitive_B1_B5")
    model.addConstr(8 * x0 + 3 * x1 + 11 * x2 + 11 * x3 <= 98, name="cognitive_max")

    # Digestive support index constraints
    model.addConstr(x0 + 8 * x1 + 3 * x2 + 5 * x3 >= 16, name="digestive_total")
    model.addConstr(8 * x1 + 3 * x2 >= 16, name="digestive_calcium_B3")
    model.addConstr(x0 + 8 * x1 <= 23, name="digestive_B1_calcium")
    model.addConstr(8 * x1 + 5 * x3 <= 27, name="digestive_calcium_B5")
    model.addConstr(3 * x2 + 5 * x3 <= 40, name="digestive_B3_B5")
    model.addConstr(x0 + 5 * x3 <= 48, name="digestive_B1_B5")

    # Linear constraints
    model.addConstr(-8 * x1 + 10 * x3 >= 0, name="linear1")
    model.addConstr(-3 * x2 + 6 * x3 >= 0, name="linear2")
    model.addConstr(-6 * x1 + 4 * x2 + 6 * x3 >= 0, name="linear3")

    # Solve the model
    model.optimize()

    # Print the solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Objective: ", model.objVal)
        print("Vitamin B1: ", x0.varValue)
        print("Calcium: ", x1.varValue)
        print("Vitamin B3: ", x2.varValue)
        print("Vitamin B5: ", x3.varValue)
    else:
        print("No optimal solution found")

optimize_vitamins()
```