diet - documentationΒΆ
SetF:Foods. \(\mathcal{F}\)
Properties: Dimen=1, Domain=None, Ordered=False, Bounds=None
SetN:Nutrients. \(\mathcal{N}\)
Properties: Dimen=1, Domain=None, Ordered=False, Bounds=None
Paramcost:Cost of each food. \(c_f \geq 0\)
Properties: Index=F, Domain=NonNegativeReals, Default=None, Mutable=False
Paramcontent:Amount of nutrient in each food. \(a_{f,n} \geq 0\)
Properties: Index=content_index, Domain=NonNegativeReals, Default=None, Mutable=False
Parammin_intake:Lower bound on each nutrient. \(y^{min}_n\)
Properties: Index=N, Domain=NonNegativeReals, Default=0.0, Mutable=False
Parammax_intake:Upper bound on each nutrient. \(y^{max}_n\)
Properties: Index=N, Domain=NonNegativeReals, Default=inf, Mutable=False
Paramvolume:Volume per serving of food. \(v_f\)
Properties: Index=F, Domain=PositiveReals, Default=None, Mutable=False
Parammax_volume:Maximum volume of food consumed. \(v^{max}\)
Properties: Index=None, Domain=PositiveReals, Default=None, Mutable=False
Varx:Number of servings consumed of each food. \(x_f \geq 0\)
Properties: Index=F
Expressiontotal_volume:Total volume of food consumed.
\[v^{tot} = \sum_{f \in \mathcal{F}} v_f \cdot x_f\]Properties: Index=None
Expressionintake:Total intake of each nutrient.
\[y_n = \sum_{f \in \mathcal{F}} \alpha_{f,n} \cdot x_f\]Properties: Index=N
Objectiveminimize_total_cost:Minimize the cost of food that is consumed.
\[\min_{x} \sum_{f \in \mathcal{F}} c_f \cdot x_f\]Properties: Index=None
Constraintnutrient_limit:Enforce upper and lower bounds on intake of each nutrient.
\[y^{min}_n \leq y_n \leq y^{max}_n\]Properties: Index=N
Constraintvolume_limit:Limit the volume of food consumed.
\[v^{tot} \leq v^{max}\]Properties: Index=None