Recipe Management
In the following chapters we describe how recipes are modeled.
Recipe
A recipe is a composition of various quantified and described (faceted) food ingredients.
Recipe facets are not predefined, but rather entered (on the fly) during interviews.
Raw to Cooked Ratio
For recipes, ingredient quantities are usually given as raw amounts. (And as a matter of detail with or without non-edible parts.)
When calculating food intake for recipes, we need to correct for
-
removal of non-edibel parts
-
raw to cooked loss
Both these coefficients are scientifically determined on a per food basis and may even depend on food facets. E.g. cooked in water or cooked with oil.
Nesting
It is sometimes useful to compose a recipe of one ore more reusable parts that are themselves recipes. We then say those are nested. E.g. Some pizza may be made of a generic pizza dough along other ingredients, where our pizza dough may itself be modeled as a recipe.
APPENDIX
GloboDiet Recipe Nesting (Workaround)
GloboDiet does not support recipe nesting, hence we introduced a workaround.
For various recipes that we needed to be nested, we introduced regular food counterparts, that can be used as recipe ingredients instead.
During post-processing (report generation) those special ingredients are then replaced with their recipe counterparts.
To indicate this food ← → recipe relation both food and recipe that are related have the database id of their counterpart included in their name.
E.g. pizza dough {assocFood=1234}
or pizza dough {assocRecipe=5678}
.
However, this is just an implementation detail.
GloboDiet Recipe Rules
GloboDiet applies specific rules depending on recipe type. Those then apply during interviews.
S .. ingredient substitution allowed
A .. adding ingredients to recipe allowed
D .. deleting ingredients from recipe allowed
Q .. ingredient quantity is asked during interview
1.1 .. Open - known (SADQ)
1.2 .. Open - unknown (SAD)
1.3 .. Open - with brand (SAD)
2.1 .. Closed (S) (1)
2.2 .. Closed - with brand (S) (1)
3.0 .. Commercial ()
4.1 .. New - known (SADQ)
4.2 .. New - unknown (SADQ)
1 | requires substitutable ingredient (substitution not allowed when ingredient is fixed) |
1 .. ingredient fixed
2 .. ingredient substitutable
3 .. fat during cooking
A2 .. type of fat used
A3 .. type of milk/liquid used