[IEEE 2013 IEEE 2nd Global Conference on Consumer Electronics (GCCE) - Tokyo, Japan...
Transcript of [IEEE 2013 IEEE 2nd Global Conference on Consumer Electronics (GCCE) - Tokyo, Japan...
An Extension of Menu Planning Algorithm for Two-phase Homemade Cooking
Nobuo Funabiki, Yukiko Matsushima, Toru Nakanishi, Kan Watanabe
Dept. of Electrical and Communication Engineering, Okayama UniversityEmail: {funabiki, nakanisi, can}@cne.okayama-u.ac.jp,
Abstract—Nowadays, many people keep busy lives due toworking in companies, studying in schools, or taking careof children or senior parents. As a result, it has becomevery hard for them to cook foods for suppers by themselvesat home after long-hour duties at daytime in weekdays.Previously, to assist homemade cooking of such busy people,we proposed a two-phase cooking such that the preparationphase of cooking foods that they will eat on the followingweekdays is performed on a weekend, and the finishingphase for the foods for a supper is completed on the day inshort time. Then, we presented a menu planning algorithm toassist generating one-week menus for this two-phase cooking.Unfortunately, we found that this algorithm has the followingdrawbacks in practical use: 1) the selection of food preferenceis not easy, 2) the use of preferred ingredients for cookingcannot be directly specified, and 3) the nutrition balance offoods in a menu is not considered. In this paper, we extendthis algorithm to solve them by newly defining a preferenceindex and the food balance guide by Japanese government.We verify the effectiveness of the extended algorithm throughgenerating five-day menus from 241 food candidates.
Keywords-Menu planning algorithm, two-phase cooking,ingredient, food balance guide, serving number
I. INTRODUCTION
Recently, more and more people have become preferring
to cooking foods by themselves at home due to the rising
consciousness for healthy, safe, and inexpensive foods.
Foods at restaurants may contain unknown chemical ad-
ditives and undesirable ingredients, and are usually much
higher than foods cooked by themselves. The Japanese
government encourages people to cook foods by them-
selves [1].
Unfortunately the time allowed for homemade cookinghas become limited for busy weekdays. Thus, people may
perform the preparation phase of foods on weekends that
will be eaten on the following weekdays, and complete
the finishing phase of the foods that they will eat for
the supper on the day in short time. We have called this
cooking style the two-phase cooking. Figure 1 illustrates
the two-phase cooking for Pork-cutlet . In applications of
the two-phase cooking, people have to select all the foods
for the following weekdays on a weekend beforehand,
considering the total cooking time on each day must be
acceptable for them. Besides, the menus should cover a
variety of preferred foods as much as possible to increase
satisfactions of users and nutrition balance.
To assist this two-phase homemade cooking, we pre-
viously proposed a menu planning algorithm [2], based
on a simple greedy method for the knapsack problem
[3]. However, through experimental applications of this
Slice pork: cut step, 1 min
Add egg, flour, bread crumb to pork: mix step, 3 min
Deep-fry cutlet: fry step, 8 min
Cut cutlet: cut step, 1min
Preparationphase
Finishingphase
Figure 1. Cooking steps of Pork-cutlet by two-phase cooking.
algorithm, we found that it has drawbacks in practical
use: 1) the selection of food preference is not easy, 2) the
use of preferred ingredients for cooking cannot be directly
specified, and 3) the nutrition balance of foods in a menu
is not considered.
In this paper, we extend this menu planning algorithm
to solve them by newly defining a food preference indexand adopting the food balance guide issued by Japanese
government [4]. We verify the effectiveness of the ex-
tended algorithm through generating five-day menus from
241 candidate foods.
Several papers reported menu planning algorithms for
the nutrition balance. [5] presented a genetic algorithm for
selecting a menu that satisfies the constraints of nutrition
and food type variations. [6] presented an algorithm based
on the fuzzy mathematical programming and the rough set
theory for planning a well-balanced menu. [7] presented
an algorithm based on the evolutionary computation for
selecting a menu that satisfies the various constraints of
nutrition.
The rest of this paper is organized as follows: Sec-
tion presents our ideas to solve the drawbacks. Section III
shows the procedure of the extended algorithm. Section IV
evaluates the algorithm. Section V concludes this paper
with future works.
II. EXTENSIONS OF MENU PLANNING ALGORITHM
In this section, we discuss the extensions of the menu
planning algorithm to solve the three drawbacks.
2013 IEEE 2nd Global Conference on Consumer Electronics (GCCE)
978-1-4799-0892-9/13/$31.00 ©2013 IEEE 352
A. Redefinition of Food Preference
To solve the first and second drawbacks, we redefine the
preference index of each food that represents the selection
preference into a menu. Actually, a user should select
the ingredients, keywords, and category preference of the
foods that they prefer to cook as inputs to the algorithm.
We note that the selection of ingredients is intended to
solve the second drawback, and the selections of keywordsand category preference are the first drawback.
We regard a keyword as a part of a food name. For ex-
ample, soup is a keyword included in Miso soup, Vegetablesoup, and Corn soup. Thus, foods containing the selected
keywords in their names are preferentially selected in the
extended algorithm. Besides, we define three categories
of Japanese, Chinese, and Western to describe a categorypreference, where Western should be divided into more
precise categories such as French, Italian, and Mexicanthat will be in future works.
The new preference index fpi for food i is calculated
by the following equation:
fpi = A ·α (ingred)+B · β (keyword)+C · γ (prefer)(1)
where the A-term represents the number of selected in-
gredients used in the food, the B-term does the number
of selected keywords contained in the food name, and the
C-term does the category preference degree.
B. Nutrition Balance Control
To solve the third drawback, we adopt the food balanceguide issued by Japanese government. It recommends a
combination of foods to be eaten every day in terms of
the nutrition balance from the following five food groups:
(1) Staple diet: main suppliers of carbohydrate such
as rice, bread, noodle, or their processed foods
(2) Side dish: main suppliers of vitamin, mineral
(calcium, phosphorus, iron), and food fibers in
vegetable, mushroom, potato, bean, seaweed or
their processed foods
(3) Main dish: main suppliers of protein such as
fish, meat, big bean, and their processed foods
(4) Milk and dairy product: mail suppliers of
calcium such as milk, yogurt, and cheese
(5) Fruit: main suppliers of vitamin C and potas-
sium such as fruits like orange, apple, and fruity
vegetables like watermelon, strawberry.
The food balance guide have the following features:
• Desired nutrition to be taken for each day is described
by a set of foods to be eaten.
• Desired foods to be eaten are represented by a
spinning-top as in Figure 2 where foods at upper
levels are more desired.
• Desired volumes for foods in each group are repre-
sented by units of serving number (SV).• SV for foods is determined for each group indepen-
dently, where SV for other group is not affected.
The standard SV of a food is set for each food group.
For example, in staple diet, SV of a food using one egg
Figure 2. Concept of food balance guide.
is one, SV of a fish food is two, and SV of a meat food
is three. When a food belongs to multiple groups, SV is
counted for each of them. For example, SV of Carrey
rice is two for staple diet, one for side dish, and one for
main dish at the same time. Table I describes the desired
SV range of the five groups for one day. This range is
different by the gender, age, and activity level of a person.
Table IDESIRED SV RANGE FOR ONE DAY.
Energy Male age Activity Female age ActivityStaple diet Side dish Main dish Milk Fruit
1800 200 6-9, ≥70 any 6-9, ≥70 any4-5 5-6 3-4 2 2
1800 200 6-9, ≥70 any 10-69 low4-5 5-6 3-4 2 2
2200 200 10-11 any 10-69 high5-7 5-6 3-5 2 2
2200 200 12-69 low 10-69 high5-7 5-6 3-5 2 2
2600 200 12-69 high - -7-8 6-7 4-6 2-3 2-3
III. PROCEDURE OF EXTENDED MENU PLANNING
ALGORITHM
In this section, we present the procedure of the extended
menu planning algorithm for the two-phase cooking.
A. Algorithm Overview
The menu planning algorithm for two-phase cooking
is based on a simple greedy method for the knapsack
problem in [3]. The priority for the food selection is cal-
culated by dividing the preference index with the cooking
time. Then, the foods satisfying the time constraint are
selected sequentially in descending order of the priorities,
until no more food can be selected. This food selection is
performed for the preparation phase first, and then, for the
finishing phase. Here, we note that the cooking time of a
food for the preparation phase or the finishing phase can
be given by the total time for the corresponding cooking
353
steps, and that foods that are not selected for two-phase
cooking may be selected for weekday cooking. The menu
planning algorithm consists of four stages. The following
subsections describe details of them.
B. Problem Input and Output
The following inputs should be given to the algorithm:
• Number of weekdays for menu planning: W• Number of portions for cooking: L• Cooking time limit for preparation and finishing
phases: TLp, TLf
• Weekday count limit for repeating same food: DL• Information for candidate food i:
– Two-phase cooking flag: tpi = 1 (allowed),
tpi = 0 (not allowed)
– Main dish flag: mdi = 1 (main), mdi = 0 (not
main)
– Dish type: dti– Cooking time: cti (total, preparation, finishing)
– Ingredient list: ILi
– Food category: fci– SV for food group j: SV j
i
• Gender: male or female
• Age
• Activity level: high or low
• Selected ingredient list: SIL• Selected food name keyword list: SKL• Preference for each food category
Then, the algorithm outputs a menu plan composed of
the following information:
• List of foods for two-phase cooking: FLT• Menu of foods for weekday k: FLWk
that satisfies the following constraints:
(1) The total cooking time of any day must not
exceed the limit (cooking time constraint).
(2) Only foods with tpi = 1 must be selected
for two-phase cooking (two-phase cooking con-
straint).
(3) The number of weekdays repeating the same
food must not exceed the limit (food repeat
constraint).
(4) Any ingredient in SIL should be used for at least
one selected food (ingredient constraint).
(5) Any keyword in SKL should be contained in at
least one selected food (keyword constraint).
and maximizes the cost function E representing the sum
of preferences among the selected foods in the menu plan:
E =W∑
k=1
∑
i∈FLWk
fpi. (2)
C. Preprocessing Stage
This stage initializes global variables for the algorithm.
1. Calculation of cooking time for multiple portions:
The cooking time of food i for L portions is
calculated by multiplying it with√L to consider
the increase of the cooking time.
2. Calculation of food preference:
The preference pri for food i is calculated by Eq.
(1). However, when every ingredient in SIL and
every keyword in SKL has been selected, it is
randomly initialized to diversify selected foods in
menus.
3. Calculation of food selection priority
The priority pri for selecting food i is calculated by
dividing the preference with cooking time for the
preparation phase, the finishing phase, and the both:
pri = fpi/cti. (3)
D. Two-phase Cooking Food Selection Stage
This stage selects the foods for two-phase cooking
sequentially until the total cooking time for the preparation
phase becomes full.
1. Selection of food:
A food satisfying the following conditions is se-
lected. where if no food can be selected, this stage
is terminated.
1) It has not been selected so far.
2) It allows two-phase cooking (tpi = 1).
3) The priority pri is maximum.
2. Selection of weekday count for repeating each two-
phase cooking food:
For each selected food, the maximum number of
weekdays K satisfying the following conditions is
selected, where if K = 0, this food is not selected
here. The cooking time of a food repeating Kweekdays is given by multiplying
√K to cti.
1) K does not exceed the weekday count limit
DL.
2) The total cooking time does not exceed the
time limit for the preparation phase TLp.
3. Update of total cooking time:
The total cooking time is updated by adding the time
for the selected food. If it is smaller than TLp, go
to 1. else terminate this stage.
E. Weekday Menu Initialization Stage with Two-phaseCooking Food
This stage selects each two-phase cooking food into one
weekday menu so that any weekday menu can contain as
many foods as possible.
1. Sort of two-phase cooking foods:
The two-phase cooking foods are sorted in ascend-
ing order of the cooking time for the finishing phase.
2. Selection of two-phase cooking food for weekday
menu:
In the sorted order, each two-phase cooking food
is selected into the weekday menu satisfying the
following conditions, where a food assigned Kweekdays is selected into K different weekday
menus:
1) It is not selected for the corresponding week-
day menu.
354
2) The total cooking time for the weekday is
minimum.
3) The number of selected foods is minimum, if
multiple weekdays are satisfied at 1) and 2).
4) One weekday is randomly selected, if multiple
weekdays are satisfied at 1), 2), and 3).
3. Update of total cooking time:
The total cooking time for the selected weekday at
2. is updated.
F. Weekday Menu Generation Stage
This stage generates initial weekday menus by addition-
ally selecting foods other than two-phase cooking.
1. Calculation of food priorities:
The priority for any food that has not been selected
for two-phase cooking is calculated by using the
total cooking time for both phases.
2. Selection of food:
A food satisfying the following conditions is se-
lected, where if no food is selected, the menu plan
is output and the algorithm is terminated.
1) It has not been selected so far.
2) The priority pri is maximum.
3. Selection of weekday menu:
The weekday menu satisfying the following con-
ditions is selected for the food in 2., where if no
weekday can be selected, this food is not included
into any menu.
1) The total cooking time for the finishing phase
does not exceed TLf after the time for the
food is added.
2) The number of foods selected in the weekday
menu is minimum among the multiple candi-
dates satisfying 1).
3) One weekday is selected randomly, if multiple
candidates satisfy 1) and 2).
4. Update of total cooking time:
The total cooking time for the weekday selected at
3. is updated.
G. Nutrition Balancing Stage
Finally, this stage completes weekday menus with bal-
anced nutrition by checking SV for main and side dishes
only, because the simultaneous satisfaction of SV for all
the five food groups is hard or impossible, while satisfying
the other complex constraints. Actually, SV for the main
dish often violates the upper limit, and SV for the side
dish does the lower limit. Thus, this stage only checks
them.
1. Calculation of SV:
SV for each food group is calculated from the foods
in each weekday menu.
2. Removal of food from weekday menu due to main
dish violation:
When SV for main dish in a weekday menu exceeds
the upper limit, a food satisfying the following four
conditions is removed from the menu if it exists:
1) It is not a two-phase cooking food.
2) Any ingredient and keyword that the food
contains is included in other selected foods for
any weekday menu.
3) SV for main dish satisfies the upper limit if it
is removed.
4) The priority pri is minimum.
If any food cannot be found here due to 3), the upper
limit for main dish is incremented by 1 and this
procedure is repeated.
3. Addition of food to weekday menu due to side dish
violation:
When SV for side dish in a weekday menu falls
below the lower limit, a food satisfying the following
four conditions is added into the menu if it exists:
1) It has not been selected so far.
2) It is not a two-phase cooking food.
3) SV for milk and dairy product does not exceed
the limit if it is added.
4) The total cooking time does not exceed the
limit if it is added.
5) The same food type has not been selected for
the menu.
6) SV for main and side dishes do not exceed
their limits if it is added.
7) The priority pri is maximum.
If any food cannot be found due to 4), the limit
is incremented by 10min., and this procedure is
repeated. If any food cannot be found due to 3),
the upper limit is incremented by 1 and the lower
limit is decremented by 1 for both dishes, and this
procedure is repeated.
IV. EVALUATION
In this section, we evaluate the extended menu planning
algorithm through applying it to an instance.
A. Simulation Setting
For the simulation, we used the following set of param-
eters:
• preference index coefficients: A = 10, B = 100,
C =random number between 1 and 10• Number of portions for foods: 2• Cooking time limit for preparation and finishing
phases: 70min, 20min• Weekday count limit for repeating the same food: 1• Selected ingredients: tomato, beef, potato, Pacific cod
• Selected keywords: fried shrimp, tofu, hayashi
• Food category preference: Japanese:2, Chinese:0,
Western:5
• SV limit: (1) staple diet:2-5, (2) side dish:3-4, (3)
main dish:1-3, (4) milk:0-1, (5) fruit:0-1.
B. Simulation Result
Table II shows the five-day menu generated by the
algorithm with the preparation phase, where (∗) represents
a two-phase cooking food. In this table, priority represents
the calculated priority in (3), ingredient does the number of
355
selected ingredients in the food, keyword does the number
of selected keywords in the name, and category does the
preference of the food.
Hayashi-rice with sunny-side up egg contains one
ingredient and one keyword given in the simulation set-
ting. Thus, it has the highest priority in this menu. Fried
shrimp and Fiery hot tofu contain one keyword,
and have the secondly highest priority. The cooking time
for each day satisfies the limit except for Days 2, 3,
and 5 where the excess is only less than 10 min. Every
selected ingredient and keyword is included in at least one
selected food. Furthermore, any SV satisfies the limit in
each menu. The results support the effectiveness of our
extended algorithm.
Table IIGENERATED FIVE-DAY MENU.
Day Food Priority Time
Hayashi-rice with sunny-side up egg 6.5Pre- Fried shrimp 5.8 66
paration Potato croquette with Pacific cod 5.8Eggplant cheese fritter 0.3
Hayashi-rice with sunny-side up egg 6.5Day 1 Curry-flavor beef salad 0.9 17
SV: (1) 2, (2) 3, (3) 3, (4) 0, (5) 0
Potato croquette with Pacific cod 5.8Eggplant cheese fritter 0.3
Day 2 Rice - 23White chicken meat and spinach salad 1.3
SV: (1) 2, (2) 4, (3) 3, (4) 0, (5) 0Fried shrimp 5.8
White chicken soup 1.8Day 3 Rice - 19
Fried eggplant 1.7SV (1) 2, (2) 3, (3) 3, (4) 0, (5) 0
Fiery hot tofu 5.9Rice -
Day 4 Hot onion salad 1.8 29Fried mini-tomato and egg 1.4
SV (1) 2, (2) 3, (3) 3, (4) 0, (5) 0
Tatsuta age mackerel 1.2Celery with cod roe 2.2
Day 5 Rice - 27Fried shishito pepper with bacon 1.4
SV (1) 2, (2) 3, (3) 3, (4) 0, (5) 0
V. CONCLUSION
In this paper, we presented an extension of the menu
planning algorithm to solve three drawbacks by newly
defining a preference index and adopting the food balance
guide by Japanese government. We verify the effective-
ness through generating five-day menus from 241 food
candidates. In future studies, we will further evaluate the
algorithm using various instances, combine it with the
cooking scheduling algorithm [8]-[10], and develop a Web
application system for practical use.
REFERENCES
[1] Ministry of Agriculture, Forestry and Fisheries,What is ”Shokuiku (Food Education)” ?,
http://www.maff.go.jp/e/pdf/shokuiku.pdf.
[2] N. Funabiki, S. Taniguchi, Y. Matsushima, and T. Nakanishi,”A proposal of a menu planning algorithm for two-phasecooking by busy persons,” Proc. Int. Work. Virtual Environ.Network-Oriented App. (VENOA 2011), pp. 668-673, June2011.
[3] M. Yagiura and T. Ibaraki, Combinatorial Optimization,Asakura, 2001.
[4] Ministry of Health, Labour and Welfare (MHLW), Foodbalance guide, 2005, http://www.mhlw.go.jp/bunya/kenkou/eiyou-syokuji.html.
[5] B. Gaal, I. Vassanyi, and G. Kozmann, A novel artificialintelligence method for weekly dietary menu planning,”Methods Inf. Med., pp. 655-664, 2005.
[6] K. Kashima, S. Matsumoto, and H. Ishii, Proposal ofwell-balanced menu planning by using fuzzy mathematicalprogramming and rough set theory,” Proc. Int. MultiConf.Eng. Comput. Scientists (IMECS2008), 2008.
[7] B. K. Seljak, Computer-based dietary menu planning,” J.Food Composition and Analysis, vol. 22, pp. 414-420, 2009.
[8] S. L. Ao, O. Castillo, and X. Huang ed., Intelligent controland innovative computing (Ch. 10: cooking-step schedulingalgorithm for simultaneous cooking of multiple dishes),Springer, 2012.
[9] Y. Matsushima, N. Funabiki, T. Nakanishi, and K. Watanabe,”An application of cooking step scheduling algorithm forhomemade cooking and its extensions,” Global Conf. Cons.Elect. (GCCE2012), pp. 94-98, October 2012.
[10] Y. Matsushima, N. Funabiki, T. Nakanishi, and K. Watan-abe, ”A dynamic rescheduling extension of cooking-stepscheduling algorithm for multiple dish cooking,” Proc. Int.Conf. Applied and Theoretical Information Systems Re-search (2nd ATISR2012), CD-ROM, Dec. 2012.
356