• No se han encontrado resultados

Algunas consideraciones sobre el duelo y los trastornos psicopatológicos

C APÍTULO 3 M ARCO C ONCEPTUAL SOBRE EL D UELO

3.2 Proceso de duelo y psicopatología

3.2.2 Algunas consideraciones sobre el duelo y los trastornos psicopatológicos

A transporter has to deliver heating oil from the refinery at Donges to a certain number of clients in the west of France. His clients are located at Brain-sur-l’Authion, Craquefou, Guérande, la Haie Fouassière, Mésanger and les Ponts-de-Cé. The following table lists the demands in liters for the different sites.

Table 10.7:Demands by clients (in liters)

Brain-sur-l’Authion Craquefou Guérande Haie Fouassière Mésanger Ponts-de-Cé

14000 3000 6000 16000 15000 5000

The next table contains the distance matrix between the clients and the refinery.

Table 10.8: Distance matrix (in km)

Brain-sur- Haie Ponts-

Donges l’Authion Craquefou Guérande Fouassière Mésanger de-Cé

Donges 0 148 55 32 70 140 73 Brain-s.-l’Authion 148 0 93 180 99 12 72 Craquefou 55 93 0 85 20 83 28 Guérande 32 180 85 0 100 174 99 Haie Fouassière 70 99 20 100 0 85 49 Mésanger 140 12 83 174 85 0 73 Ponts-de-Cé 73 72 28 99 49 73 0

The transport company uses tankers with a capacity of 39000 liters for the deliveries. Determine the tours for delivering to all clients that minimize the total number of kilometers driven.

10.4.1

Model formulation

This problem may be seen as a generalization of the famous Traveling Salesman Problem (TSP), an exam- ple of which we see in Section11.5. In this case there are several ‘salesmen’, who each have to have a tour starting and finishing at Donges. We have to determine not only the cities in the tours, but also how many tours there are to be, and the order the cities in each tour are visited.

We introduce variables precijthat take the value 1 if town i immediately precedes town j in a tour, and 0 otherwise. Let SITES = {1, . . . , NS} be the number of sites. Site 1 is the refinery, so that we have the subset CLIENTS = {2, . . . , NS} of sites to which we deliver. Let DISTij be the distance between two towns i and j, DEMi the quantity ordered by client i, and CAP the maximum capacity of the tankers. We also use variables quanti for the total amount of oil delivered on the route that includes client i up to and including client i. For example, if the route including 10 is 1,3,11,10,6,1, then quant10would be

DEM3+ DEM11+ DEM10. With these notations, we may formulate the following mathematical model:

minimize X i∈SITES X j∈SITES,i6=j DISTij· precij (10.4.1) ∀j ∈ CLIENTS : X i∈SITES,i6=j precij= 1 (10.4.2) ∀i ∈ CLIENTS : X j∈SITES,j6=i precij= 1 (10.4.3)

∀i ∈ CLIENTS : DEMi≤ quanti≤ CAP (10.4.4)

∀i ∈ CLIENTS : quanti≤ CAP + (DEMi− CAP) · prec1i (10.4.5) ∀i, j ∈ CLIENTS, i 6= j :

quantj ≥ quanti+ DEMj− CAP + CAP · precij+ (CAP − DEMj− DEMi) · precji (10.4.6)

∀i ∈ CLIENTS : quanti≥0 (10.4.7)

∀i, j ∈ SITES, i 6= j : precij∈ {0, 1} (10.4.8)

The objective (10.4.1) of this problem is to minimize the total number of kilometers driven. Every cus- tomer site has to be delivered to once. This is expressed through the two sets of constraints (10.4.2) and (10.4.3) that make the delivery enter and leave every town (except the depot) exactly once.

The quantity quantimust be at least as large as the quantity ordered by client i and within the capacity limit CAP of the tankers (10.4.4).

Furthermore, if client i is the first of a tour, then quanti is equal to the quantity ordered by this client. This constraint is expressed through the two sets of constraints (10.4.4) and (10.4.5). Indeed, if i is the first client of a tour, then prec1i is 1 and, after simplification, the constraint (10.4.5) is equivalent to the constraint (10.4.9).

quanti≤ DEMi (10.4.9)

From (10.4.9) and (10.4.4) it follows that quanti is equal to the demand of client i. If i is not the first of a tour, prec1iis 0 and the constraint (10.4.5) is equivalent to the constraint (10.4.10), which is redundant since it is already expressed in constraint (10.4.4).

quanti ≤ CAP (10.4.10)

Let us now consider the case where i is not the first customer of the tour. Then quanti must equal the sum of quantities delivered between the refinery and i inclusively. This means that if client j comes after client i in a tour, we can write that quantj must be equal to the quantity delivered on the tour from the refinery to i, plus the quantity ordered by j. This relation is stated by the constraint (10.4.6). If indeed

j is the immediate successor of i in a tour, then precij is 1 and precji is 0, and the constraint (10.4.6) is equivalent to the constraint (10.4.11).

quantj≥ quanti+ DEMj (10.4.11)

When j does not come immediately after i, constraint (10.4.6) still remains valid. If j is the immediate predecessor of i, the constraint (10.4.6) becomes (10.4.12).

quantj≥ quanti− DEMi (10.4.12)

This constraint means that the quantity delivered from the refinery up to j is no less than the quantity delivered between the depot and the successor i of j on the tour, a quantity that needs to be reduced by

the delivery at i. If j is the immediate predecessor of i, then i is the immediate successor of j. We therefore obtain in addition to (10.4.12) the constraint (10.4.13) by swapping the indices in (10.4.11).

quanti≥ quantj+ DEMi (10.4.13)

The combination of constraints (10.4.12) and (10.4.13) is equivalent to the equation (10.4.14).

quanti = quantj+ DEMi (10.4.14)

If i and j are not next to each other on a tour, we obtain the constraint (10.4.15). Since the terms on the right hand side of the inequality sign are less than or equal to DEMj, this constraint is redundant since it is subsumed by the constraint (10.4.4).

quantj≥ quanti+ DEMj− CAP (10.4.15)

And finally, constraints (10.4.7) and (10.4.8) indicate that the variables quantiare non-negative and that the precijare binary variables.

4

3 2

1 Refinery

Figure 10.3:Example of an infeasible solution

To close we would like to remark that the assignment of variables quanti to every node i guarantees that the capacity limits of the tankers are not exceeded, whilst making any tour impossible that does not include the depot. Without these variables, it would be possible to obtain solutions like the one represented in Figure10.3.

This solution satisfies the constraints (10.4.2) and (10.4.3) because every node is entered and left exactly once, but it is infeasible because the tour does not pass through the refinery. Assigning the strictly increasing values quantiall along a tour excludes this type of solution.

10.4.2

Implementation

The following Mosel program implements the mathematical model of lines (10.4.1) – (10.4.8).

model "E-4 Oil delivery" uses "mmxprs"

declarations NS = 7

SITES = 1..NS ! Set of locations, 1=refinery CLIENTS = 2..NS

DEM: array(SITES) of integer ! Demands

DIST: array(SITES,SITES) of integer ! Distances between locations CAP: integer ! Lorry capacity

prec: array(SITES,SITES) of mpvar ! 1 if i immediately precedes j, ! 0 otherwise

quant: array(CLIENTS) of mpvar ! Quantity delivered up to i end-declarations

initializations from ’e4deliver.dat’ DEM DIST CAP

end-initializations

Length:= sum(i,j in SITES | i<>j) DIST(i,j)*prec(i,j) ! Enter and leave every city only once (except the depot)

forall(j in CLIENTS) sum(i in SITES| i<>j) prec(i,j) = 1 forall(i in CLIENTS) sum(j in SITES| i<>j) prec(i,j) = 1 ! If i is the first client of a tour, then quant(i)=DEM(i)

forall(i in CLIENTS) quant(i) <= CAP + (DEM(i)-CAP)*prec(1,i)

! If j comes just after i in a tour, then quant(j) is greater than the ! quantity delivered during the tour up to i plus the quantity to be ! delivered at j (to avoid loops and keep capacity limit of the tanker)

forall(i,j in CLIENTS| i<>j) quant(j) >= quant(i) + DEM(j) - CAP + CAP*prec(i,j) + (CAP-DEM(j)-DEM(i))*prec(j,i) forall(i in CLIENTS) do

quant(i) <= CAP quant(i) >= DEM(i) end-do

forall(i,j in SITES | i<>j) prec(i,j) is_binary ! Solve the problem

minimize(Length) end-model

It is possible to define an additional set of constraints stating that quantiis greater than or equal to the sum of the quantities to deliver to client i and to his predecessor on the tour. These constraints may help improve the lower bound on the variables quanti for sites i that are not visited first in a tour. Since the model is fully stated through the version printed above we turn them into model cuts, leaving the choice to the optimizer whether to use these additional constraints or not. The reader is reminded that any constraint that is to become a model cut needs to be named and declared globally in the Mosel program.

declarations

modcut: array(CLIENTS) of linctr end-declarations

forall(i in CLIENTS) do

modcut(i):= quant(i) >= DEM(i) + sum(j in SITES| i<>j) DEM(j)*prec(j,i) setmodcut(modcut(i))

end-do

10.4.3

Results

The optimal solution involves making two delivery tours. One tour delivers a total of 22000 liters of heating oil, visiting first Guérande and then Haie Fouassière. The other tour goes from the refinery to Mésanger, then Brain-sur-l’Authion, Les Ponts-de-Cé, and Craquefou, delivering a total of 37000 liters. A total distance of 497 km needs to be driven for these tours.