Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Logic and Integer Programming.pdf
Скачиваний:
45
Добавлен:
10.08.2013
Размер:
2.8 Mб
Скачать

Chapter 3

Modelling in Logic for Integer Programming

3.1 Logic Connectives and IP Constraints

We can regard an LP, or IP, constraint j ai j x j ( = )bi as an atomic proposition. LP is concerned with optimising over a conjunction of such constraints. If, however, we wish to allow a more general logical statement about such constraints we require an IP model.

In order to systematise the modelling of such conditions it is convenient to introduce 0–1 integer variables to represent the satisfaction, or otherwise, of such constraints. When this is done it is usually necessary to know the upper or lower bounds for the left-hand side of the constraint above, i.e.

mi ai j x j Mi

(3.1)

j

 

Such bounds can usually be derived from knowledge of the problem or known bounds on the variables. It is important for the bounds not to place unwarranted restrictions, but computationally desirable for them to be as ‘tight’ as possible. In fact the derivation of as small ‘big M’ (or large ‘little m’) values as possible is of central importance, as this affects the strength of the LP relaxation, and consequently the amount of computation in the subsequent IP optimisation by, for example, branch-and-bound. This aspect is discussed in Sect. 3.3. If it is desired to get the tightest values of M and m possible then one could, of course, resort to the, possibly computationally costly, approach of maximising and minimising j ai j x j subject to the LP relaxations of the other constraints in the problem to obtain M and m, respectively. In the ‘convex’ method of formulation, described in Sect. 3.4, it is possible to dispense with M and m altogether resulting in the LP relaxation yielding integer solutions.

If it is impossible to place either one or both bounds on the quantity then the condition may be MIP unrepresentable as discussed in Sect. 3.2. In order to describe the necessary modelling we use the following example.

Example 3.1 Represent the following conditions by (mixed) IP constraints involving the variables in the constraints and the 0–1 variables δi :

H.P. Williams, Logic and Integer Programming, International Series in Operations

71

Research & Management Science 130, DOI 10.1007/978-0-387-92280-5 3,C Springer Science+Business Media, LLC 2009

72

3 Modelling in Logic for Integer Programming

i.

 

 

 

 

ai j x j bi δi = 1

(3.2)

 

j

 

 

ii.

 

 

 

δi

= 1 −→

ai j x j bi

(3.3)

 

j

 

 

iii.

 

 

 

j

ai j x j bi

←→ δi = 1

(3.4)

 

 

 

For illustration we are only considering the inequality ‘ ’. It is straightforward to extend to ‘ ’ and ‘=’ by converting these (in) equalities to ‘ ’.

A convenient way of viewing condition (i) is by the contrapositive statement discussed in Sect. 1.3. The contrapositive of (3.2) is

δi = 0 ˜

ai j x j

bi

(3.5)

 

j

 

 

which, in turn, can be written as

 

 

 

δi = 0

ai j x j

> bi

(3.6)

 

j

 

 

We do not normally use the strict inequalities ‘<’ and ‘>’ in LP and IP. This is because we wish to find values for variables which give maxima and minima, which may lie on a boundary. But for strict inequalities we may only be able to give suprema (least upper bound) or infima (greatest lower bound). However, we can write, to a degree of approximation, (3.6) (using ‘ ’ for convenience) as

δi = 0 → − ai j x j bi ε

(3.7)

j

 

where ε is a suitable small number. If the left-hand side of the inequality is all integer ε may be taken as 1 (and there be no approximation).

We wish to impose the condition that if δi = 0 then j ai j x j + bi + ε 0. The largest that the left-hand side of this expression can ever be is m + b + ε. Hence we may write

3.1 Logic Connectives and IP Constraints

73

ai j x j + bi + ε (mi + bi + ε)δi

(3.8)

j

 

Equation (3.8) is more conveniently written as

 

ai j x j (mi bi ε)δi bi + ε

(3.9)

j

 

Therefore condition (i) above has been written as an IP constraint.

Equation (3.3) can be written, using analogous reasoning to that for (i), as

ai j x j + (Mi bi )δi Mi

(3.10)

j

This gives condition (ii) as an IP constraint.

Finally condition (iii) is modelled by taking both constraints (3.9) and (3.10) together.

If any of (3.2), (3.3) or (3.4) involve a conjunction of the original constraints then the single 0–1 variable δi can be used to represent all of these constraints.

It is sometimes unnecessary to model the full equivalence condition (iii) between the satisfaction of a constraint and the value of a 0–1 variable since one of the implications may be guaranteed by optimality. For example this happens with the facility location problem discussed in Sect. 2.3. A facility (e.g. warehouse) will not be opened if it is not used since this would be a non-optimal thing to do. Hence the condition j xi j = 0 δi = 0 need not be modelled explicitly.

We are now in a position to model all the connectives of the propositional calculus, applied to LP or IP constraints, by first representing the constraints by 0–1 ‘indicator’ variables δ1 and δ2 and modelling one of the conditions above. In many situations we may be able to suffice with modelling only condition (i) or condition (ii), but this will depend on the particular problem.

Because of the results in Sect. 1.3, we can suffice with modelling only a complete set of connectives. However, for convenience, we will model all the most commonly used connectives (Table 3.1).

 

Table 3.1

Connectives as 0–1 Constraints

 

 

·

−→

←→

δ1 + δ2 1

δ1 + δ2 = 2

δ1 = 0

δ1 δ2

δ1 = δ2

For the ‘ ’ connective if we have a disjunction of just two constraints then we could suffice with one 0–1 variable δ setting it to 0 to imply (or be implied by) one constraint and 1 for the other constraint. But we have used two 0–1 variables to demonstrate the generalisation to a disjunction of any number of constraints.

74

3 Modelling in Logic for Integer Programming

However if, in general, we have the disjunction of r constraints (or disjunction of r conjunctions of constraints) we could suffice with log2 r (where ‘ ’ represents the integer round-up operation), 0–1 variables since there will then be at least r settings of these variables. This is the subject of Exercise 3.7.1.

Example 3.2 shows how we may use these modelling devices.

Example 3.2 Model the following condition between LP constraints:

2x1 + x2 6

 

x1 + 3x2 9

2x1

2x2

 

9

(3.11)

x2

 

4

 

7x1

+

x2

 

20

·

+

 

 

 

 

 

 

 

 

 

 

 

x1, x2 0

 

 

 

 

 

(3.12)

 

 

 

 

x1, x2 R

 

 

 

 

 

 

It can be seen from the constraints above that 0 x1 3, 0 x2 4. Hence (numbering the five constraints in (3.11) as 1, 2, 3, 4, 5) we can give lower and

upper bounds on their left-hand sides of m1

= m2 = m3 = m4 = m5 = 0,

M1 = 10, M2 = 4, M3 = 15, M4 = 25, M5

= 14. It can be verified that these

bounds apply. Further analysis would allow us to tighten these bounds to computationally beneficial effect. However we use these, easily obtained, bounds for illustration. This allows us to link 0–1 variables δi to the constraints. We only need model condition (ii) for each of them since we only need to make an implication in one direction, for each constraint. This gives

2x1

+ x2

+ 4δ1

10

(3.13)

 

x2

4

 

(3.14)

x1 + 3x2

+ 6δ2

15

(3.15)

7x1

+ x2

+ 5δ2

25

(3.16)

2x1 + 2x2

+ 5δ3 14

(3.17)

(Note that it is unnecessary to use variable δ1 to imply the second constraint since it applies overall.)

It can be verified that setting a particular δi to 1 forces the corresponding constraints to hold. The logical relations between the constraints in (3.11) can then be written as

[(δ1 = 1) (δ2 = 1)] · δ3 = 1

(3.18)

The logical condition can now be modelled by

δ1 + δ2

1

(3.19)

δ3

= 1