1 Introduction

Multiobjective optimization is used by decision makers

when considering more than one conflicting objective function simultaneously. Multiobjective optimization is applied to several fields such as chemical engineering, energy management, drug design (Rangaiah and Bonilla-Petriciolet 2013; Ulusoy et al. 2022; Nicolaou and Brown 2013), just to name a few. Some applications may require

to model the problem using integer variables, see e.g. Hugo et al. (2005); Legendre et al. (2018); Pascual (2021). In these cases, we are in the context of multiobjective (mixed) integer programming (MOIP). It is the purpose of this paper to define and solve triobjective integer models to design nutritionally adequate and sustainable diet plans. In particular, we look for diet plans for school cafeterias that simultaneously minimize their carbon, water and nitrogen footprints. When dealing with more than one objective function, one looks for the so called nondominated solutions, points for which none of the objective functions can be improved without degrading some of the other objective values. In some applications, like ours, it is desirable to find the complete set of nondominated solutions so that the decision maker is able to choose among them. In this case, an exact algorithm is needed, i.e. an algorithm able to find the whole set of nondominated points of a MOIP.

There is a growing interest on exact algorithms for multiobjective mixed integer optimization and we mention the recent survey from Halffmann et al. (2022) for a comprehensive overview on solution approaches for multiobjective mixed integer linear problems. Exact methods for nonlinear integer problems also exist and there is a distinction between those that work in the space of the decision variables (see e.g Burachik et al. (2022); De Santis and Eichfelder (2021); De Santis et al. (2020); Eichfelder et al. (2022); Merenchige and Wiecek (2022)), and those that work in the space of the objective functions (see e.g. De Santis et al. (2020, 2022); Tamby and Vanderpooten (2021)). This work presents an exact algorithm for triobjective integer programming problems of the following form

$$\begin{aligned} \begin{array}{ll} \min & (f_1(x), f_2(x), f_3(x))^T\\ \text {~s.t. } & x\in \mathcal {X}\cap \mathbb {Z}^n, \end{array} \end{aligned}$$
(TOIP)

where \(\mathcal {X} \subseteq \mathbb {R}^n\) and \(f_1,f_2,f_3: \mathbb {R}^n\rightarrow \mathbb {R}\) are continuous functions. Nonlinear functions can be handled by our approach, as long as they satisfy the so called positive \(\gamma \) property introduced in De Santis et al. (2020) that will be recalled later. The image of the feasible set \(\mathcal {X}\cap \mathbb {Z}^n\) under the vector-valued function \(f:\mathbb {R}^n\rightarrow \mathbb {R}^3\) represents the feasible set in the criterion space, or the image set. The efficient solutions of problem (TOIP) are points \(x^*\in \mathcal {X}\cap \mathbb {Z}^n\) such that there exists no other feasible point \(x\in \mathcal {X}\cap \mathbb {Z}^n\) for which \(f_j(x)\le f_j(x^*)\), \(j=1,2,3\) and \(f(x)\not =f(x^*)\). The images f(x) of efficient points \(x\in \mathcal {X}\cap \mathbb {Z}^n\) are called nondominated points. Furthermore, a point \({\bar{x}}\in \mathcal {X}\cap \mathbb {Z}^n\) is called a weakly efficient point of (TOIP) if there is no \(x\in \mathcal {X}\cap \mathbb {Z}^n\) with \(f(x)< f({\bar{x}})\), where < is meant componentwise. The images f(x) of weakly efficient solutions \(x\in \mathcal {X}\cap \mathbb {Z}^n\) are called weakly non-dominated points. In the following, we will denote the set of non-dominated points of (TOIP), also called the non-dominated set, by \(\mathcal {Y}_N\) and the set of weakly non-dominated points by \(\mathcal {Y}_{wN}\).

The paper is organized as follows. In Sect. 2, we present our method for triobjective integer nonlinear problems. We analyze its correctness and present a strategy to avoid the detection of weakly nondominated points. A comparison on linear instances with two solvers for triobjective integer linear programming problems is reported in the Appendix. In Sect. 3, we present our application and two triobjective integer programs modeling the design of sustainable diet plans. We finally discuss the results obtained by solving the models using our algorithm. In Sect. 4, we draw some conclusions.

2 Algorithm TrIntOpt

The algorithm we propose extends the ideas used in De Santis et al. (2022) in order to define an exact criterion space method for triobjective nonlinear integer programs. Our algorithm, named TrIntOpt, is based on the \(\varepsilon \)-constraint method, a well-known scalarization technique. The idea is to iteratively solve biobjective subproblems, defined by adding further constraints to the original feasible set. More precisely, given (TOIP), at every iteration k our method determines the nondominated set of biobjective problems of the following form:

figure a

where the parameter \(\varepsilon ^k\) varies between \(\min _{x \in \mathcal {X} \cap \mathbb {Z}^n} f_3(x)\) and the value \(f_3(\hat{x}^0) - \delta \), being \(\delta \) a positive step size and \(\hat{x}^0\) the point defined as follows. Among the efficient points of the biobjective problem \(\min _{x \in \mathcal {X} \cap \mathbb {Z}^n} (f_1(x), f_2(x))^\top \), \(\hat{x}^0\) is one that achieves the maximum with respect to the objective function \(f_3\). As it will be clarified later on, the step size \(\delta \) controls the exacteness of TrIntOpt. The role of \(f_1\), \(f_2\) and \(f_3\) in the definition of Problem (BOIP\(^k\)) can be interchanged.

For the definition of TrIntOpt we need to have an oracle able to detect the nondominated set of the biobjective nonlinear integer problem (BOIP\(^k\)):

Assumption 1

There exists an oracle able to detect the complete nondominated set of Problem (BOIP\(^k\)) after having addressed a finite number \(B^k\) of single-objective integer programs. For each nondominated point \(y\in \mathbb {R}^2\) detected, the oracle is able to compute one of its preimage, namely one efficient point \(x\in \mathcal {X}\cap \mathbb {Z}^n\) such that \((f_1(x),f_2(x)) = y\).

In the following, we denote by \(\mathcal {E}^k\) the set of efficient points detected by the oracle in Assumption 1. We cite (De Santis et al. 2022, 2020) as works where algorithms satisfying Assumption 1 are defined. Furthermore, we need to assume the existence of the ideal point, in order to be guaranteed that the nondominated set is a finite set:

Assumption 2

We assume that the ideal objective values \(f_i^{\textrm{id}}:= \min _{\mathcal {X}\cap \mathbb {Z}^n} f_i(x)\), \(i=1,2,3\), and thus the ideal point \(f^{\textrm{id}}:=(f_1^{\textrm{id}}, f_2^{\textrm{id}}, f_3^{\textrm{id}})\in \mathbb {R}^3\), exists.

We report in Algorithm 1 the scheme of our method TrIntOpt. TrIntOpt starts by computing \(x^* \in \mathcal {X} \cap \mathbb {Z}^n\) as the minimum with respect to \(f_3\) and \(\mathcal {E}^0\) as the set of efficient points detected when addressing \(\min _{x \in \mathcal {X} \cap \mathbb {Z}^n} (f_1(x), f_2(x))^\top \). The images of points in \(\mathcal {E}^0\) are nondominated points of Problem (TOIP) and define the set \(\mathcal {M}^0\). The output of TrIntOpt, \(\mathcal {M}\subseteq \mathbb {R}^3\), is initially set equal to \(\mathcal {M}^0\). The starting \(\varepsilon ^1\) is set equal to \(f_3(\hat{x}^0) - \delta \) and we enter in a loop. At every iteration k, the biobjective problem (BOIP\(^k\)) is handled, the set \(\mathcal {E}^k\) and its image \(\mathcal {M}^k\) are computed and \(\mathcal {M}\) is enriched by the points in \(\mathcal {M}^k\). As it is shown in Proposition 4, the points in \(\mathcal {E}^k\) are at least weakly efficient. Then, the new value \(\varepsilon ^{k+1}\) is set equal to \(f_3(\hat{x}^k) - \delta \), being \(\hat{x}^k\) a maximum with respect to \(f_3\) over the set \(\mathcal {E}^k\) and we go on until \(\varepsilon ^k\) is less than \(f_3(x^*)\), meaning that the whole criterion space has been visited.

Algorithm 1
figure b

TrIntOpt

In order to prove that TrIntOpt detects the complete nondominated set of Problem (TOIP), we need to assume that the objective functions are positive \(\gamma \)-functions, a concept first introduced in De Santis et al. (2020). Basically, we need to assume that a positive value exists that underestimates the distance between the image of two integer feasible points of (TOIP), componentwise.

Definition 1

(Positive \(\gamma \)-function) Let \(\gamma >0\). A function \(g:\mathcal {X} \rightarrow \mathbb {R}\) is a positive \(\gamma \)-function over \(\mathcal {X} \cap \mathbb {Z}^n\) if it holds \(| g(x) - g(z) | \ge \gamma \) for all \(x,z \in \mathcal {X}\cap \mathbb {Z}^n\) with \(g(x)\ne g(z)\).

Assumption 3

The functions \(f_i:\mathbb {R}^n\rightarrow \mathbb {R}\), \(i=1,2,3\) in Problem (TOIP) are positive \(\gamma \)-functions as in Definition 1 for some \(\gamma >0\).

Linear or quadratic functions defined over \(\mathbb {Q}^n\) are examples of functions satisfying Assumption 3. Table 1, in Section 4.3 in De Santis et al. (2022), shows some classes of functions for which Assumption 3 holds and reports how to compute \(\gamma \).

Let Assumption 3 hold for all the objective functions in (TOIP) with \(\gamma >0\). Let \(\delta >0\) be the input parameter for TrIntOpt. In case \(\delta > \gamma \) TrIntOpt could miss some nondominated points of Problem (TOIP), since the step size \(\delta \) may be wider than the distance between two nondominated points. On the other hand, if \(\delta \) is chosen to be less than or equal to \(\gamma \), we have that TrIntOpt is able to detect the complete nondominated set of (TOIP), as shown in the following.

In Proposition 4, we first prove that any point detected by TrIntOpt is at least a weakly nondominated point. Then, Proposition 5 shows that every nondominated point is detected at some iteration of TrIntOpt, so that no nondominated point is left undetected, meaning that the set \(\mathcal {M}\), output of TrIntOpt, is a superset of the nondominated set \(\mathcal {Y}_{N}\).

Proposition 4

Let Assumptions 1 and  2 hold. Let Assumption 3 hold with \(\gamma >0\) and assume that \(\delta \le \gamma \) in Algorithm 1. Let \({\tilde{x}} \in \mathcal {E}^k\). Then \(f({\tilde{x}}) \in \mathcal {Y}_{wN}\).

Proof

Assume by contradiction that \(f({\tilde{x}}) \not \in \mathcal {Y}_{wN}\), namely \(x\in \mathcal {X}\cap \mathbb {Z}^n\) exists such that

$$\begin{aligned} f_i(x)<f_i({\tilde{x}})\quad i=1,2,3. \end{aligned}$$
(1)

Since \({\tilde{x}} \in \mathcal {X}^k\cap \mathbb {Z}^n\) we have that \(f_3({\tilde{x}})\le \varepsilon ^k\). Therefore, \(x\in \mathcal {X}^k\cap \mathbb {Z}^n\) and \(f_3(x)\le \varepsilon ^k\), otherwise \(f_3({\tilde{x}})<f_3(x)\), getting a contradiction to (1). Since \({\tilde{x}}\) is an efficient point for Problem (BOIP\(^k\)), we have that

$$\begin{aligned} \not \exists \, \hat{x} \in \mathcal {X}^k\cap \mathbb {Z}^n \text{ such } \text{ that } f_1(\hat{x}) \le f_1({\tilde{x}}), f_2(\hat{x}) \le f_2({\tilde{x}}),\end{aligned}$$

with \(f_i(x)\not = f_i({\tilde{x}})\quad i=1,2;\) so that (1) cannot hold. \(\square \)

Proposition 5

Let Assumptions 1 and  2 hold. Let Assumption 3 hold with \(\gamma >0\) and assume that \(\delta \le \gamma \) in Algorithm 1. Let \(y \in \mathcal {Y}_{N}\). Then \(k\in \mathbb {N}\) and \({\tilde{x}} \in \mathcal {E}^k\) exist such that \(f({\tilde{x}}) = y\).

Proof

Let \(k\in \mathbb {N}\) be the iteration of Algorithm 1 where it holds

$$\begin{aligned} \varepsilon ^{k+1}<y_3\le \varepsilon ^k. \end{aligned}$$
(2)

Note that such value \(k\in \mathbb {N}\) exists from the definition of \(\varepsilon ^k\) within Algorithm 1 and since \(f_3:\mathbb {R}^n \rightarrow \mathbb {R}\) satisfies Assumption 3. Note also that since \(y_3\le \varepsilon ^k\), we have that \(x\in \mathcal {X}^k\cap \mathbb {Z}^n\) exists such that \(y = f(x)\). Assume by contradiction that \(x\not \in \mathcal {E}^k\). Two possibilities need to be considered:

  1. i)

    if we assume that \(x\not \in \mathcal {E}^k\) as it is not an efficient point for (BOIP\(^k\)), we have that \((y_1,y_2) = (f_1(x), f_2(x))\) does not belong to the nondominated set of Problem (BOIP\(^k\)). Then, \(\hat{x} \in \mathcal {X}^k\cap \mathbb {Z}^n\) exists such that

    $$\begin{aligned} f_1(\hat{x}) \le y_1,\; f_2(\hat{x}) \le y_2,\end{aligned}$$

    with \(f_i(\hat{x})\not = y_i, \; i=1,2.\) Since \(y\in \mathcal {Y}_{N}\) it must hold

    $$\begin{aligned} y_3 < f_3(\hat{x})\le \varepsilon ^k. \end{aligned}$$

    Since Assumption 3 holds and \(\delta \le \gamma \), necessarily \(y_3 \le \varepsilon ^{k+1}\), that is a contradiction to (2),

  2. ii)

    if we assume that \(x\not \in \mathcal {E}^k\) as it has not been detected by the Oracle satisfying Assumption 1 used within Algorithm 1, we would have that \((f_1(x), f_2(x))\) belongs to the nondominated set of Problem (BOIP\(^k\)) but \({\bar{x}} \in \mathcal {E}^k\), \({\bar{x}} \ne x\) exists such that \((f_1({\bar{x}}), f_2({\bar{x}})) = (f_1(x), f_2(x)) = (y_1,y_2) \). From Proposition 4, it holds that \(f({\bar{x}})\in \mathcal {Y}_{wN}\). Then, since \(y\in \mathcal {Y}_{N}\), we have that \(y_3 = f_3(x)\ne f_3({\bar{x}})\) only if \(y_3 = f_3(x) < f_3({\bar{x}})\). As before, necessarily \(y_3 \le \varepsilon ^{k+1}\) and we get a contradiction to (2). \(\square \)

Based on the previous lemmata we are able to prove the following.

Theorem 6

Let Assumption 1 and Assumption 2 hold. Let Assumption 3 hold with \(\gamma >0\). Let \(\delta \le \gamma \). Algorithm 1 finds the complete nondominated set \(\mathcal {Y}_N\) of (TOIP) after having addressed a finite number of single-objective integer programs.

Proof

By Proposition 4 and Proposition 5 we have \(\mathcal {Y}_N\subseteq \mathcal {M}\). Thanks to Assumption 3, choosing \(\delta \in (0,\gamma ]\) allows the while loop to take at most \(m = \big \lfloor \left( f_3(\hat{x}^0) - f_3(x^*)\right) /\gamma \big \rfloor \) iterations. Furthermore, taking into account Assumption 1, we have that \(\mathcal {M}^k\) can be detected after having solved \(B^k\) single-objective integer programs.

Then, considering the single-objective integer programs tackled at the beginning of Algorithm 1 for the computation of \(x^*\) and \(\mathcal {M}^0\), that is \(B^0+1\), the total number of single objective integer programs addressed by Algorithm 1 is \(B^0 + \sum _{k=1}^m B^k + 1\). \(\square \)

2.1 Avoiding the detection of weakly nondominated points

Starting from the ideas presented in Mavrotas (2009), we propose to modify Problem (BOIP\(^k\)) addressed at Step 7 of Algorithm 1. An additional nonnegative continuous variable \(s\in \mathbb {R}\) is introduced to avoid the detection of weakly nondominated solutions along the iterations of TrIntOpt. The biobjective nonlinear mixed-integer problem we consider is as follows:

figure c

where \(\rho > 0\) is an adequately small number (usually between \(10^{-3}\) and \(10^{-6}\)) (see Mavrotas (2009)). Despite Problem (BOMIP\(^k\)) is a mixed-integer problem, its nondominated set is finite and can be detected by the same oracle used for addressing Problem (BOIP\(^k\)). We denote by \(\mathcal {{\tilde{E}}}^k\) the set of efficient points detected by the oracle in Assumption 1, when solving Problem (BOMIP\(^k\)).

Proposition 7

Let Assumption 2 hold. Let Assumption 3 hold with \(\gamma >0\). Then, Problem (BOMIP\(^k\)) has a finite nondominated set. Furthermore, if \(x\in \mathcal {{\tilde{E}}}^k\) then \(f(x)\in \mathcal {Y}_{N}\).

Proof

Recall that by \(\mathcal {X}^k\) we denote the set \(\mathcal {X} \cap \{x \in \mathbb {R}^n: f_3(x) \le \varepsilon ^k\}\). From Assumptions 2 and 3, we have that the set \(\{f_3(x)\mid x \in \mathcal {X}^k \cap \mathbb {Z}^n\} \subset \mathbb {R}\) is a finite set. Furthermore, given \({\bar{x}} \in \mathcal {X}^k \cap \mathbb {Z}^n\), a unique \({\bar{s}}\) exists such that

$$\begin{aligned} \begin{array}{rrl} {\bar{s}} = & \operatorname {argmax}& s\\ & \text {~s.t. } & f_3({\bar{x}}) + s = \varepsilon ^k\\ & & s\ge 0. \end{array} \end{aligned}$$

Therefore, the nondominated set of Problem (BOMIP\(^k\)) is finite. Let \(x^\prime \in \mathcal {E}^k\) be an efficient solution of (BOIP\(^k\)). From Proposition 4 we have that \(f(x^\prime ) \in \mathcal {Y}_{wN}\). Let \((\hat{x}, \hat{s})\in \mathcal {{\tilde{E}}}^k\) be an efficient solution of (BOMIP\(^k\)) and assume by contradiction that \(x^\prime \) dominates \(\hat{x}\), with

$$\begin{aligned} f_1(x^\prime ) = f_1(\hat{x}) \quad \text{ and } \quad f_2(x^\prime ) = f_2(\hat{x}).\end{aligned}$$

Then, \(f_3(x^\prime ) < f_3(\hat{x}) = \varepsilon ^k -\hat{s}\), with \(\hat{s}\ge 0\). This implies that \(s^\prime \ge 0\) exists such that \(f_3(x^\prime ) = \varepsilon ^k -s^\prime \) and \(s^\prime > \hat{s}\). However, this contradicts the efficiency of \((\hat{x}, \hat{s})\) for Problem (BOMIP\(^k\)), as \((x^\prime , s^\prime )\) is feasible for (BOMIP\(^k\)), with

$$\begin{aligned} f_1(x^\prime ) - \rho s^\prime< f_1(\hat{x}) - \rho \hat{s} \quad \text{ and } \quad f_2(x^\prime ) - \rho s^\prime < f_2(\hat{x}) - \rho \hat{s}.\end{aligned}$$

\(\square \)

3 Designing sustainable diet plans through triobjective 0-1 models

Sustainable diets are defined by the Food and Agriculture Organization of the United Nations [17] as “those diets with low environmental impact that contribute to food and nutrition security and to a healthy life for present and future generations”. A sustainable diet must therefore be healthy, have low environmental impact and respect cultural habits in order to be acceptable to the population. These issues are often incompatible, for example low-cost diets correspond to high energy density, whereas diets of higher nutrient density and nutritional quality have higher costs. The healthiness of food is guaranteed by following the advices of nutritionists and various medical and governmental institutions, which mainly consist of dietary guidelines (Institute of Medicine 2005) defining nutrient requirements, recommended nutrient intakes as well as recommended consumption levels of some foods [19].

The environmental impact of food production refers to the level of greenhouse gas emissions, the use of land and water resources, pollution, phosphorus depletion and the impact of chemical products such as herbicides and pesticides. Cultural habits, i.e. the composition of meals, food preferences and preparation techniques, are strongly influenced by the traditions, beliefs and values shared by a community. They therefore define the structure of each meal and the set of foods and dishes that are considered edible and acceptable (Fjellstrom 2004). In addition, the attractiveness and variability of meals must also be considered when designing a diet. A meal plan, or menu, consists of the sequence and composition of daily meals over a given period of time. This can be done by selecting dishes from a given set of recipes with a portion size that generally depends on age, weight, gender, and level of physical activity. The design of a menu can therefore be modeled as the assignment of dishes (resources) to given places in a schedule (slots).

The case study considered in this paper is the design of school lunch menus for primary schools in Italy. The set of dishes available to be served was determined by collecting a sample of several Italian primary school menus (children aged 6-11 years) and results in a list of 178 dishes grouped as 66 first-course dishes (in general including pasta or other carbohydrate sources), 75 s-course dishes (in general a source of protein), 35 side dishes (vegetables, potatoes, or salad), fresh fruit, and bread. Tap water is the only beverage allowed for lunch.

Complying with the Italian recommended dietary allowances (RDAs) [21], a fixed portion size for each dish was considered. Recommended ranges for energy and nutrient intakes (fats, proteins, carbohydrates, sugars, fiber, sodium, calcium, iron, and vitamin B12) for each lunch are also obtained from RDAs. To satisfy these requirements, the energy quantity \(q_i^{en}\) and nutrient quantities \(q_i^p\) of each dish i and nutrient p were calculated from its ingredients using the Italian Food composition and Nutrition database [22]. Other recommendations include limiting or avoiding consumption of some food groups and increasing consumption of others. For example, health authorities recommend eating more plant-based foods, limiting animal products, especially red meat, and avoiding processed meats. To reflect such recommendations, different food groups are defined (white meat, red meat, eggs, fish, dairy, and vegetables) and dishes are assigned to the appropriate food group g. In addition, dishes containing processed meat are not included in the list of available dishes.

The impact of food production on the environment was characterized by some standard consumption-based indicators, such as the carbon, water, and nitrogen footprints. The first is expressed as carbon dioxide equivalent and takes into account all the primary greenhouse gases, i.e., carbon dioxide \(CO_2\), methane \(CH_4\), and nitrous oxide \(N_2O\), emitted during food production. The second takes into account for the freshwater withdrawals required to produce food and the last the pollution of water bodies and ecosystems due to the excess of nitrogen in agricultural production systems. The carbon and water footprints associated to each dish i, denoted by \(q_i^{cf}\) and \(q_i^{wf}\) respectively, were computed from its ingredients using the database developed in the framework of the EU SU-EATABLE LIFE project (Petersson et al. 2021). The nitrogen footprint \(q_i^{nf}\) associated to each dish i was estimated from its ingredient using the model presented in Leach et al. (2013).

We report in Fig. 1 the carbon, water and nitrogen footprints of second-course dishes and side dishes containing vegetables. As expected, the second-course dishes containing red meat are the less sustainable ones.

Fig. 1
figure 1

Carbon, water and nitrogen footprints of second-course dishes and side dishes containing vegetables (one fixed-size portion)

Cultural habits are naturally complied with the choice of the set of recipes from which to select the dishes of the menu, and with the structure of the lunch which must consists of one first-course dish, one second-course dish, one side-dish, fresh fruit and bread. On the other hand, attractiveness and variability of the menu is pursued by fixing the minimum and maximum number of times that each dish, and dishes of the same food group g, can be served in the menu.

The design of a lunch menu over D days can be modelled as the assignment of \(D \times 178\) binary variables \(x^i_d\), each one associated to each available dish i and day d, assuming value 1 if the dish i is served in the lunch of the day d, and 0 otherwise.

Nutritional recommendations consists of recommended nutrient intakes and can then be modeled as lower and/or upper bounds on energy and nutrients contents of each lunch and of the overall menu as follows:

$$\begin{aligned} L_p^{day} \le \sum _{i=1}^{178} x^i_d \cdot q_i^p \le U_p^{day}, \quad \forall d, p \end{aligned}$$
$$\begin{aligned} L_p^{week} \le \sum _{d=1}^{5} \sum _{i=1}^{178} x^i_d \cdot q_i^p \le U_p^{week}, \quad \forall p \end{aligned}$$
(3)

where \(L_p^{day}\), \(U_p^{day}\), \(L_p^{week}\), and \(U_p^{week}\) are the lower and upper bounds on the recommended daily and weekly intake of nutrient p. The recommendations limiting or increasing the consumption of some food groups, as well as those related to the attractiveness and variability of the menu, can be modeled as lower and/or upper bounds on the number of dishes of the same food group g served during the week as follows:

$$\begin{aligned} m_g \le \sum _{d = 1}^{5} \sum _{i \in g} x_d^i \le M_g, \quad \forall g \end{aligned}$$
(4)

where \(m_g\), and \(M_g\) are the lower and upper bound associated to group g. Moreover, variability is increased by imposing that each dish cannot be served more than once in the menu, that is

$$\begin{aligned} \sum _{d=1}^{D} x^i_d \le 1, \quad \forall i \ \text {(apart from fruit and bread)} \end{aligned}$$

The values of the above defined lower and upper bounds are given in Tables 1 and 2.

Table 1 Lunch energy and nutrient constraints for children aged 6-11 years
Table 2 Food groups repetition constraints for health, acceptability and variability requirements

The composition of the lunch of each day d is guaranteed by the following constraints:

$$\begin{aligned} \sum _{i\in first} x^i_d =1, \quad \sum _{i\in second} x^i_d =1, \quad \sum _{i\in side} x^i_d =1, \quad \forall d \end{aligned}$$

and \(x_i^d=1\), \(\forall d\) and when i corresponds to fruit and bread.

In this paper two different models are considered, with different objective functions and different number of days D. The first model refers to a weekly menu, i.i. \(D = 5\), and the objective functions to be minimized are the carbon footprint (expressed as grams of carbon dioxide equivalent emitted), the water footprint (expressed as liters of freshwater withdrawals), and the nitrogen footprint (expressed as grams of nitrogen released) of the menu, that is

$$\begin{aligned} f_1(x)=\sum _{d=1}^{D} \sum _{i=1}^{178} x^i_d \cdot q_i^{cf}, \quad f_2(x)=\sum _{d=1}^{D} \sum _{i=1}^{178} x^i_d \cdot q_i^{wf}, \quad f_3(x)=\sum _{d=1}^{D} \sum _{i=1}^{178} x^i_d \cdot q_i^{nf}. \nonumber \\ \end{aligned}$$
(5)

This model results in a triobjective problem of 890 binary variables and 292 constraints 25 of which are equality constraints. As reported above, the objective functions and the constraints are linear and Assumption 3 is satisfied with \(\gamma = 0.01\).

The second model refers to a menu for just two days (\(D=2\)). In this case the weekly constraints (3) and (4) do not apply and the objective functions to be minimized are the carbon and water footprints of the menu, that is \(f_1(x)\) and \(f_2(x)\) in (5), and the mean square deviation of the daily energy intake with respect to the RDAs reference value of 700 kcal/day, that is

$$\begin{aligned} f_3(x)=\frac{1}{D}\sum _{d=1}^{2} \left[ \left( \sum _{i=1}^{178} x^i_d \cdot q_i^{en}\right) -700\right] ^2. \end{aligned}$$

The model is then a triobjective binary quadratic one, requiring a much heavier computational burden for our algorithm. This is the reason why the menu runs over just two days, so that only 356 binary variables are needed. Solving this triobjective model ended in identifying 5 nondominated solutions, i.e. 5 menus, that are reported in the table below. Note that every menu is also including bread and fruit for every day, which are not reported in Table 3.

Table 3 Menus obtained solving the second model

3.1 Numerical results and discussion

The performance of TrIntOpt strongly depends on the performance of the oracle satisfying Assumption 1 adopted. In our Python implementation of TrIntOpt we solve the biobjective subproblems (BOMIP\(^k\)) by the Frontier Partitioner Algorithm (FPA) presented in De Santis et al. (2022). Assumption 1 is satisfied by FPA and the number \(B^k\) of single-objective integer programs addressed is equal to \(|\mathcal {Y}^k_N|+ 2\), being \(|\mathcal {Y}^k_N|\) the cardinality of the nondominated set of the subproblem (BOMIP\(^k\)). For how TrIntOpt works, it can happen that single-objective integer problems are addressed to detect nondominated points that have already been found. In order to avoid useless computations and save CPU time, we keep a list of the nondominated points detected along the iterations of TrIntOpt and use the corresponding efficient points to warmstart the solver of the single-objective integer problems. Within our Python implementation of TrIntOpt we use the MIP solver of Gurobi (2022). All experiments have been executed on an Intel(R) Xeon(R) Gold 6252N CPU running at 2.30GHz.

For what concerns the first model, 635 weakly nondominated points were determined. Each point represents a set of menus with the same carbon, water, and nitrogen footprint values, and therefore equivalent with respect to the environmental impact. For example, the simple permutation of lunches within the days of the week, provides equivalent menus. Moreover, there are dishes sharing the same energy, nutrients, and environmental impact values that can be interchangeably used,Footnote 1 and this may further increase the number of possible equivalent menus. All the menus associated with the 635 points are nutritionally adequate, healthy and attractive, since they satisfy the constraints.

Projections of weakly nondominated points on the three coordinate planes are shown in Figs. 2, 3, and 4.

Fig. 2
figure 2

Projection of the weakly nondominated points on the plane nitrogen-water footprints

Fig. 3
figure 3

Projection of the weakly nondominated points on the plane water-carbon footprints

Fig. 4
figure 4

Projection of the weakly nondominated points on the plane carbon-nitrogen footprints

Figures 2 and 3 show that menus with low/high nitrogen or carbon footprint are generally those with higher/lower water footprint. On the contrary, menus with high/low carbon footprint exhibit also high/low nitrogen footprint, see Fig. 4. As a consequence, menus with high water footprint have low values for both carbon and nitrogen footprints, and menus with low water footprint have high values for both carbon and nitrogen footprint. This is clearly shown in Fig. 4 checking the color mark for the water footprint values. An approximate quadratic relation between the footprint values associated to the (weakly) nondominated points found is obtained by least square fitting with \(R^2=0.98\), and the corresponding surface is shown in Fig. 5. Hence water footprint increases on average quadratically when carbon and nitrogen footprints decrease. This allows, for instance, to estimate the minimum water footprint of a menu fixing some values for the associated carbon and nitrogen footprint.

Fig. 5
figure 5

Quadratic approximate relation between weakly nondominated points (\(R^2=0.98\))

4 Conclusions

An exact method for detecting the nondominated set of triobjective nonlinear integer programs has been devised. The method TrIntOpt uses the concept of \(\gamma \)-positive function in order to properly combine the \(\varepsilon \)-constrained method with solvers for biobjective integer programs. A strategy to avoid the detection of weakly nondominated points, seen as a disadvantage of the \(\varepsilon \)-constrained method, is presented. By applying TrIntOpt to two triobjective 0-1 problems modeling the design of nutritionally adequate and healthy diet plans, we were able to collect menus, minimizing standard consumption-based indicators measuring the impact of food production on the environment. Thanks to the theoretical results proven we are guaranteed that each menu detected is a nondominated point of the problem considered and that the whole nondominated set has been recovered.