• Nem Talált Eredményt

Multi-Level Genetic Algorithm (muleGA)

3.3 Formal Denitions of Knapsack Problems

3.3.1 0-1 Knapsack Problem

The 0-1 Knapsack Problem is a special Knapsack Problem (KP) with the following denition [33]. There are nitems, a Knapsack with a size of c and one set of variables and two sets of constants related to the items, namely: decision variables x1, . . . , xn, positive weights w1, . . . , wn, and prots p1, . . . , pn, where, ∀i ∈ [1, n], xi ∈ {0,1} (xi is either zero or one), wi ∈ {R+∪0} represents the weight,pi ∈ {R+∪0} represents the prot (also called prize and price) of theithitem. The single objective 0-1 KP is formally stated as follows.

The problem dened in Equations (3.8) is single-objective and single-constrained because the weights and prices are elements of {R+∪0}. Many variants of the single-objective KP, namely: unbounded, multiple-choice, multi-constrained knapsack problems and the change-making problem are presented in [101]. References for the nested [102], nonlinear [103] and inverse-parametric [104] KPs are also cited.

3.3.2 Multi-Objective 0-1 Knapsack Problem

Multi-objective KPs have dimensional price vectors and either single- or multi-dimensional weight vectors. Many interpretations could be formed for the real-life coun-terparts of the multi-dimensional prize p and weight w sums. In most of the cases, the Multi-Objective Knapsack Problem (MOKP) withm objectives is interpreted as a prob-lem withm single-dimension knapsacks with capacitiesc1, . . . , cm. Every selected object must be simultaneously placed into all m knapsacks. The weight and prize of an object usually diers for every knapsack [52, 105].

In the scope of this thesis, the interpretation of the MOKP is given as a problem with one multi-dimensional knapsack, rather than many single-dimensional knapsacks.

Note that while the interpretation formed for the problem diers, the MOKP under consideration is generally the same (the dimensions of the price and weight vectors need not to be the same in the following denition in contrast to the traditional approaches).

The denition of the 0-1 MOKP withmp dimensional prices andmw dimensional weights is the following.

3.3 Formal Denitions of Knapsack Problems 55 There are two versions of MOKPs, the Multi-Objective Single-Constraint Knapsack Problem (MOSCKP) and the Multi-Objective Multiple-Constraint Knapsack Problem (MOMCKP). Considering the former, mw = 1, in case of the latter, mw > 1. In this thesis, under the term MOKP, the MOMCKP is considered. In the literature, multi-constraint is sometimes referred as multi-dimensional. Basically, the three main parameters which dene a KP are the following: the dimension of the prot vector (~p), the dimension of the weight vector w and the number of knapsacks (~ n). Other important parameters are the type of constraints (tight, loose, etc) and the type of the decision variables (boolean, integer, etc).

3.3.3 Multi-Level Multi-Objective 0-1 Knapsack Problem

The occurrence of the term Multi-Level Knapsack Problem in the literature is innitesi-mal as there is only one incidence of the term Multi-Level Knapsack Problems in [106].

The same can be said about hierarchical knapsack problems. Basically, there is no ac-tive research involving any kind of knapsack related problems which have multi-level or hierarchical attributes by any means. This is far from being surprising, as the follow-ing, considerable new type of knapsack problem is signicantly more complex than the NP-hard KP.

Denition 10 (Multi-Level Multi-Objective 0-1 Knapsack Problem) Let~pall de-note the price vector, which is the sum of thep~j price vectors of thevrst level knapsacks, each knapsack with nj possible boxes. The z upper level knapsacks are denoted withw~k. The value of Kk(i)denes which boxes from which knapsacks should also get packed into the upper level knapsackk for weight constraint checking with~ck. Then, the following is a Multi-Level Multi-Objective 0-1 Knapsack Problem.

maximize ~pall =

Figure 3.5: An example of KPs arranged in a hierarchical structure, forming a 3-level KP. The aim of this multi-level KP is to maximize the price vectors of the ve rst level KPs (and therefore the price vectors of all the upper level ones), while satisfying the weight constraints of each KP. The dotted blue lines represent the assignments from all those rst level knapsacks to the top-level one, which are assigned to a second-level knapsack. The broken red line highlights a special case, when a knapsack is assigned to more upper level knapsacks. From Denition 10, it follows that the content of this knapsack is duplicated, and half of this duplicated content is assigned to one of the second-level knapsacks, the other half is assigned to the other second-level knapsack.

j= 1, . . . , v, k= 1, . . . , z, nj ∈N+ (3.10f) Note that the relation of the rst level knapsacks to the upper level ones are dened by the Kkassignments. The denition allows a broad variety of problem congurations to exist, as each box of the rst level knapsacks can be assigned to any upper level knapsack.

In the context of this thesis, Multi-Level Multi-Objective 0-1 Knapsack Problems will be simplied by imposing constraints on the possible Kkassignments, so not all the degrees of freedom provided by the denition is going to be used. Either all of the possible boxes of an arbitrary rst level knapsack is assigned to an upper level knapsack or none. Upper level knapsacks need to get assigned with boxes from at least two rst level knapsacks.

An example arrangement of knapsacks into a 3-level hierarchical structure is shown in Figure 3.5.

Example 2 (Multi-Level Multi-Objective 0-1 Knapsack Problem concepts) The not-so-real concepts of Example 3 are further evolved here to illustrate the properties of the Multi-Level Multi-Objective 0-1 Knapsack Problems. The levels of the multi-level conguration are the following: the level of burglars, the level of car trunks and the level of the helicopter (an example for a general 3-level KP is shown in Figure 3.5). The scenario is the following: There are v burglars simultaneously robbing v houses. When-ever the burglars nished loading their knapsacks, they supposed to meet their partner burglars at the getaway car. There is a getaway car for each pair of burglars, so the number of the cars is v2 (as each burglar has a pair, number v is even). At the time

3.3 Formal Denitions of Knapsack Problems 57

two burglars meet at their getaway car, they are supposed to load the pilferage into the trunk of the car. Each burglar's knapsack conguration is adequate, as they could not have left the houses with knapsacks violating weight constraints. However, as the trunk has its own weight constraints, it is possible that two valid knapsack congurations may infringe them. In case all of the goods in the v knapsacks successfully t in the v2 trunks, the burglars drive the cars to the helicopter. Into the helicopter they load all of the goods residing in the trunks, and again, they check for weight constraints, this time the helicopter's. In case each stolen object successfully loads into the helicopter without violating any weight constraints, the burglars carried out a valid conguration of the Multi-Level Multi-Objective 0-1 Knapsack Problem. In case the conguration is non-dominated in the Pareto sense, then it is a Pareto-optimal conguration.

3.3.4 Knapsack Problems with Description Logic

The KPs presented above belong to the class of Mixed Integer Linear Programming (MILP) problems. There are, however, such necessities of the dietary menu planning problems which are not expressible through the MILP type formalizations of the KPs.

Some of the relationships of Dietary Menu Plan (DMP) decision variables are only for-malizable through description logic. More on these requirements are presented in Section 4.4.1.4.

It is important to clarify here that for solving the DMPs, we are looking for such an algorithm which handles the KPs arranged in a hierarchical structure, forming a MLOP, and also provides some mechanism to handle the interconnected decision variables of the problems, whose connection is only expressible through rst-order predicate logic. MILP models do not support reasoning about objects, classes of objects. Generally, there are such programs which are impossible to formulate or convert to a MILP, because MILP schemas are not Turing-complete, unlike First Order Logic (FOL), which is. A recent work focuses on the integration of FOL and MILP under the name First-Order Logic Mixed Integer Linear Programming model is presented in [107].

There are two scenarios the DMP solver should handle. In the rst scenario, one decision variable (the hypothesis variable) infers the values of other variables (the con-clusion variables) according to some relation expressible through description logic. Here, this is named taxonomy relation, because this type of information is going to be used for representing the implicit information about any given object (knapsack). In the second scenario, a combination of decision variables infers the values of other variables. This is called the combination relation because the conclusion variables are set according to the combination of the hypothesis variables. This type of information is going to be used by the solver to assess the compilation of the DMP components. The real-world examples for the taxonomy and combination relation are given in Example 3 in Section 3.4.

So, the solver we are looking for should perform well in solving MOKPs, it should handle the hierarchical structure of KPs, which form a MLOP, and it should support the handling of information about the boxes (objects) represented with description logic.

Such an algorithm is proposed in the following section.