# Food Passports and Intelligent Food Recipes: The Data-Oriented Way of Producing Food
## 3 Results
### Defining Human- and Machine-Interpretable Dynamic Recipes
```
1 Recipe SweetWater(
2 Description{
3\"This_u_u_u_u_example_of_u_recipe_for_u_u_u_user_including_u_mix_of:_u_user_u_
4\"
5\"
6 Ingredients{
7 water(Range(
8 Min100,
9 Max400,
10 Unit\"=l\"
11}
12}
13 sugar(Range{
14 Min0,
15 Max10,
16 Unit\"g\"
17}
18}
19 sweetener(Range{
20 Min0,
21 Max10,
22 Unit\"g\"
23}
24}
25 DefaultRatio(
27 water400,
28 sugar5,
29 sweetener1
30}
31 Resources{
34 Resourcecontainer{
35 Functionwarm{
36 InputParametertargetTemp(
37 TypeNumber,
38 Range{
39 Min40,
40 Max200,
41 Unit\"deg_Uc\"
42}
43}
44 OutputParametertemperatureReached{
45 TypeBool
46}
47}
48 Functionmix{
50 InputParametermixSpeed{
51 TypeEnum,
52 EnumeratedRange{
53\"one\",
54\"two\",
55\"three\"58 OutputParameter temperatureReached{
59 TypeBool
60 }
61 }
62 }
63
64 Resourceperson{
65 Functionadd(  InputParameteringredientName{TypeString}
67 InputParameteringredientQuantity(TypeNumber)
68 InputParameteringredientUnit{TypeString}
69 InputParameterresourceName{TypeString}
70 OutputParameterdone{TypeBool}
71 }
72 }
73 Resource timer{
75 FunctioncountTo{
76 InputParametercountTo{
77 TypeNumber,
78 Range(  Min 0,
80 Max 1000000,
81 Unit \"s\"
82 }
83 }
84 OutputParameterdone(TypeBool)
85 }
86 }
87 }
88 Actions{
89 boolfirstWaterAdded = false;
90 boolfinalWaterAdded;
91 boolsuggAdded;
92 boolsuggendAdded;
93 booltempReached;
94 Numbert = 0;
95 NumbertargetTime = 60;
96
97
98 Sequence{
99 person.add(\"water\", 50, \"ml\", \"container\", firstWaterAdded)
100 Parallel{
101 person.add(\"wugar\", 5, \"g\", \"container\", sugarAdded)
102 person.add(\"swetner\", 1, \"g\", \"container\", sweetnerAdded)
103 container.warn(50, tempReached)
104 container.mix(\"two\"))
105 Repeat{t < targetTime,
107 container.warn(50, tempReached)
108 container.mix(\"one\")
109 timer.countTo(60, t))
110
111 Parallel{
112 person.add(\"water\", 50, \"ml\", \"container\", finalWaterAdded)
113 container.mix(\"three\"))
114 }
115 }
116 }  
The first part of the recipe specifies that sweet water contains water, sugar and sweetener. The default ratio specifies the ideal proportion, but the DRA is able to select different proportions as long as they are within the ranges specified for the different ingredients. The execution of the recipe includes three resources: a special container, with warming and mixing functions; a person, with the ability to add ingredients in certain quantities to a container; and a timer to control some mixing processes. The _Actions_ section includes a few variables that may be used to control the process followed by a sequence of functions and flows. In order to execute the recipe, the sequence can be read as follows:  
1. The person adds 50 mL of water to the container;
2. Then, simultaneously, a person adds 5 g of sugar and 1 g of sweetener to the container while the container is warming up to 50 \({}^{\circ}\)C, mixing the ingredients at mix speed two;After the parallel block is executed (i.e., all the functions and flows in it terminate), the container must be warmed at mix speed one until the timer reaches 60 s;
4. Finally, the person adds the remaining water while the container mixes at mix speed three.