## Problem Description and Formulation

The problem is an optimization problem with the goal of minimizing a specific objective function subject to several constraints. The variables to consider are:

- \(x_0\): milligrams of vitamin A
- \(x_1\): milligrams of vitamin B12
- \(x_2\): milligrams of calcium

The objective function to minimize is:
\[ 5.95x_0 + 6.95x_1 + 1.06x_2 \]

The constraints are:

1. The muscle growth index for \(x_0\) is 6, for \(x_1\) is 3, and for \(x_2\) is 2.
2. \(6x_0 + 2x_2 \geq 8\)
3. \(6x_0 + 3x_1 \geq 16\)
4. \(6x_0 + 3x_1 + 2x_2 \geq 16\)
5. \(-5x_0 + 9x_2 \geq 0\)
6. \(6x_0 + 3x_1 + 2x_2 \leq 31\)
7. \(x_0\) is a whole number (integer).
8. \(x_1\) is a non-fractional number (integer).
9. \(x_2\) can be a fractional amount.

## Gurobi Code Formulation

```python
import gurobi

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

    # Define the variables
    x0 = model.addVar(name="milligrams_of_vitamin_A", vtype=gurobi.GRB.INTEGER)  # Integer
    x1 = model.addVar(name="milligrams_of_vitamin_B12", vtype=gurobi.GRB.INTEGER)  # Integer
    x2 = model.addVar(name="milligrams_of_calcium")  # Continuous

    # Objective function
    model.setObjective(5.95 * x0 + 6.95 * x1 + 1.06 * x2, gurobi.GRB.MINIMIZE)

    # Constraints
    model.addConstr(6 * x0 + 2 * x2 >= 8, name="vitamin_A_calcium_muscle_growth")
    model.addConstr(6 * x0 + 3 * x1 >= 16, name="vitamin_A_B12_muscle_growth")
    model.addConstr(6 * x0 + 3 * x1 + 2 * x2 >= 16, name="total_muscle_growth_1")
    model.addConstr(-5 * x0 + 9 * x2 >= 0, name="vitamin_A_calcium_tradeoff")
    model.addConstr(6 * x0 + 3 * x1 + 2 * x2 <= 31, name="total_muscle_growth_upper_bound")

    # Optimize
    model.optimize()

    # Print solution
    if model.status == gurobi.GRB.OPTIMAL:
        print("Optimal Solution:")
        print(f"Milligrams of Vitamin A: {x0.varValue}")
        print(f"Milligrams of Vitamin B12: {x1.varValue}")
        print(f"Milligrams of Calcium: {x2.varValue}")
        print(f"Objective Function Value: {model.objVal}")
    else:
        print("No optimal solution found.")

optimize_vitamins()
```

This code defines the optimization problem as per the given description and constraints, using Gurobi to find the optimal solution. It then prints out the optimal values for the milligrams of vitamin A, vitamin B12, and calcium, along with the minimum value of the objective function. If no optimal solution is found, it indicates that the problem is infeasible.