## Problem Description and Formulation

The problem requires maximizing profit by determining the number of youth and adult doses to produce, given certain constraints. The constraints are:

1. Limited amount of rare flower extract: 5000 grams.
2. Youth doses require 20 grams of extract, and adult doses require 35 grams.
3. Demand constraint: at least three times as many youth doses as adult doses.
4. Minimum production of adult doses: 10 doses.
5. Profit per youth dose: $5, profit per adult dose: $3.

## Mathematical Formulation

Let \(Y\) be the number of youth doses and \(A\) be the number of adult doses.

- Objective function to maximize: \(5Y + 3A\)
- Constraints:
  1. \(20Y + 35A \leq 5000\) (extract limitation)
  2. \(Y \geq 3A\) (demand constraint)
  3. \(A \geq 10\) (minimum adult doses)
  4. \(Y, A \geq 0\) and are integers (non-negativity and integrality constraint)

## Gurobi Code

```python
import gurobipy as gp

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

# Variables
Y = m.addVar(name="Youth_Doses", vtype=gp.GRB.INTEGER)  # Number of youth doses
A = m.addVar(name="Adult_Doses", vtype=gp.GRB.INTEGER)  # Number of adult doses

# Objective function: Maximize profit
m.setObjective(5 * Y + 3 * A, gp.GRB.MAXIMIZE)

# Constraints
m.addConstr(20 * Y + 35 * A <= 5000, name="Extract_Limitation")  # Extract limitation
m.addConstr(Y >= 3 * A, name="Demand_Constraint")  # Demand constraint
m.addConstr(A >= 10, name="Min_Adult_Doses")  # Minimum adult doses

# Solve the model
m.solve()

# Output the solution
if m.status == gp.GRB.OPTIMAL:
    print(f"Optimal Solution: Youth doses = {Y.varValue}, Adult doses = {A.varValue}")
    print(f"Max Profit: ${5 * Y.varValue + 3 * A.varValue}")
else:
    print("No optimal solution found.")
```